/* Layout idea: left-aligned report layout. Wide grid, mono figures, one cobalt accent. */
:root {
  --bg: #f2f4f6;
  --surface: #ffffff;
  --ink: #12171f;
  --muted: #5a6472;
  --line: #d6dce3;
  --accent: #1d4ed8;
  --accent-soft: #e3eafc;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1218;
    --surface: #151c25;
    --ink: #e8ecf2;
    --muted: #97a2b1;
    --line: #28323f;
    --accent: #7b9bff;
    --accent-soft: #1b2744;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1218;
  --surface: #151c25;
  --ink: #e8ecf2;
  --muted: #97a2b1;
  --line: #28323f;
  --accent: #7b9bff;
  --accent-soft: #1b2744;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }


.byline-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.say { font-family: var(--font-mono); font-size: 13px; color: var(--muted); line-height: 1.4; }
.say b { color: var(--ink); font-weight: 500; }
.portrait { width: 168px; height: 168px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); margin-bottom: 20px; display: block; }

/* Nav */
.nav { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
.nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a.link { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a.link:hover { color: var(--accent); }

/* Hero */
.hero { padding: 48px 0 32px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-photo { width: 100%; max-width: 380px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); justify-self: end; }
.nowrap { white-space: nowrap; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; }
.hero .lede { margin-top: 22px; max-width: 60ch; font-size: 19px; color: var(--ink); text-wrap: pretty; }
.hero .lede span { color: var(--muted); }
.cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 6px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--accent); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { color: var(--accent); background: transparent; }
:root[data-theme="dark"] .btn.primary { color: #0d1218; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0d1218; } }

/* Proof strip */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); border-radius: 8px; margin-top: 44px; }
.proof > div { padding: 20px; border-right: 1px solid var(--line); }
.proof > div:last-child { border-right: 0; }
.proof .fig { font-family: var(--font-mono); font-weight: 500; font-size: 26px; color: var(--accent); font-variant-numeric: tabular-nums; }
.proof .cap { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* Sections */
section.block { padding: 56px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 36px); }
.sec-note { color: var(--muted); font-size: 15px; max-width: 60ch; margin-bottom: 24px; }

/* Work cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card.feature { grid-column: 1 / -1; border-color: var(--accent); }
.tag { font-family: var(--font-mono); font-size: 12px; color: var(--accent); background: var(--accent-soft); align-self: flex-start; padding: 3px 8px; border-radius: 4px; }
.card h3 { font-size: 22px; }
.card .row { font-size: 15.5px; }
.card .row b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.card .result { padding-top: 12px; border-top: 1px solid var(--line); }
.card .more { margin-top: auto; font-weight: 600; font-size: 15px; }

/* Writing */
.posts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post .meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.post .t { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--ink); text-decoration: none; }
.post a.t:hover { color: var(--accent); }
.pill { font-family: var(--font-mono); font-size: 12px; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.pill.live { color: var(--accent); border-color: var(--accent); }

/* About */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.about p + p { margin-top: 14px; }
.about h3 { font-size: 15px; font-family: var(--font-mono); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.about ul { margin: 0 0 24px; padding: 0; list-style: none; }
.about li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.about li span { color: var(--muted); display: block; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chips span { font-size: 14px; border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; border-radius: 999px; }

footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Detail views */
.view { display: none; }
.view.on { display: block; }
.article { max-width: 720px; padding: 44px 0 0; }
.back { display: inline-block; margin-bottom: 24px; font-weight: 600; font-size: 15px; }
.article h1 { font-size: clamp(30px, 5vw, 46px); }
.article .byline { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin: 14px 0 28px; }
.article h2 { font-size: 24px; margin: 36px 0 10px; }
.article p { margin-bottom: 14px; }
.snap { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); background: var(--surface); border-radius: 8px; margin: 8px 0 8px; }
.snap div { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.snap div:nth-child(odd) { border-right: 1px solid var(--line); }
.snap div:nth-last-child(-n+2) { border-bottom: 0; }
.snap b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding: 12px 0 12px 44px; position: relative; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-size: 14px; display: grid; place-items: center; }
.steps b { font-weight: 600; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 18px; }
.results div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.results .fig { font-family: var(--font-mono); font-size: 28px; font-weight: 500; color: var(--accent); }
.results .cap { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; margin-top: 28px; }

@media (min-width: 901px) { .avatar { display: none; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-photo { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .hero { padding-top: 36px; }
  .proof { grid-template-columns: repeat(2, 1fr); }
  .proof > div:nth-child(2) { border-right: 0; }
  .proof > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cards, .about { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 6px; }
  .results { grid-template-columns: 1fr; }
  .snap { grid-template-columns: 1fr; }
  .snap div:nth-child(odd) { border-right: 0; }
  .snap div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
