@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Newsreader:opsz,wght@6..72,400;6..72,500&display=swap');

/* ==========================================================================
   LONGREAD — "ESSAY WITH TOC": no hero band. A light top header, then a
   2-column reading layout inside a centered max-width container — a sticky
   left table-of-contents (page sections + site nav) beside a narrow centered
   reading column full of air. Premium article feel: Newsreader headings +
   Manrope body. The grid holds on desktop (right column uses minmax(0,1fr)
   so it never overflows or pushes the TOC above the article at ultra-wide
   widths) and only collapses to a single column under ~820px.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #f7f6f3;
  --ink: #1a1a1a;
  --ink-2: #44443f;
  --muted: #8a897f;
  --line: #e7e5df;
  --accent: #1f5f4b;         /* deep quiet green */
  --measure: 40rem;
  --toc-w: 210px;
  --font-head: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.08rem; line-height: 1.78;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.kicker { margin: 0 0 0.9rem; font: 600 0.72rem/1 var(--font-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* ---------- Header: light, minimal ------------------------------------ */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 62px; }
.site-brand { text-decoration: none; color: var(--ink); font: 600 1.05rem/1 var(--font-body); letter-spacing: -0.01em; }
.site-nav ul { display: flex; gap: 0.2rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: inline-block; padding: 0.4rem 0.65rem; border-radius: 7px; text-decoration: none; color: var(--muted); font: 500 0.9rem/1 var(--font-body); }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Long-read 2-column layout --------------------------------- */
.longread { display: grid; grid-template-columns: var(--toc-w) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; padding-block: clamp(2.4rem, 6vw, 4.5rem); }

/* Sticky table of contents. */
.toc { position: sticky; top: 5rem; font-size: 0.9rem; }
.toc__label { margin: 1.4rem 0 0.6rem; font: 600 0.66rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.toc__label:first-child { margin-top: 0; }
.toc__list, .toc__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.toc__list a, .toc__nav a { display: block; padding: 0.35rem 0 0.35rem 0.75rem; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; line-height: 1.35; transition: border-color 0.15s, color 0.15s; }
.toc__list a:hover, .toc__nav a:hover { color: var(--ink); border-left-color: var(--accent); }
.toc__nav a[aria-current="page"] { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

/* ---------- Reading column -------------------------------------------- */
.longform { max-width: var(--measure); margin: 0 auto; }
.lr-title { margin: 0 0 1.2rem; font-family: var(--font-head); font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }

/* Inline hairline meta row (semantic <table>). */
.meta-row { width: 100%; border-collapse: collapse; margin: 0 0 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-row th { text-align: left; padding: 0.5rem 1.2rem 0.15rem 0; font: 600 0.62rem/1.2 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.meta-row td { padding: 0.15rem 1.2rem 0.6rem 0; font: 500 0.98rem/1.3 var(--font-body); color: var(--ink); }
.meta-row--inline { max-width: max-content; }

/* Modest portrait — the long-read is text-first, so the photo is a small
   right-floated figure the prose wraps around, not a column-filling block. */
.lr-portrait { margin: 0.2rem 0 1rem; max-width: 240px; }
.lr-portrait img { display: block; width: 100%; border-radius: 6px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 15%; }
.lr-portrait figcaption { margin-top: 0.5rem; }
@media (min-width: 620px) {
  .lr-portrait { float: right; margin: 0.2rem 0 1rem 1.6rem; }
  .longform::after { content: ""; display: block; clear: both; }
}

.lead { margin: 0 0 2.4rem; font-family: var(--font-head); font-weight: 400; font-size: clamp(1.28rem, 2.4vw, 1.6rem); line-height: 1.5; color: var(--ink); }

.prose { margin: 0 0 2.6rem; }
.prose h2 { margin: 2.8rem 0 1rem; font-family: var(--font-head); font-weight: 500; font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.2; letter-spacing: -0.005em; color: var(--ink); scroll-margin-top: 5rem; }
.prose p { margin: 0 0 1.3rem; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul { margin: 0 0 1.3rem; padding-left: 1.2rem; color: var(--ink-2); }
.prose li { margin: 0.35rem 0; }

/* Section anchor scroll offset (id lives on the wrapping <section>). */
.prose[id] { scroll-margin-top: 5rem; }

/* ---------- Inline figures: full reading-column width ----------------- */
.inline-figure { margin: 2rem 0; width: 100%; }
.inline-figure img { display: block; width: 100%; border-radius: 6px; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 30%; }
.inline-figure figcaption { margin-top: 0.5rem; }

/* ---------- Career table + trophies ----------------------------------- */
.data-figure { margin: 0 0 2.6rem; }
.data-figure__caption { font: 600 0.68rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.8rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.data-table thead th { text-align: left; border-bottom: 2px solid var(--ink); font: 600 0.66rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); padding: 0.5rem 1rem 0.5rem 0; }
.data-table td { padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.data-table td:first-child { color: var(--ink); font-weight: 600; }
.data-table__num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.trophies { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.trophies li { padding-left: 1.5rem; position: relative; color: var(--ink-2); }
.trophies li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.credit { margin: 0.5rem 0 0; color: var(--muted); font: 500 0.78rem/1.4 var(--font-body); }

/* ---------- FAQ ------------------------------------------------------- */
.faq { margin: 3.2rem 0 1rem; }
.faq > h2 { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 0 0 1.4rem; color: var(--ink); }
.faq__list { display: grid; gap: 0; }
.faq__item { border-top: 1px solid var(--line); padding: 1.3rem 0; }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q { margin: 0 0 0.4rem; font: 700 1.05rem/1.35 var(--font-body); color: var(--ink); }
.faq__a { margin: 0; color: var(--ink-2); }

/* ---------- Footer ---------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(2rem, 6vw, 4rem); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-block: 2.2rem; }
.site-footer__disclaimer { margin: 0; max-width: 50ch; font-size: 0.86rem; color: var(--muted); }
.site-footer__disclaimer strong { color: var(--ink); }
.site-footer__nav ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; list-style: none; margin: 0; padding: 0; }
.site-footer__nav a { color: var(--muted); text-decoration: none; font-size: 0.86rem; }
.site-footer__nav a:hover { color: var(--ink); }

/* ---------- Responsive: TOC drops above the article ------------------- */
@media (max-width: 820px) {
  .longread { grid-template-columns: 1fr; gap: 1.6rem; }
  .toc { position: static; border-left: 3px solid var(--line); padding-left: 1rem; }
  .toc__list, .toc__nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
  .toc__list a, .toc__nav a { border-left: 0; padding: 0.2rem 0.5rem; background: var(--paper-2); border-radius: 6px; }
  .longform { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto; } }
