/* ---------- Colors & fonts: change these to restyle the whole site ---------- */
:root {
  --bg: #fbfaf7;
  --text: #0f172a;
  --muted: #5b6478;
  --card: #ffffff;
  --border: #e9e4da;
  --navy: #141f38;
  --gold: #f29d0d;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* Automatic dark mode when the visitor's computer is in dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1222;
    --text: #f5f3ee;
    --muted: #b3ad9f;
    --card: #111a2e;
    --border: #22304d;
    --navy: #f5f3ee;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
p  { margin: 0 0 0.75rem; }
a  { color: inherit; }
a:hover { color: var(--gold); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.muted   { color: var(--muted); font-size: 0.92rem; }
.accent  { color: var(--gold); font-weight: 500; }
.company { color: var(--gold); font-weight: 500; margin-bottom: 0.2rem; }
.prose p { font-size: 1.08rem; color: var(--text); opacity: 0.85; }
.dots.prose li { font-size: 1.02rem; margin-bottom: 0.7rem; }
.note { margin-top: 1.5rem; font-style: italic; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding-top: 5rem;
  border-top: none;
}
.photo {
  width: 192px;
  height: 192px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card);
  box-shadow: 0 20px 50px -12px rgb(15 23 42 / 0.2);
  flex-shrink: 0;
}
.title { font-size: 1.4rem; font-weight: 300; color: var(--muted); margin: 0.4rem 0 1rem; }
.meta  { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--muted); font-size: 0.92rem; }
.meta a { text-decoration: none; }
.lead  { font-size: 1.12rem; max-width: 40rem; margin-bottom: 1.75rem; }

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.buttons.center { justify-content: center; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, background 0.2s;
}
.btn-primary { background: var(--navy); color: var(--bg); }
.btn-primary:hover { opacity: 0.85; color: var(--bg); }
.btn-outline { border: 1px solid var(--border); background: var(--card); }
.btn-icon { font-size: 1.35em; line-height: 0; vertical-align: -0.08em; margin-right: 0.15em; }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Cards & lists ---------- */
.card {
  background: var(--card);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 8px 30px -8px rgb(15 23 42 / 0.12);
}
.job { margin-bottom: 1.5rem; border-left: 3px solid var(--gold); }
.job-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.job-head > span { white-space: nowrap; }

.dots { list-style: none; padding: 0; margin: 0; }
.dots li { position: relative; padding-left: 1.1rem; margin-bottom: 0.45rem; font-size: 0.95rem; }
.dots li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid.two { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid h3 { padding-bottom: 0.5rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.grid.two h3 { border: none; padding: 0; margin-bottom: 0.3rem; }

/* ---------- Contact & footer ---------- */
.contact { text-align: center; }
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer p { margin: 0; }

/* ---------- Phones & small screens ---------- */
@media (max-width: 760px) {
  .hero { flex-direction: column; align-items: center; text-align: center; padding-top: 3rem; }
  .meta, .buttons { justify-content: center; }
  .job-head { flex-direction: column; gap: 0.25rem; }
  .grid, .grid.two { grid-template-columns: 1fr; }
}

/* Numbers strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; padding-top: 0; }
.stats div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 0.5rem; }
.stats strong { display: block; font-family: var(--font-heading); font-size: 1.6rem; color: var(--gold); }
.stats span { color: var(--muted); font-size: 0.85rem; }
/* Short experience lines with tags */
.dots.short li { margin-bottom: 0.8rem; }
.tags { display: block; margin-top: 0.3rem; }
.tag { display: inline-block; font-size: 0.72rem; padding: 0.1rem 0.5rem; margin: 0 0.3rem 0.2rem 0; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Career timeline */
.timeline { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; position: relative; }
.timeline::before { content: ""; position: absolute; top: 0.55rem; left: 0.55rem; right: 0.55rem; height: 2px; background: var(--border); }
.timeline li { position: relative; padding-top: 1.8rem; font-size: 0.88rem; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--card); border: 3px solid var(--gold); box-sizing: border-box; }
.timeline li.now::before { background: var(--gold); }
.timeline strong { display: block; font-family: var(--font-heading); font-size: 1.1rem; color: var(--text); margin: 0.1rem 0 0.2rem; }
.timeline .when { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); font-weight: 600; }
.timeline .where { display: block; margin-top: 0.3rem; font-size: 0.75rem; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; gap: 0.5rem; }
  .timeline::before { top: 0.55rem; bottom: 0.55rem; left: 0.5rem; right: auto; width: 2px; height: auto; }
  .timeline li { padding: 0 0 0.8rem 2rem; }
}

/* Timeline on the right of Experience */
.exp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 2rem; align-items: start; }
.exp-side { position: sticky; top: 1.5rem; }
.timeline.vertical { grid-template-columns: 1fr; gap: 0; margin: 0; }
.timeline.vertical::before { top: 0.55rem; bottom: 0.55rem; left: 0.5rem; right: auto; width: 2px; height: auto; }
.timeline.vertical li { padding: 0 0 1.4rem 2rem; }
@media (max-width: 900px) {
  .exp-layout { grid-template-columns: 1fr; }
  .exp-side { position: static; order: -1; }
}
