/* Cobalt kit (BrandGuide.md section 5). Two neutrals plus one accent. */
:root {
  --bg: #F3F5F8;
  --ink: #0E1420;
  --muted: #556070;
  --line: #D5DAE1;
  --accent: #2F5BFF;
  --on-accent: #FFFFFF;

  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-hand: "Caveat", cursive;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1200px;
  --radius: 8px;

  /* 8px rhythm */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px; --s12: 96px; --s16: 128px;
}
.dark {
  --bg: #0E1420;
  --ink: #F3F5F8;
  --muted: #9AA4B2;
  --line: #262E3D;
  color: var(--ink);
}
.nav.dark { background: var(--bg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; inset-inline-start: 8px; top: -64px; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: var(--radius); z-index: 50; }
.skip:focus { top: 8px; }

/* Type */
.display { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; line-height: 0.95; }
.h2 { font-family: var(--f-display); font-weight: 800; font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.025em; line-height: 1.05; }
.h3 { font-family: var(--f-body); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.label { font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--f-mono); font-weight: 500; }
.muted { color: var(--muted); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); max-width: 34em; }
.blue { color: var(--accent); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--s3); }
.nav .name { font: 800 18px/1 var(--f-display); letter-spacing: -0.02em; text-decoration: none; }
.nav ul { display: flex; align-items: center; gap: var(--s4); }
.nav ul a { font-size: 15px; text-decoration: none; color: var(--muted); }
.nav ul a:hover, .nav ul a.btn { color: var(--ink); }
@media (max-width: 720px) { .nav ul li:not(:last-child) { display: none; } }

/* Links: underline draws on hover */
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 240ms var(--ease-out); padding-bottom: 2px; }
.link:hover { background-size: 100% 1px; }
.arrow::after { content: " \2197"; font-family: var(--f-mono); }

/* Buttons: one pair. Ink solid, and quiet outline. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 48px; padding: 0 var(--s3); border-radius: var(--radius); font: 600 16px/1 var(--f-body); text-decoration: none; transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-quiet { border: 1px solid var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }
@media (max-width: 560px) { .actions .btn { width: 100%; } }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Section rhythm */
.sec { padding-block: var(--s16); border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: var(--s2); margin-bottom: var(--s8); max-width: 44em; }
@media (max-width: 720px) { .sec { padding-block: var(--s12); } .sec-head { margin-bottom: var(--s6); } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip { font: 500 12px/1 var(--f-mono); padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }

/* Grid paper */
.paper {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

/* The blue block: selected text with a cursor */
.sel { background: var(--accent); color: var(--on-accent); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cursor { display: inline-block; width: 0.08em; min-width: 3px; height: 0.9em; background: var(--ink); vertical-align: -0.08em; margin-inline-start: 0.06em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Hover lift for linked cards */
.card { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); transition: transform 240ms var(--ease-out), border-color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  a.card:hover, .card.is-link:hover { transform: translateY(-2px); border-color: var(--ink); }
}

/* Hero entrance: once, on load. Short stagger, ease-out, 8px travel. */
[data-enter] > * { animation: enter 640ms var(--ease-out) both; }
[data-enter] > *:nth-child(2) { animation-delay: 60ms; }
[data-enter] > *:nth-child(3) { animation-delay: 110ms; }
[data-enter] > *:nth-child(4) { animation-delay: 150ms; }
[data-enter] > *:nth-child(5) { animation-delay: 180ms; }
[data-enter] > *:nth-child(n+6) { animation-delay: 200ms; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

/* Footer: the brand sign-off */
.foot { border-top: 1px solid var(--line); padding-block: var(--s6); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); align-items: baseline; }
.foot strong { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.02em; }

@media (prefers-reduced-motion: reduce) {
  [data-enter] > * { animation: fade 200ms ease both; }
  .cursor { animation: none; }
  .card, .btn, .link { transition: none; }
  @keyframes fade { from { opacity: 0; } }
}

/* ---------- Page ---------- */
/* One reader: people who run ML in production. One action: message me.
   One blue thing: the line. Seven type sizes, and nothing else. */
:root {
  --t1: 13px;                          /* labels */
  --t2: 15px;                          /* meta */
  --t3: 17px;                          /* body */
  --t4: 22px;                          /* titles */
  --t5: clamp(24px, 2.4vw, 32px);      /* statements, quotes */
  --t6: clamp(32px, 4.4vw, 60px);      /* chapter headlines */
  --t7: clamp(38px, 6vw, 88px);        /* hero, numerals */
  --rail: 104px;
}
main { position: relative; }
section { scroll-margin-top: 72px; }
p, li, dd { font-size: var(--t3); }
figure { margin: 0; }
.label { font-size: var(--t1); }
.meta { font-size: var(--t2); color: var(--muted); }
.strong { font-weight: 600; }
.dim { color: var(--muted); }
.title { font: 800 var(--t4)/1.15 var(--f-display); letter-spacing: -0.015em; }
.say { font: 800 var(--t5)/1.2 var(--f-display); letter-spacing: -0.02em; }
.head { display: grid; gap: var(--s2); margin-bottom: var(--s6); }
.head h2, h2.big { font: 800 var(--t6)/1.02 var(--f-display); letter-spacing: -0.03em; max-width: 17em; }
.num { display: inline-block; font: 800 var(--t1)/1 var(--f-display); background: var(--ink); color: var(--bg); padding: 5px 7px; border-radius: 4px; margin-inline-end: 8px; }
.hand { font: 600 var(--t5)/1 var(--f-hand); color: var(--accent); white-space: nowrap; }
.bul { display: grid; gap: 8px; }
.bul li { display: grid; grid-template-columns: 20px 1fr; line-height: 1.5; }
.bul li::before { content: "›"; font: 800 var(--t3)/1.5 var(--f-display); }
/* Links you can actually tap */
.links { display: flex; flex-wrap: wrap; gap: 0 var(--s3); font-weight: 600; }
.links a, .tap { display: inline-flex; align-items: center; min-height: 44px; }
.btn { font-size: var(--t3); }

/* Nav: name, five chapters, one action */
.nav .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); height: 64px; }
.nav .name { font-size: var(--t3); display: inline-flex; align-items: center; min-height: 44px; }
#chapters { justify-self: end; display: flex; gap: 20px; }
#chapters li { display: block; }
#chapters a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--t2); font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; transition: border-color 200ms ease; }
#chapters a span { font: 500 var(--t1)/1 var(--f-mono); color: var(--muted); }
#chapters a.cur { border-bottom-color: var(--ink); }
.nav .btn { min-height: 44px; padding-inline: var(--s2); font-size: var(--t2); }

/* The road */
#line { position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; z-index: 1; overflow: visible; }
#line path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
#tip { opacity: 0; transition: opacity 200ms ease; }
#tip.on { opacity: 1; }
#pen { fill: var(--accent); transition: opacity 200ms ease; }
.band { background-color: var(--bg); color: var(--ink); }
.row { position: relative; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); padding-block: 80px; }
.row > .body { grid-column: 2; min-width: 0; }
.band.rule .row { border-top: 1px solid var(--line); }

/* Hero: the argument is the headline */
.hero .row { padding-block: 40px 48px; }
.hero .row:not(.r2) { padding-bottom: 0; }
.hero .r2 { padding-top: 0; }
.hero h1 { font-size: var(--t7); line-height: 0.98; letter-spacing: -0.035em; margin-block: var(--s2) var(--s4); }
.id { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.who { display: flex; align-items: center; gap: var(--s2); }
.who img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 12%; background: var(--line); border: 2px solid var(--ink); }
.id .text { font-weight: 600; text-decoration: none; }
.id .hand { rotate: -3deg; display: inline-flex; align-items: center; gap: 6px; }
.id .hand svg { width: 44px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Featured posts: one fixed card, four times */
/* The separator is the line itself: it leaves the headline, crosses the page as a clothesline,
   and the featured posts hang from it. */
.fhead { display: flex; justify-content: space-between; align-items: end; gap: var(--s3); margin: var(--s4) 0 0; }
.hang { padding-top: 34px; }
.fhead .hand { rotate: -2deg; }
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.fgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.fp { display: grid; grid-template-rows: auto 1fr; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--bg); text-decoration: none; transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out); }
.fp .tile { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #0E1420; color: #F3F5F8; font: 800 var(--t6)/1 var(--f-display); letter-spacing: -0.04em; overflow: hidden; }
.fp .tile img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.fp .cap { display: grid; gap: 8px; align-content: start; padding: 14px var(--s2) 16px; border-top: 2px solid var(--ink); }
.fp .t { font: 800 var(--t4)/1.15 var(--f-display); letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.45em; }
@media (hover: hover) and (pointer: fine) { a.fp:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); } }
a.fp:active { transform: scale(0.98); }

/* Separator variants (?sep=dark | tape | word | line) */
/* dark: the page turns dark halfway down the cards, so they bridge the two sections */
/* tape: a tilted strip of moving type */
/* word: one giant outlined word that the cards overlap */

/* tab: the grid paper ends and a clean sheet starts, with a folder tab naming it */
[data-sep="tab"] .hero { overflow-x: clip; }
html[data-sep="tab"] .hero .row:not(.r2) { padding-bottom: 104px; }
html[data-sep="tab"] .hero .r2 { position: relative; isolation: isolate; padding-block: 0 136px; }
[data-sep="tab"] .r2::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; translate: -50% 0; background: var(--bg); border-top: 2px solid var(--ink); }
[data-sep="tab"] .fhead { margin: 0; height: 0; align-items: start; }
[data-sep="tab"] .fhead .label { position: relative; top: -38px; height: 38px; display: inline-flex; align-items: center; padding: 0 16px; background: var(--ink); color: var(--bg); border-radius: 10px 10px 0 0; white-space: nowrap; }
[data-sep="tab"] .fhead .hand { position: relative; top: 22px; }
html[data-sep="tab"] #hang { padding-top: 72px; }
@media (max-width: 720px) {
  html[data-sep="tab"] .hero .row:not(.r2) { padding-bottom: 88px; }
  [data-sep="tab"] .fhead { flex-direction: row; }
  [data-sep="tab"] .fhead .hand { display: none; }
  html[data-sep="tab"] #hang { padding-top: 32px; }
  html[data-sep="tab"] .hero .r2 { padding-bottom: 104px; }
}

/* 01, the story (dark) */
.story h2 { font: 800 var(--t6)/1.02 var(--f-display); letter-spacing: -0.03em; max-width: 16em; }
.story .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s8); margin-top: var(--s6); align-items: start; }
.wire { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s2); }
.wire .box { border: 2px solid var(--ink); border-radius: 8px; padding: var(--s3) var(--s2); text-align: center; display: grid; gap: 4px; }
.wire .mid { display: grid; gap: 10px; justify-items: center; }
.wire .mid svg { width: 120px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wire .no { color: var(--muted); }
.wire .no svg { stroke-dasharray: 5 5; }
.steps { counter-reset: s; display: grid; gap: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; align-items: baseline; padding-block: var(--s2); border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); font: 800 var(--t4)/1 var(--f-display); }
.story .say { margin-top: var(--s3); }

/* 01, the jobs */
.intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s8); margin-bottom: var(--s6); }
.job { display: grid; grid-template-columns: 56px 220px minmax(0, 1fr); gap: var(--s3); padding-block: var(--s4); border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 2px solid var(--ink); }
.logo { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--line); filter: grayscale(1); }
.logo.none { display: grid; place-items: center; font: 800 var(--t4)/1 var(--f-display); background: var(--ink); color: var(--bg); filter: none; }
.job .tell { display: grid; gap: var(--s2); }

/* 02, one project told properly */
.case { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s8); padding-top: var(--s4); border-top: 2px solid var(--ink); }
.case > div { display: grid; gap: var(--s2); align-content: start; }
.also { margin-top: var(--s8); }
.also li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: var(--s4); align-items: baseline; padding-block: var(--s2); border-top: 1px solid var(--line); }
.also li:first-child { border-top: 2px solid var(--ink); }
.also .go { min-width: 64px; text-align: end; font-weight: 600; }

/* 03, people */
.lead-line { font: 800 var(--t6)/1.05 var(--f-display); letter-spacing: -0.03em; margin-bottom: var(--s6); max-width: 15em; }
.lead { display: inline-block; white-space: nowrap; }
.lead + .hand { display: inline-block; rotate: -3deg; margin-inline-start: var(--s3); opacity: 0; transition: opacity 240ms ease 160ms; vertical-align: middle; }
.lead.on + .hand { opacity: 1; }
.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s8); }
.sub { display: grid; gap: var(--s1); margin: var(--s8) 0 var(--s4); padding-top: var(--s4); border-top: 2px solid var(--ink); }
.sub h3 { font: 800 var(--t5)/1.1 var(--f-display); letter-spacing: -0.02em; }
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.stack { display: grid; gap: var(--s3); }
.pc { display: grid; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--bg); text-decoration: none; }
.pc img { width: 100%; height: auto; }
.pc p { font: 800 var(--t5)/1.15 var(--f-display); letter-spacing: -0.02em; padding: var(--s3); }
.pc .label { padding: 12px var(--s3); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--s2); }
.pc img + .label { border-top: 2px solid var(--ink); }
a.pc { transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { a.pc:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); } }

/* 04, writing: three topics side by side */
.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.topic { border-top: 2px solid var(--ink); padding-top: var(--s2); }
.topic .meta { margin: 4px 0 var(--s2); min-height: 3.4em; }
.topic ol { counter-reset: t; }
.topic li { counter-increment: t; display: grid; grid-template-columns: 32px 1fr; padding-block: var(--s2); border-top: 1px solid var(--line); }
.topic li::before { content: counter(t, decimal-leading-zero); font: 500 var(--t1)/1.9 var(--f-mono); color: var(--muted); }
.topic li p { font-weight: 600; line-height: 1.4; }
@media (max-width: 1080px) { .topics { grid-template-columns: 1fr; gap: var(--s4); } .topic .meta { min-height: 0; } }

/* 05, proof */
.wins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.win { display: grid; gap: var(--s2); align-content: start; border-top: 2px solid var(--ink); padding-top: var(--s2); }
.win .place { font: 800 var(--t7)/0.9 var(--f-display); letter-spacing: -0.05em; }
.win .place small { font-size: var(--t5); letter-spacing: -0.02em; margin-inline-start: 0.2em; }
.win .proof { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; border-radius: 8px; border: 2px solid var(--ink); }
.quotes { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s8); }
.quotes blockquote { margin: 0 0 var(--s2); }

/* 05, background */
.tabs { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); }
.tab { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 600 var(--t3)/1 var(--f-body); padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.tab span { font: 500 var(--t1)/1 var(--f-mono); opacity: 0.7; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tab:active { transform: scale(0.97); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s6); border-top: 2px solid var(--ink); }
.item { display: grid; grid-template-columns: 56px 1fr; gap: var(--s3); padding-block: var(--s3); border-bottom: 1px solid var(--line); align-content: start; }
.item > div { display: grid; gap: 4px; align-content: start; }
.certs { columns: 3; column-gap: var(--s6); border-top: 2px solid var(--ink); }
.issuer { break-inside: avoid; padding-block: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.issuer h3 { display: flex; align-items: center; gap: var(--s1); font: 800 var(--t3)/1.2 var(--f-display); margin-bottom: var(--s1); }
.issuer h3 img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; filter: grayscale(1); }
.issuer li { display: grid; padding-block: 2px; }
.issuer a { font-weight: 600; font-size: var(--t2); line-height: 1.35; display: inline-flex; align-items: center; min-height: 44px; }
.issuer span { font: 500 var(--t1)/1.4 var(--f-mono); color: var(--muted); margin-top: -6px; }
.more { display: none; margin-top: var(--s3); }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4) var(--s6); border-top: 2px solid var(--ink); padding-top: var(--s3); }
.tools p { line-height: 1.7; margin-top: var(--s1); }

.end .row { padding-block: 96px 112px; }
.end h2 { font: 800 var(--t7)/0.98 var(--f-display); letter-spacing: -0.035em; max-width: 12em; margin-block: var(--s2) var(--s3); }
.end .dim { max-width: 34em; margin-bottom: var(--s4); }
.foot .wrap { align-items: center; }

@media (max-width: 1080px) {
  :root { --rail: 80px; }
  .story .grid, .intro, .case, .two, .quotes { grid-template-columns: 1fr; gap: var(--s4); }
  .job { grid-template-columns: 56px minmax(0, 1fr); }
  .job .tell { grid-column: 2; }
  .certs { columns: 2; }
  #chapters a span { display: none; }
}
@media (max-width: 720px) {
  .nav .wrap { grid-template-columns: 1fr auto; height: auto; row-gap: 0; padding-top: 6px; }
  #chapters { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; gap: var(--s3); scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  #chapters::-webkit-scrollbar { display: none; }
  #chapters a span { display: inline; }
  section { scroll-margin-top: 112px; }
  .row { grid-template-columns: 1fr; padding-block: 56px; }
  .row > .body { grid-column: 1; padding-inline-start: 40px; }
  .hero .row { padding-block: 32px 64px; }
  .head { margin-bottom: var(--s4); }
  .wins, .cols2, .tools, .feed, .also li { grid-template-columns: 1fr; }
  .wins { gap: var(--s4); }
  .also li { gap: 4px; }
  .also .go { text-align: start; }
  .certs { columns: 1; }
  .certs:not(.open) .issuer:nth-child(n+4) { display: none; }
  .more { display: inline-flex; }
  .certs.open + .more { display: none; }
  .job { grid-template-columns: 1fr; gap: var(--s2); }
  .job .tell { grid-column: 1; }
  .wire { grid-template-columns: 1fr; }
  .wire .mid svg { rotate: 90deg; width: 44px; }
  .lead { white-space: normal; }
  .lead + .hand { display: block; margin: var(--s2) 0 0; }
  .m-hide { display: none; }
  .fhead { margin-top: var(--s4); align-items: start; flex-direction: column; gap: var(--s1); }
  .hang { padding-top: 40px; padding-inline-start: 4px; }
  .fgrid, .fgrid.three { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s2); margin-inline-end: calc(-1 * var(--gutter)); padding-inline-end: var(--gutter); scrollbar-width: none; }
  .fgrid::-webkit-scrollbar { display: none; }
  .fgrid .fp { flex: 0 0 240px; scroll-snap-align: start; }
  .end .row { padding-block: 64px 80px; }
}

/* ---- Story edition: one line, drawn without a map. Five chapters; the line is the narrator. ---- */
#strands path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
#notes path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms var(--ease-in-out); }
#notes path.on { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { #notes path { transition: none; } }
/* commits on the practice branch */
.stop { --dx: -34px !important; --dxm: -15px !important; border-width: 3px !important; }
.stop.on { border-color: var(--accent) !important; background: var(--bg) !important; }
.rx { position: absolute; left: 28px; top: 44px; width: 0; height: 0; }
.sheet { border-top: 2px solid var(--ink); }
.ctab { position: absolute; top: 0; left: var(--rail); translate: 0 -100%; height: 38px; display: inline-flex; align-items: center; gap: 10px; padding: 0 16px; background: #0E1420; color: #F3F5F8; border-radius: 10px 10px 0 0; font: 500 var(--t1)/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; z-index: 2; }
.ctab.inv { background: #F3F5F8; color: #0E1420; }
.ch1 .row { padding-block: 104px 136px; }
.ch1 h2 { font: 800 var(--t7)/0.98 var(--f-display); letter-spacing: -0.035em; max-width: 11em; margin-bottom: var(--s4); }
.ch1 .lede { color: var(--ink); max-width: 30em; margin: 0; font-size: var(--t5); line-height: 1.3; font-family: var(--f-display); font-weight: 800; letter-spacing: -0.02em; }
.ch1 .lede span { color: var(--muted); }
.chap h2 { font: 800 var(--t6)/1.02 var(--f-display); letter-spacing: -0.03em; max-width: 15em; }
.chap .head p { max-width: 36em; }

.story-btn { min-height: 56px; padding-inline: var(--s4); gap: 10px; }
.story-btn span { display: inline-block; transition: translate 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .story-btn:hover span { translate: 0 4px; } }

/* 02: the line wanders from stop to stop */
.tl { border-top: 2px solid var(--ink); }
.st { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s4); padding-block: var(--s3); border-bottom: 1px solid var(--line); align-items: start; }
.st > div { display: grid; gap: 4px; align-content: start; }
.stop { position: absolute; top: 26px; left: calc(28px - var(--rail) - var(--gutter) + var(--dx, 0px) - 7px); width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); z-index: 2; transition: background-color 200ms ease, border-color 200ms ease, scale 300ms var(--ease-out); }
.stop.on { border-color: var(--ink); background: var(--ink); scale: 1.15; }
.st.win .place { font: 800 var(--t7)/0.85 var(--f-display); letter-spacing: -0.05em; margin-bottom: 6px; }
.st .proof, .mentor .proof { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center top; border-radius: 8px; border: 2px solid var(--ink); }
.st blockquote { margin: 0; font-style: italic; }

/* 03 */
.promise { margin-top: var(--s3); max-width: 24em; }
.bridge { margin: var(--s8) 0 var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); display: grid; gap: var(--s1); }
.bridge h3 { font: 800 var(--t5)/1.1 var(--f-display); letter-spacing: -0.02em; max-width: 22em; }

/* 04 */
.mentor { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.9fr); gap: var(--s6); align-items: start; }
.mentor .place { font: 800 var(--t7)/0.85 var(--f-display); letter-spacing: -0.05em; white-space: nowrap; }
.mentor .place small { font-size: var(--t5); letter-spacing: -0.02em; margin-inline-start: 0.2em; }
.mentor > div { display: grid; gap: var(--s2); }
.quote1 { margin: var(--s6) 0 0; max-width: 34em; }
.quote1 blockquote { margin: 0 0 var(--s1); }
.topic .fp { margin-bottom: var(--s2); }
.topic { border-top: 0; padding-top: 0; }
#write { scroll-margin-top: 96px; }
.end .hand { display: inline-block; rotate: -2deg; margin-bottom: var(--s3); }
main > .foot { position: relative; }
main > .foot .wrap { padding-inline-start: calc(var(--gutter) + var(--rail)); }

@media (max-width: 1080px) {
  .st { grid-template-columns: 110px minmax(0, 1fr); }
  .st > :nth-child(4) { grid-column: 2; }
  .mentor { grid-template-columns: 1fr; gap: var(--s3); }
}
@media (max-width: 720px) {
  .rx { left: 22px; }
  main > .foot .wrap { padding-inline-start: calc(var(--gutter) + 40px); }
  .ctab { left: calc(var(--gutter) + 40px); }
  .ch1 .row { padding-block: 64px 104px; }
  .st { grid-template-columns: 1fr; gap: var(--s1); }
  .st > :nth-child(4) { grid-column: 1; }
  .stop { top: 22px; left: calc(22px - 40px - var(--gutter) + var(--dxm, 0px) - 6px); width: 12px; height: 12px; }
}
@media (prefers-reduced-motion: reduce) { .stop { transition: none; } }

/* For the record: every part shown in full, one after the other */
.sub.first { margin-top: 0; }
#record .certs, #record .cols2, #record .tools { border-top: 0; }
#record .tools { padding-top: 0; }
#record .quotes { align-items: start; }

/* Hero without the featured strip; wider rail so the line labels have room */
:root { --rail: 136px; }
.hero .row:not(.r2) { padding-block: 96px 136px !important; }
@media (max-width: 1080px) { :root { --rail: 80px; } }
@media (max-width: 720px) { .hero .row:not(.r2) { padding-block: 48px 104px !important; } }

/* Hero line above the hook: plain sentence case */
.kicker { font: 600 var(--t3)/1.4 var(--f-body); color: var(--muted); }

/* Post titles are never cut off */
.topic .fp .t { display: block; -webkit-line-clamp: unset; overflow: visible; }

/* Tall tap targets: underline the words themselves, not the bottom edge of the 44px box */
.issuer a.link, .links a.link, a.link.tap { background: none; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 200ms ease; }
.issuer a.link:hover, .links a.link:hover, a.link.tap:hover { text-decoration-color: currentColor; }

/* Short certificate list: nothing hidden on phones */
@media (max-width: 720px) { .certs:not(.open) .issuer:nth-child(n+4) { display: block; } }

/* Footer: one last way to reach me */
.foot-cta { align-items: center; gap: var(--s2) var(--s3); }
.foot-cta .btn { min-height: 48px; }
@media (max-width: 720px) { .foot-cta { width: 100%; } .foot-cta .btn { width: 100%; } }
