/* tools/flows.py diagram styles */
.flow{container-type:inline-size;margin:18px 0 0}
.flow-svg{display:block;width:100%;height:auto;overflow:visible}
.flow-wide{display:none}
@container (min-width:520px){.flow-wide{display:block}.flow-narrow{display:none}}
.flow figcaption{margin-top:10px;color:#405069;font-size:.84rem;line-height:1.45}
.flow-node rect{stroke-width:1.4}
.flow-label{font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;fill:#041E3A}
.flow-sub{font-size:10px;fill:#405069}
.flow-io rect{fill:#FAF9F6;stroke:#8795A5;stroke-dasharray:4 3}
.flow-code rect{fill:#041E3A;stroke:#041E3A}
.flow-code .flow-label{fill:#FAF9F6}.flow-code .flow-sub{fill:#CDD3D8}
.flow-llm rect{fill:#FFF4EA;stroke:#BE6C20}
.flow-judge rect{fill:#F6D3B0;stroke:#BE6C20;stroke-width:2}
.flow-human rect{fill:#FAF9F6;stroke:#041E3A;stroke-width:2.4}
.flow-out rect{fill:#E8ECEF;stroke:#354250}
.flow-edge{fill:none;stroke:#354250;stroke-width:1.5}
.flow-edge-loop{stroke:#BE6C20;stroke-dasharray:5 4}
.flow-edge-skip{stroke:#8795A5;stroke-dasharray:3 4}
.flow-arrow{fill:#354250}
.flow-edge-label{font-family:JetBrains Mono,monospace;font-size:9.5px;font-weight:700;fill:#9A5418;paint-order:stroke;stroke:#FAF9F6;stroke-width:4px}
.flow-dot{fill:#E08A3C;stroke:#FAF9F6;stroke-width:1.5}
.flow-dot-skip{fill:#8795A5}
.flow-legend-text{font-size:10px;fill:#405069}
.flow-judge:not(.flow-legend) rect{animation:flowGate 2.6s ease-in-out infinite}
@keyframes flowGate{50%{stroke-width:3.4}}
@media (prefers-reduced-motion:reduce){.flow-dots{display:none}.flow-judge rect{animation:none}}

/* Portfolio v4 — cinematic editorial. Dark ink + warm orange, Archivo / JetBrains Mono,
   pale-paper chapters for rhythm. No gradients, no glass. The flow-diagram rules from
   tools/flows.py are appended after this file by the build. */

:root {
  --night: #050B14;
  --ink: #041E3A;
  --ink-2: #0A1626;
  --paper: #FAF9F6;
  --paper-2: #F1EEE7;
  --rule: #D6D2C8;
  --rule-dark: #253244;
  --text: #0B1B2E;
  --muted: #4A5868;
  --text-dark: #E6EAEE;
  --muted-dark: #B3BDC7;
  --orange: #E08A3C;
  --orange-600: #BE6C20;
  --orange-ink: #9A5418;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Archivo, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html:not(.reduced-motion) { scroll-behavior: smooth; } }

body {
  min-width: 320px;
  margin: 0;
  background: var(--night);
  color: var(--text-dark);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--sans); text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.band-paper :focus-visible { outline-color: var(--orange-600); }

.shell { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; z-index: 100; top: 8px; left: 8px;
  padding: 12px 16px; background: var(--paper); color: var(--ink);
  font-weight: 700; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------ labels */
.mono-label, .chapter, .case-no, .case-kicker, .lane-label, .hack-event, .record-title, .tease-kicker, .changed-label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.chapter { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; color: var(--orange); }
.chapter::after { width: 56px; height: 1px; background: currentColor; content: ""; }
.band-paper .chapter { color: var(--orange-ink); }

/* ------------------------------------------------------------ nav */
.site-nav {
  position: sticky; z-index: 50; top: 0;
  border-bottom: 1px solid var(--rule-dark);
  background: var(--night);
}
.progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; }
.progress-bar { display: block; height: 100%; background: var(--orange); transform: scaleX(0); transform-origin: 0 50%; }
.nav-inner { position: relative; display: flex; min-height: var(--nav-h); align-items: center; gap: 20px; }
.nav-mark {
  display: inline-flex; min-height: 44px; align-items: center; flex-shrink: 0;
  color: var(--paper); font-family: var(--mono); font-size: .76rem; font-weight: 700;
  letter-spacing: .08em; text-decoration: none; text-transform: uppercase; white-space: nowrap;
}
.chapter-marker {
  display: none; margin-right: auto; padding-left: 18px; border-left: 1px solid var(--rule-dark);
  color: var(--muted-dark); font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.site-menu { margin-left: auto; min-width: 0; }
.site-menu ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-menu a {
  display: inline-flex; min-height: 44px; align-items: center; padding: 0 12px;
  color: #C9D1D9; font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-decoration: none; text-transform: uppercase; white-space: nowrap;
}
.site-menu a:hover, .site-menu a[aria-current] { color: var(--paper); }
.site-menu a[aria-current] { box-shadow: inset 0 -2px 0 var(--orange); }
.menu-toggle {
  display: none; min-width: 44px; min-height: 44px; margin-left: auto; padding: 0 14px;
  align-items: center; gap: 10px; border: 1px solid var(--rule-dark); background: transparent;
  color: var(--paper); font: 600 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; background: currentColor; content: ""; }
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -5px; }
.menu-icon::after { position: absolute; top: 5px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 899px) {
  .site-nav .nav-mark { font-size: .7rem; }
  .js .menu-toggle { display: inline-flex; }
  .js .site-menu { display: none; }
  .js.menu-open .site-menu {
    position: absolute; top: 100%; left: -20px; right: -20px; display: block;
    border-bottom: 1px solid var(--rule-dark); background: var(--night);
  }
  .js .site-menu ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; overflow: visible; }
  .js .site-menu a { width: 100%; min-height: 52px; padding: 0; border-top: 1px solid var(--rule-dark); font-size: .8rem; }
  html:not(.js) .site-menu ul { padding-bottom: 2px; }
}
@media (min-width: 900px) {
  .chapter-marker { display: block; }
  .site-menu { margin-left: 0; }
}

/* ------------------------------------------------------------ bands */
.band-night { background: var(--night); color: var(--text-dark); }
.band-ink { background: var(--ink); color: var(--text-dark); }
.band-paper { background: var(--paper); color: var(--text); }
.band-paper-2 { background: var(--paper-2); color: var(--text); }

.section-heading {
  max-width: 18ch; margin-bottom: 28px;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem); font-weight: 800; letter-spacing: -.04em; line-height: .98;
}
.band-paper .section-heading, .band-paper-2 .section-heading { color: var(--ink); }
.section-lede { max-width: 62ch; font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; }
.band-paper .section-lede { color: var(--muted); }
.band-night .section-lede, .band-ink .section-lede { color: var(--muted-dark); }

/* ------------------------------------------------------------ hero */
.hero { position: relative; padding: clamp(36px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero::after {
  position: absolute; right: 0; bottom: 0; width: 38%; height: 1px; background: var(--rule-dark); content: "";
}
.hero-grid { display: grid; gap: 28px; grid-template-areas: "copy" "actions" "tease" "aside"; }
.hero-copy { grid-area: copy; min-width: 0; }
.hero-actions { grid-area: actions; }
.hero-tease { grid-area: tease; }
.hero-aside { grid-area: aside; }
.hero-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 22px; }
.hero-name strong { color: var(--paper); font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.hero-name span { color: var(--muted-dark); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-title {
  margin-bottom: 28px; color: var(--paper);
  font-size: clamp(2.6rem, 11.5vw, 6.4rem); font-weight: 900; letter-spacing: -.055em; line-height: .86;
}
.hero-title span { display: block; }
.hero-title .line-2 { color: var(--orange); }
.hero-lede { max-width: 34ch; color: #DCE2E7; font-size: clamp(1.12rem, 2.1vw, 1.6rem); font-weight: 500; line-height: 1.38; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.button {
  display: inline-flex; min-height: 48px; align-items: center; gap: 10px; padding: 0 22px;
  border: 1px solid var(--paper); background: var(--paper); color: var(--ink);
  font-weight: 700; text-decoration: none; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.button:hover { border-color: var(--orange); background: var(--orange); }
.text-link {
  display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; gap: 8px;
  color: var(--paper); font-weight: 600; text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.text-link:hover { color: var(--orange); }
.hero-social { display: flex; gap: 20px; margin-top: 10px; }
.hero-social a { color: var(--muted-dark); font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; text-decoration-thickness: 1px; }

.hero-tease { max-width: 560px; border-top: 1px solid var(--rule-dark); padding-top: 22px; }
.tease-kicker { margin-bottom: 14px; color: var(--orange); }
.tease-text { max-width: 52ch; margin-bottom: 12px; color: var(--paper); font-size: 1.02rem; font-weight: 600; }
.tease-figures { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.tease-proof a { display: grid; grid-template-columns: 2.4em 1fr; gap: 10px; align-items: baseline; padding: 7px 0;
  color: #CBD3DA; text-decoration: none; font-size: .95rem; line-height: 1.4; border-bottom: 1px solid var(--rule-dark); }
.tease-proof a:hover .tease-proof-text { color: var(--paper); }
.tease-no { color: var(--orange); font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; }

.hero-portrait { position: relative; width: min(100%, 300px); margin: 12px 0 18px 14px; }
.hero-portrait::before {
  position: absolute; top: -14px; left: -14px; width: 100%; height: 100%;
  border: 1px solid var(--orange); content: "";
}
.hero-portrait picture, .hero-portrait img { position: relative; display: block; width: 100%; height: auto; }
.hero-portrait figcaption { margin-top: 12px; color: var(--muted-dark); font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-credential { max-width: 36ch; color: var(--muted-dark); font-size: .9rem; line-height: 1.5; }
.hero-credential strong { color: var(--text-dark); font-weight: 600; }
.hero-credential a { color: var(--paper); text-underline-offset: 4px; }

@media (min-width: 640px) {
  .hero-title .line-2 { padding-left: .62em; }
}
@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, .6fr);
    grid-template-areas: "copy aside" "actions aside" "tease aside";
    column-gap: clamp(40px, 6vw, 96px); row-gap: 32px;
  }
  .hero-title { font-size: clamp(4.2rem, 7.4vw, 6.3rem); }
  .hero-aside { align-self: end; justify-self: end; width: 100%; max-width: 330px; }
  .hero-portrait { width: calc(100% - 14px); margin: 0 0 18px 14px; }
}

/* ------------------------------------------------------------ through-line */
.throughline { padding: clamp(72px, 10vw, 140px) 0; }
.throughline-intro { display: grid; gap: 32px; margin-bottom: clamp(48px, 7vw, 88px); }
.doctrine { align-self: end; border-left: 3px solid var(--orange-600); padding: 4px 0 4px 22px; }
.doctrine-term { display: block; margin-bottom: 8px; color: var(--orange-ink); font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.doctrine p { color: var(--ink); font-size: clamp(1.1rem, 1.8vw, 1.32rem); font-weight: 500; line-height: 1.5; }
@media (min-width: 960px) { .throughline-intro { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 72px; } }

.lanes { display: grid; gap: 40px; }
.lane { display: grid; gap: 18px; }
.lane-head { display: grid; gap: 4px; }
.lane-label { color: var(--ink); }
.lane-note { color: var(--muted); font-size: .86rem; }
.lane-steps { position: relative; display: grid; gap: 0; border-left: 2px solid var(--ink); margin-left: 6px; }
.lane-step { position: relative; padding: 0 0 20px 24px; }
.lane-step::before {
  position: absolute; top: 6px; left: -8px; width: 14px; height: 14px; border: 2px solid var(--ink);
  background: var(--ink); content: "";
}
.lane-when { display: block; margin-bottom: 2px; color: var(--orange-ink); font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.lane-what { color: var(--text); font-size: .98rem; line-height: 1.45; }
.lane-coursework .lane-steps { border-left: 2px dashed var(--orange-600); }
.lane-coursework .lane-step::before { border-color: var(--orange-600); background: var(--paper); border-radius: 50%; }
.lane-coursework .lane-label { color: var(--orange-ink); }
.throughline-closing { max-width: 70ch; margin-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--rule); padding-top: 22px; color: var(--muted); font-size: .95rem; }

@media (min-width: 900px) {
  .lane { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
  .lane-steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-left: 0; border-top: 2px solid var(--ink); margin: 9px 0 0; }
  .lane-step { padding: 22px 18px 0 0; }
  .lane-step::before { top: -8px; left: 0; }
  .lane-coursework .lane-steps { border-left: 0; border-top: 2px dashed var(--orange-600); }
}

/* ------------------------------------------------------------ work intro */
.work-intro { padding: clamp(72px, 9vw, 128px) 0 clamp(48px, 6vw, 72px); }
.motion-control { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 32px; }
.motion-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.motion-label {
  display: inline-flex; min-height: 44px; align-items: center; gap: 12px; cursor: pointer;
  color: var(--paper); font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.motion-switch { position: relative; width: 40px; height: 22px; border: 1px solid var(--muted-dark); border-radius: 22px; }
.motion-switch::after {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted-dark); content: ""; transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.motion-input:checked + .motion-label .motion-switch { border-color: var(--orange); }
.motion-input:checked + .motion-label .motion-switch::after { background: var(--orange); transform: translateX(18px); }
.motion-input:focus-visible + .motion-label .motion-switch { outline: 3px solid var(--orange); outline-offset: 3px; }
.motion-hint { color: var(--muted-dark); font-size: .86rem; }

/* ------------------------------------------------------------ cases */
.case { padding: clamp(64px, 8vw, 112px) 0; border-top: 1px solid var(--rule); }
.case:first-of-type { border-top: 0; }
.case-grid { display: grid; gap: 36px; }
.case-meta { min-width: 0; }
.case-no { margin-bottom: 10px; color: var(--orange-ink); }
.case-title { margin-bottom: 14px; color: var(--ink); font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.case-label {
  display: inline-block; margin-bottom: 20px; border: 1px solid var(--ink); padding: 6px 10px;
  color: var(--ink); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .04em; line-height: 1.45;
}
.case-facts { display: grid; gap: 12px; border-top: 1px solid var(--rule); padding-top: 16px; }
.case-facts dt { color: var(--muted); font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.case-facts dd { color: var(--text); font-size: .92rem; line-height: 1.45; }

.case-body { min-width: 0; }
.case-kicker { margin-bottom: 12px; color: var(--orange-ink); }
.case-decision {
  max-width: 20ch; margin-bottom: 18px; color: var(--ink);
  font-size: clamp(1.95rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.02;
}
.case-sub { max-width: 60ch; margin-bottom: 40px; color: var(--muted); font-size: 1.08rem; }
.case-row { display: grid; gap: 10px; margin-bottom: 36px; }
.case-row h4, .callout h4 { color: var(--ink); font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.case-row > p { max-width: 64ch; color: var(--text); }

.stats { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.stat { display: grid; gap: 4px; border-bottom: 1px solid var(--rule); padding: 16px 0; }
.stat dd { order: -1; color: var(--ink); font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.stat dt { color: var(--muted); font-size: .9rem; line-height: 1.4; }
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
  .stat { border-bottom: 0; padding: 18px 20px 18px 0; }
  .stat + .stat { border-left: 1px solid var(--rule); padding-left: 20px; }
}

.case-split { display: grid; gap: 16px; margin-bottom: 36px; }
@media (min-width: 720px) { .case-split.has-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.callout { display: grid; gap: 10px; align-content: start; padding: 20px 22px; background: var(--paper-2); }
.callout p { color: var(--text); font-size: .96rem; line-height: 1.55; }
.callout-reject { border-left: 4px solid var(--orange-600); }
.callout-reject h4 { color: var(--orange-ink); }
.callout-limit { border-left: 4px solid var(--muted); }

.changed { margin: 0 0 32px; border-top: 1px solid var(--rule); padding-top: 22px; }
.changed-label { margin-bottom: 10px; color: var(--muted); }
.changed-quote { max-width: 30ch; color: var(--ink); font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.changed-quote::before { color: var(--orange-600); content: "“"; }
.changed-quote::after { color: var(--orange-600); content: "”"; }

.results { margin-bottom: 20px; border: 1px solid var(--rule); background: var(--paper); }
.results summary {
  display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px;
  color: var(--ink); font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; list-style: none;
}
.results summary::-webkit-details-marker { display: none; }
.results summary::after { flex-shrink: 0; color: var(--orange-600); font-size: 1.1rem; content: "+"; }
.results[open] summary::after { content: "−"; }
.results summary:hover { background: var(--paper-2); }
.results-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.results-table caption { padding: 0 18px 10px; color: var(--muted); font-size: .82rem; text-align: left; }
.results-table th, .results-table td { padding: 12px 18px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.results-table thead th { color: var(--muted); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.results-table tbody th { color: var(--text); font-weight: 600; }
.results-table td { color: var(--text); font-family: var(--mono); font-size: .84rem; }
@media (max-width: 559px) {
  .results-table thead { display: none; }
  .results-table tr { display: block; border-top: 1px solid var(--rule); padding: 10px 18px; }
  .results-table th, .results-table td { display: block; padding: 2px 0; border: 0; }
}
.case-writing { color: var(--ink); text-decoration-color: var(--orange-600); }
.case-writing:hover { color: var(--orange-ink); }

@media (min-width: 960px) {
  .case-grid { grid-template-columns: 280px minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); }
  .case-meta { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
}

/* ------------------------------------------------------------ hackathons */
.hackathons { padding: clamp(72px, 10vw, 140px) 0; }
.hack-grid { display: grid; gap: 20px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) { .hack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hack { display: flex; flex-direction: column; gap: 18px; border-top: 3px solid var(--orange); padding: 28px 0 0; }
.hack-event { color: var(--muted-dark); }
.hack-name { color: var(--paper); font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; letter-spacing: -.045em; line-height: .95; }
.stop-rule { display: grid; gap: 8px; border: 1px solid var(--rule-dark); padding: 18px 20px; background: var(--ink-2); }
.stop-rule-label { display: flex; align-items: center; gap: 10px; color: var(--orange); font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stop-rule-label::before { width: 10px; height: 10px; background: var(--orange); content: ""; }
.stop-rule-text { color: var(--paper); font-size: clamp(1.15rem, 1.9vw, 1.4rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.hack-what { color: #C9D1D8; font-size: .97rem; line-height: 1.6; }
.hack-team { color: var(--paper); font-size: .92rem; }
.hack-stack { color: var(--muted-dark); font-family: var(--mono); font-size: .76rem; line-height: 1.7; }
.hack-note { border-left: 2px solid var(--orange); padding-left: 12px; color: #D5DCE2; font-size: .88rem; }
.hack-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.hack-link {
  display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 18px;
  border: 1px solid var(--paper); color: var(--paper); font-weight: 700; text-decoration: none;
}
.hack-link:first-child { background: var(--paper); color: var(--ink); }
.hack-link:hover { border-color: var(--orange); background: var(--orange); color: var(--ink); }

/* ------------------------------------------------------------ record */
.record { padding: clamp(72px, 10vw, 140px) 0; }
.record-block { margin-top: clamp(48px, 6vw, 80px); }
.record-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; color: var(--ink); }
.record-title span { color: var(--muted); font-weight: 500; }
main:focus { outline: none; }
.record-lede { max-width: 70ch; margin-bottom: 20px; color: var(--muted); font-size: .95rem; }

.timeline-item { display: grid; gap: 4px 32px; border-bottom: 1px solid var(--rule); padding: 18px 0; }
.timeline-dates { color: var(--orange-ink); font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.timeline-role { color: var(--ink); font-size: 1.06rem; font-weight: 700; line-height: 1.3; }
.timeline-org { margin: 2px 0 6px; color: var(--muted); font-size: .9rem; }
.timeline-note { max-width: 70ch; color: var(--text); font-size: .94rem; line-height: 1.55; }
@media (min-width: 760px) { .timeline-item { grid-template-columns: 200px minmax(0, 1fr); } }

.delivery-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.delivery-table th, .delivery-table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.delivery-table thead th { color: var(--muted); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.delivery-table tbody th { color: var(--orange-ink); font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.delivery-table td:first-of-type { color: var(--ink); font-weight: 600; }
.delivery-table td { color: var(--text); }
@media (max-width: 699px) {
  .delivery-table thead { display: none; }
  .delivery-table tr { display: grid; gap: 2px; border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .delivery-table th, .delivery-table td { padding: 0; border: 0; }
}

.record-columns { display: grid; gap: clamp(40px, 5vw, 64px); margin-top: clamp(48px, 6vw, 80px); }
.record-columns .record-block { margin-top: 0; }
@media (min-width: 960px) { .record-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.credential-name { margin-bottom: 8px; color: var(--ink); font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.credential-meta { margin-bottom: 6px; color: var(--text); font-size: .94rem; }
.credential-note { margin-bottom: 14px; color: var(--muted); font-size: .88rem; }
.ink-link {
  display: inline-flex; min-height: 44px; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange-600);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.ink-link:hover { color: var(--orange-ink); }

.practice-item { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.practice-tag { color: var(--orange-ink); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.practice-name { margin: 2px 0 4px; color: var(--ink); font-size: 1.04rem; font-weight: 700; }
.practice-details { color: var(--muted); font-size: .88rem; line-height: 1.5; }

.cap-group { display: grid; gap: 2px; border-bottom: 1px solid var(--rule); padding: 12px 0; }
.cap-group dt { color: var(--ink); font-size: .9rem; font-weight: 700; }
.cap-group dd { color: var(--muted); font-size: .88rem; }

.evidence-grid { display: grid; gap: clamp(40px, 5vw, 64px); margin-top: clamp(48px, 6vw, 80px); }
.evidence-grid .record-block { margin-top: 0; }
@media (min-width: 960px) { .evidence-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.evidence-item a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; border-bottom: 1px solid var(--rule); padding: 14px 0; color: var(--text); text-decoration: none; }
.evidence-item a:hover .evidence-title { text-decoration: underline; text-decoration-color: var(--orange-600); }
.evidence-no { grid-row: span 3; color: var(--orange-ink); font-family: var(--mono); font-size: .8rem; font-weight: 700; }
.evidence-title { color: var(--ink); font-weight: 700; }
.evidence-summary { color: var(--text); font-family: var(--mono); font-size: .82rem; }
.evidence-date { color: var(--muted); font-size: .82rem; }
.evidence-note { margin: 16px 0 6px; color: var(--muted); font-size: .88rem; }

.writing-item a { display: grid; gap: 6px; border-bottom: 1px solid var(--rule); padding: 18px 0; color: var(--text); text-decoration: none; }
.writing-title { color: var(--ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.writing-item a:hover .writing-title { color: var(--orange-ink); }
.writing-summary { color: var(--muted); font-size: .92rem; }
.writing-label { color: var(--orange-ink); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* ------------------------------------------------------------ contact */
.contact { padding: clamp(80px, 12vw, 168px) 0 clamp(48px, 6vw, 72px); }
.contact-heading { max-width: 14ch; margin-bottom: 28px; color: var(--paper); font-size: clamp(2.6rem, 8vw, 7rem); font-weight: 900; letter-spacing: -.05em; line-height: .92; }
.contact-heading span { color: var(--orange); }
.contact-line { margin-bottom: 36px; color: var(--muted-dark); }
.contact-links { display: grid; gap: 8px; }
.contact-link {
  display: inline-flex; min-height: 48px; align-items: center; gap: 12px; width: fit-content; max-width: 100%;
  color: var(--paper); font-size: clamp(1.15rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -.02em;
  overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 8px;
}
.contact-link:hover { color: var(--orange); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--rule-dark); padding-top: 20px; color: var(--muted-dark); font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }

/* ------------------------------------------------------------ article pages */
.article-head { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.article-shell { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.article-back { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 28px; color: var(--muted-dark); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.article-back:hover { color: var(--paper); }
.article-title { margin-bottom: 22px; color: var(--paper); font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-weight: 900; letter-spacing: -.045em; line-height: .98; }
.article-dek { max-width: 56ch; color: var(--muted-dark); font-size: clamp(1.08rem, 1.8vw, 1.26rem); line-height: 1.55; }
.article-context { margin-top: 28px; border-left: 3px solid var(--orange); padding-left: 14px; color: #D5DCE2; font-size: .9rem; line-height: 1.55; }
.article-body { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 112px); }
.article-body p { margin-bottom: 24px; color: var(--text); font-size: 1.08rem; line-height: 1.75; }
.article-body ul { margin: 0 0 28px; }
.article-body li { position: relative; margin-bottom: 14px; padding-left: 24px; color: var(--text); font-size: 1.04rem; line-height: 1.65; }
.article-body li::before { position: absolute; left: 0; color: var(--orange-600); content: "—"; }
.article-body code { color: var(--orange-ink); font-family: var(--mono); font-size: .86em; overflow-wrap: anywhere; }
.article-body strong { color: var(--ink); }
.metric-block { margin: 8px 0 32px; border-top: 2px solid var(--ink); }
.metric-row { display: grid; gap: 2px 20px; border-bottom: 1px solid var(--rule); padding: 12px 0; font-family: var(--mono); font-size: .84rem; line-height: 1.6; }
.metric-row dt { color: var(--muted); }
.metric-row dd { color: var(--ink); font-weight: 700; }
.metric-row.is-lose dd { color: #6A7684; font-weight: 500; }
@media (min-width: 640px) { .metric-row { grid-template-columns: minmax(0, 1fr) auto; } .metric-row dd { text-align: right; } }
.run-note { margin: -4px 0 28px; border-left: 3px solid var(--orange-600); padding: 12px 16px; background: var(--paper-2); color: var(--text); font-size: .94rem; line-height: 1.55; }
.article-foot { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 48px; border-top: 1px solid var(--rule); padding-top: 20px; }

/* ------------------------------------------------------------ reveal + motion */
.js [data-reveal] { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(18px); }

/* Pause control: works without JS through :has(); JS adds .motion-paused and pauses SMIL. */
html:has(#motion-pause:checked) .flow-dots,
html.motion-paused .flow-dots { display: none; }
html:has(#motion-pause:checked) .flow-judge rect,
html.motion-paused .flow-judge rect { animation: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
html.reduced-motion { scroll-behavior: auto !important; }
html.reduced-motion *, html.reduced-motion *::before, html.reduced-motion *::after { animation: none !important; transition: none !important; }
html.reduced-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
html.reduced-motion .flow-dots { display: none; }

@media print {
  .site-nav, .motion-control, .skip-link { display: none; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .results:not([open]) > *:not(summary) { display: block; }
}
