:root {
  --bg: #f5f3ed;
  --panel: rgba(255, 255, 255, 0.78);
  --ink: #18201d;
  --muted: #59635d;
  --line: #d1d0c7;
  --active: #12684f;
  --active-bg: #dcebe3;
  --paused: #865d17;
  --paused-bg: #f2e7cd;
  --steady: #3f6074;
  --steady-bg: #dde8ee;
  --shadow: 0 16px 40px rgba(25, 39, 32, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101512;
    --panel: rgba(25, 32, 28, 0.9);
    --ink: #edf2ee;
    --muted: #b9c2bd;
    --line: #35423b;
    --active: #77d6b0;
    --active-bg: #193b2f;
    --paused: #e2bd67;
    --paused-bg: #3d311a;
    --steady: #9ac4d9;
    --steady-bg: #203743;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(rgba(255,255,255,.02), rgba(255,255,255,.02)), var(--bg); color: var(--ink); font: 16px/1.6 ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--active); }
a:focus-visible { outline: 3px solid var(--active); outline-offset: 4px; border-radius: 2px; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 64px; }
.site-header { display: grid; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.eyebrow, .section-label p, .role-meta, .card-meta, .tech, .postnominals, footer, .career-break { font: 700 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow { margin: 0 0 10px; color: var(--active); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: ui-serif, Georgia, Cambria, serif; }
h1 { margin-bottom: 5px; font-size: clamp(31px, 8vw, 72px); font-weight: 560; letter-spacing: -.055em; line-height: .95; overflow-wrap: normal; }
h1 span { color: var(--muted); font-size: .58em; font-weight: 500; letter-spacing: -.04em; }
.postnominals { margin: 12px 0 0; color: var(--muted); }
.header-detail { align-self: end; }
.lede { margin-bottom: 18px; color: var(--muted); font-size: 17px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--muted); font-style: normal; font-size: 14px; }
.section { display: grid; gap: 16px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.section-label p { margin: 0; color: var(--active); }
.section-content { min-width: 0; }
h2 { margin-bottom: 13px; font-size: clamp(31px, 6vw, 44px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; }
.prose p { max-width: 74ch; margin-bottom: 10px; color: var(--muted); }
.timeline { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.role, .project-card { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); }
.role { padding: 21px; }
.current-role { border-left: 3px solid var(--active); }
.role-meta, .card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); }
.role h3, .education-list h3 { margin: 18px 0 6px; font-size: 23px; font-weight: 600; letter-spacing: -.025em; line-height: 1.16; }
.role h3 span { color: var(--muted); font-weight: 500; }
.role p, .role li, .intro, .education-list p, dd { color: var(--muted); }
.scope { margin-bottom: 12px; font-size: 14px; }
.role ul { margin: 0; padding-left: 19px; }
.role li + li { margin-top: 8px; }
.career-break { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); }
.career-break span { color: var(--ink); }
.earlier-heading { padding: 7px 0 0; color: var(--active); font: 700 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; }
.compact-role h3 { margin-top: 10px; font-size: 19px; }
.compact-role p { margin-bottom: 0; }
.intro { margin: -4px 0 20px; }
.project-grid { display: grid; gap: 16px; }
.project-card { display: flex; flex-direction: column; padding: 21px; }
.project-card h3 { margin: 23px 0 8px; font-size: 30px; font-weight: 600; letter-spacing: -.035em; }
.project-card p { margin-bottom: 13px; color: var(--muted); }
.project-card .tech { margin: auto 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--ink); font-size: 10px; letter-spacing: .06em; }
.badge { padding: 4px 8px; border-radius: 999px; font-weight: 700; letter-spacing: .07em; }
.active { color: var(--active); background: var(--active-bg); }
.paused { color: var(--paused); background: var(--paused-bg); }
.steady { color: var(--steady); background: var(--steady-bg); }
.education-list { display: grid; gap: 15px; }
.education-list article { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.education-list article:last-child { padding-bottom: 0; border: 0; }
.education-list time { color: var(--active); font: 700 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .07em; }
.education-list h3 { margin: 0 0 4px; font-size: 19px; }
.education-list p { margin: 0; }
.skills-list { display: grid; gap: 14px; margin: 0; }
.skills-list div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.skills-list div:last-child { padding-bottom: 0; border: 0; }
dt { margin-bottom: 4px; color: var(--active); font: 700 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; text-transform: uppercase; }
dd { margin: 0; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 24px; color: var(--muted); }
footer p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 860px) {
  .shell { padding-top: 54px; }
  .section { grid-template-columns: 160px minmax(0, 1fr); gap: 38px; padding: 52px 0; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1152px) {
  .site-header { grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr); gap: 32px; }
}

@media print {
  :root { --bg: #fff; --panel: #fff; --ink: #111; --muted: #333; --line: #aaa; --active: #124f3f; --active-bg: #fff; --paused: #6d4d12; --paused-bg: #fff; --steady: #31586d; --steady-bg: #fff; --shadow: none; }
  @page { margin: 14mm; }
  body { background: #fff; font-size: 10pt; line-height: 1.42; }
  .shell { width: 100%; padding: 0; }
  .site-header { padding-bottom: 14pt; }
  .section { padding: 18pt 0; }
  .role, .project-card { box-shadow: none; break-inside: avoid; }
  .timeline { gap: 10pt; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card { padding: 14pt; }
  h1 { font-size: 38pt; }
  h2 { font-size: 25pt; }
  a { text-decoration: none; }
}
