/* Swiss bold: one grid, one typeface, one accent. */
:root {
  --bg: #fafaf8;
  --ink: #000;
  --muted: #55585e;
  --rule: #000;
  --hair: #d6d6d1;
  --accent: #ff4a1c;       /* large type and marks only */
  --accent-text: #c2310a;  /* accent on small text, AA on --bg */
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 3vw, 32px);
  --max: 1240px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522;
    --ink: #eef0f4;
    --muted: #9aa4b5;
    --rule: #eef0f4;
    --hair: #27324a;
    --accent: #ff5a2e;
    --accent-text: #ff8a66;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
p, h1, h2, h3, ul, ol, dl, dd { margin: 0; }
::selection { background: var(--accent); color: #000; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; text-decoration: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }

/* 12-column grid shared by every band */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Masthead */
.masthead { padding-top: 22px; padding-bottom: 22px; align-items: baseline; font-weight: 500; font-size: 15px; }
.wordmark { grid-column: 1 / 5; text-decoration: none; font-weight: 600; }
.nav { grid-column: 5 / 13; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 26px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* Hero: the one loud element */
.hero { padding-top: clamp(40px, 9vw, 120px); padding-bottom: clamp(40px, 6vw, 80px); row-gap: clamp(28px, 4vw, 48px); }
.hero h1 {
  grid-column: 1 / -1;
  font-weight: 800;
  font-size: clamp(76px, 17.5vw, 232px);
  line-height: .84;
  letter-spacing: -.06em;
  margin-left: -.05em;
}
.hero h1 .line { display: block; }
.hero .dot { color: var(--accent); }
.hero-text { grid-column: 6 / 13; display: grid; gap: 18px; }
.role { font-weight: 600; font-size: 19px; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; max-width: 60ch; color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line { animation: rise .9s cubic-bezier(.2, .7, .1, 1) both; }
  .hero h1 .line + .line { animation-delay: .08s; }
  .hero .dot { display: inline-block; animation: drop .5s cubic-bezier(.3, 1.6, .5, 1) .7s both; }
  @keyframes rise { from { transform: translateY(.35em); opacity: 0; } }
  @keyframes drop { from { transform: translateY(-.6em); opacity: 0; } }
}


/* Section bands */
.block { padding-top: clamp(64px, 9vw, 128px); }
.block h2 {
  grid-column: 1 / -1;
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: -.035em;
  padding-bottom: clamp(20px, 2.4vw, 32px);
  border-bottom: 2px solid var(--rule);
}
h3 { font-weight: 600; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }

/* Now */
.now { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); }
.now article { padding-top: 22px; display: grid; gap: 10px; align-content: start; }
.now p { color: var(--muted); max-width: 46ch; }

/* Experience: years are the spine */
.timeline { grid-column: 1 / -1; list-style: none; padding: 0; }
.timeline > li {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--hair);
}
.timeline > li:last-child { border-bottom: 0; }
.when { grid-column: 1 / 4; display: flex; flex-direction: column; gap: 8px; }
.year { font-weight: 800; font-size: clamp(44px, 5.4vw, 76px); line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.range { font-size: 14px; color: var(--muted); }
.role-body { grid-column: 4 / 12; }
.org { color: var(--accent-text); font-weight: 500; margin-top: 4px; }
.role-body ul { margin-top: 16px; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 68ch; }
.role-body ul li { padding-left: 22px; position: relative; }
.role-body ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--ink); }

/* Earlier career and education rows */
.rows { grid-column: 1 / -1; list-style: none; padding: 0; }
.rows li {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
}
.rows li:last-child { border-bottom: 0; }
.rows-when { grid-column: 1 / 4; font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rows p { grid-column: 4 / 12; max-width: 68ch; }
.rows strong { font-weight: 600; }

/* Footer */
.footer { margin-top: clamp(80px, 10vw, 140px); padding-bottom: 40px; font-size: 15px; align-items: baseline; }
.footer::before { content: ""; grid-column: 1 / -1; border-top: 2px solid var(--rule); margin-bottom: 22px; }
.footer-name { grid-column: 1 / 5; font-weight: 600; }
.footer-links { grid-column: 5 / 10; }
.footer-copy { grid-column: 10 / 13; text-align: right; color: var(--muted); }

/* Tablet */
@media (max-width: 900px) {
  .hero-text { grid-column: 1 / -1; }
  .now { grid-template-columns: 1fr; }
  .now article { padding: 22px 0; border-bottom: 1px solid var(--hair); }
  .now article:last-child { border-bottom: 0; }
  .role-body, .rows p { grid-column: 4 / -1; }
}

/* Phone */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead { row-gap: 10px; }
  .wordmark, .nav { grid-column: 1 / -1; }
  .nav { justify-content: flex-start; gap: 6px 20px; }
  .when, .role-body, .rows-when, .rows p { grid-column: 1 / -1; }
  .when { flex-direction: row; align-items: baseline; gap: 14px; margin-bottom: 14px; }
  .rows-when { margin-bottom: 6px; font-size: 22px; }
  .footer-name, .footer-links, .footer-copy { grid-column: 1 / -1; text-align: left; }
  .footer { row-gap: 6px; }
}

/* 404 */
.notfound { padding-top: clamp(40px, 9vw, 120px); row-gap: 28px; }
.notfound h1 { grid-column: 1 / -1; font-weight: 800; font-size: clamp(76px, 17.5vw, 232px); line-height: .84; letter-spacing: -.06em; }
.notfound h1 span { color: var(--accent); }
.notfound p { grid-column: 1 / -1; font-size: 21px; }

/* Print: a clean resume */
@media print {
  @page { margin: 12mm 14mm; }
  :root { --bg: #fff; --ink: #000; --muted: #333; --rule: #000; --hair: #bbb; --accent: #000; --accent-text: #000; }
  body { font-size: 9.5pt; line-height: 1.35; }
  .when { grid-column: 1 / 3; }
  .role-body, .rows p { grid-column: 3 / -1; max-width: none; }
  .role-body ul { max-width: none; }
  .rows-when { grid-column: 1 / 3; }
  .skip, .nav, .footer { display: none; }
  .grid { padding: 0; max-width: none; }
  .masthead { padding: 0; }
  .wordmark { grid-column: 1 / -1; font-size: 26pt; font-weight: 800; letter-spacing: -.03em; }
  .hero { padding: 1mm 0 3mm; row-gap: 3mm; }
  .hero h1 { font-size: 14pt; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
  .role { font-size: 10.5pt; }
  h3 { font-size: 10.5pt; }
  .now h3 { font-size: 10pt; }
  .now p { font-size: 9pt; }
  .hero h1 .line { display: inline; animation: none; }
  .hero-text { grid-column: 1 / -1; }
  .lede { font-size: 10pt; max-width: none; }
  .block { padding-top: 5mm; }
  .block h2 { font-size: 14pt; padding-bottom: 1.5mm; }
  .now { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .now article { padding: 3mm 0 0; border: 0; }
  .timeline > li { padding: 2.2mm 0; }
  .role-body ul li { break-inside: avoid; }
  .block h2, .when, h3, .org { break-after: avoid; }
  .year { font-size: 18pt; }
  .role-body ul { margin-top: 1.5mm; gap: .8mm; }
  .rows li { padding: 1.5mm 0; break-inside: avoid; }
  .rows-when { font-size: 12pt; }
  a { text-decoration: none; }
}
