/* ==========================================================================
   PORTFOLIO PROTOTYPE — DESIGN SYSTEM "FIELD NOTES"
   --------------------------------------------------------------------------
   Editorial serif (Fraunces) for voice, Geist for structure, Geist Mono for
   annotations. Paper & ink surfaces, one violet accent, one highlighter.
   ResumeQ → structure, hierarchy, rows, counts.  Verso → personality,
   paper objects, mono meta, dark bands, printable CV.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 88px;
  --r-xs: 6px;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --ease: cubic-bezier(.65, .05, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Paper (light) */
  --bg: #F3F0E8;
  --bg-2: #EAE6DB;
  --surface: #FBFAF6;
  --text: #17160F;
  --muted: #59564C;
  --faint: #878377;
  --line: rgba(23, 22, 15, .12);
  --line-strong: rgba(23, 22, 15, .26);
  --accent: #4B36E5;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(75, 54, 229, .09);
  --mark: #E2F36E;
  --mark-solid: #E2F36E;
  --mark-ink: #17160F;
  --ok: #2E9E5B;
  --danger: #C9412B;
  --grid: rgba(23, 22, 15, .06);
  --shadow: 0 1px 0 rgba(23, 22, 15, .04), 0 18px 40px -22px rgba(23, 22, 15, .3);
  --shadow-lg: 0 50px 100px -45px rgba(23, 22, 15, .5);
  --grain: .06;
  color-scheme: light;
}

/* Ink (dark) — whole page in dark mode, or a dark band inside light mode */
:root[data-theme="dark"],
.band-ink,
.site-header.on-ink {
  --bg: #12120F;
  --bg-2: #0D0D0B;
  --surface: #1C1B17;
  --text: #EEEBE1;
  --muted: #A8A497;
  --faint: #76726A;
  --line: rgba(238, 235, 225, .11);
  --line-strong: rgba(238, 235, 225, .24);
  --accent: #ADA2FF;
  --accent-ink: #12120F;
  --accent-soft: rgba(173, 162, 255, .12);
  --mark: rgba(224, 245, 95, .24);
  --mark-ink: #F6F8DE;
  --grid: rgba(238, 235, 225, .05);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .85);
  --shadow-lg: 0 50px 100px -45px rgba(0, 0, 0, .95);
  --grain: .045;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12120F;
    --bg-2: #0D0D0B;
    --surface: #1C1B17;
    --text: #EEEBE1;
    --muted: #A8A497;
    --faint: #76726A;
    --line: rgba(238, 235, 225, .11);
    --line-strong: rgba(238, 235, 225, .24);
    --accent: #ADA2FF;
    --accent-ink: #12120F;
    --accent-soft: rgba(173, 162, 255, .12);
    --mark: rgba(224, 245, 95, .24);
    --mark-ink: #F6F8DE;
    --grid: rgba(238, 235, 225, .05);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .85);
    --shadow-lg: 0 50px 100px -45px rgba(0, 0, 0, .95);
    --grain: .045;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .band-ink { --bg: #1A1915; --bg-2: #151411; --surface: #24231E; }
}
:root[data-theme="dark"] .band-ink { --bg: #1A1915; --bg-2: #151411; --surface: #24231E; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out);
}
body::after {
  /* paper grain */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--mark-solid); color: #17160F; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 300; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 16px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.band-ink { background: var(--bg); color: var(--text); }
.section { padding-block: clamp(96px, 12vw, 176px); }
.faint { color: var(--faint); }
.muted { color: var(--muted); }
.i { width: 1.15em; height: 1.15em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typography ---------- */
.display, h1, h2, h3 {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  font-weight: 340;
  letter-spacing: -0.03em;
  line-height: .98;
}
h1 em, h2 em, h3 em, .display em, .serif-i {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.serif-i { font-family: var(--f-display); font-size: 1.06em; color: var(--text); }
.h-hero { font-size: clamp(94px, 13.2vw, 204px); line-height: .84; letter-spacing: -0.05em; font-weight: 300; }
.h-page { font-size: clamp(56px, 9.2vw, 146px); line-height: .9; letter-spacing: -0.045em; font-weight: 300; }
.h-xl-2 { font-size: clamp(52px, 8vw, 128px); line-height: .92; letter-spacing: -0.045em; font-weight: 300; }
.h-md { font-size: clamp(40px, 5.4vw, 80px); line-height: .98; letter-spacing: -0.035em; font-weight: 320; }
.h-sm { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.08; letter-spacing: -0.02em; }
.lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--muted); }
.lead-xl {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}
.lead-xl em { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
.prose p + p { margin-top: 1.1em; }
.prose p { color: var(--muted); max-width: 64ch; }
.prose strong { color: var(--text); font-weight: 500; }

.k, .mono {
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.4;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font: 500 11.5px/1 var(--f-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .55; }

/* highlighter */
.hl {
  color: var(--mark-ink);
  background-color: transparent;
  background-image: linear-gradient(100deg, var(--mark) 0%, var(--mark) 100%);
  background-repeat: no-repeat;
  background-size: 0% 62%;
  background-position: 0 86%;
  padding: 0 .1em;
  margin: 0 -.04em;
  border-radius: .1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 1.3s var(--ease-out) .35s;
}
:root:not(.js) .hl, .hl.in { background-size: 100% 62%; }
.band-ink .hl { color: var(--text); }

/* links */
.u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .45s var(--ease-out), color .3s;
  display: inline-flex; align-items: center; gap: 6px;
}
.u:hover { background-size: 100% 1px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 16px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .3s, gap .4s var(--ease-out), color .3s;
}
.link-arrow:hover { border-color: var(--text); gap: 16px; }

/* ---------- Buttons & chips ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font: 500 15.5px/1 var(--f-sans); white-space: nowrap;
  transition: color .4s var(--ease-out), border-color .4s, background-color .4s, transform .5s var(--ease-out);
  will-change: transform;
}
.btn .i { transition: transform .5s var(--ease-out); }
.btn:hover .i:last-child { transform: translateX(3px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); transform: translateY(102%);
  transition: transform .55s var(--ease-out);
}
.btn-primary:hover { color: var(--accent-ink); }
.btn-primary:hover::before { transform: translateY(0); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--text); transform: scale(0, 1); transform-origin: left;
  transition: transform .55s var(--ease-out);
}
.btn-ghost:hover { color: var(--bg); border-color: var(--text); }
.btn-ghost:hover::before { transform: scale(1, 1); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  transition: background-color .3s, border-color .3s, transform .5s var(--ease-out);
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.icon-btn .i { width: 18px; height: 18px; }

.status-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font: 500 13.5px/1 var(--f-sans); color: var(--text);
  box-shadow: var(--shadow);
}
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--ok); box-shadow: 0 0 0 0 rgba(46, 158, 91, .55);
  animation: pulse 2.4s ease-out infinite;
  vertical-align: middle; margin-right: 8px;
}
.status-chip .dot { margin-right: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 158, 91, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(46, 158, 91, 0); } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.metric {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 13px/1 var(--f-sans); padding: 8px 11px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
}

/* tape label — paper objects */
.tape {
  position: absolute; z-index: 3;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 12px; color: #3C3A33;
  background: rgba(238, 230, 200, .88);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .2);
  transform: rotate(3deg);
  backdrop-filter: blur(2px);
}

/* ---------- Reveal motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), rotate .9s var(--ease-out), translate .9s var(--ease-out), scale .9s var(--ease-out), box-shadow .5s; transition-delay: var(--d, 0ms); }
.js .reveal.in { transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms, 0ms, 0ms, 0ms; }
.js .reveal.in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .08em .14em 0; margin: 0 -.08em -.14em 0; }
.split .w > span { display: inline-block; transform: translateY(108%); transition: transform 1.1s var(--ease-out); transition-delay: calc(min(var(--i), 18) * 42ms + var(--d, 0ms)); }
.split.in .w > span { transform: none; }
:root:not(.js) .split .w > span { transform: none; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding-top: 14px; pointer-events: none; color: var(--text); }
.site-header .bar, .site-header .brand-mark, .site-header .btn, .site-header .icon-btn { transition-property: width, background-color, border-color, box-shadow, color, transform, border-radius; transition-duration: .7s, .45s, .45s, .45s, .45s, .6s, .6s; transition-timing-function: var(--ease-out); }
.bar {
  pointer-events: auto; position: relative;
  margin-inline: auto; width: min(100% - 2 * var(--gutter), var(--wrap));
  height: 62px; padding: 0 10px 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 999px; border: 1px solid transparent;
  transition: width .7s var(--ease-out), background-color .4s, border-color .4s, box-shadow .4s;
}
.is-scrolled .bar {
  width: min(100% - 24px, 1080px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-color: var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  font: 500 12.5px/1 var(--f-mono); letter-spacing: .06em;
  transition: transform .6s var(--ease-out), border-radius .6s var(--ease-out), background-color .3s;
}
.brand:hover .brand-mark { transform: rotate(-10deg); border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.brand-name { font: 400 22px/1 var(--f-display); letter-spacing: -.02em; white-space: nowrap; }
.brand-name em { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }

.nav { position: relative; display: flex; gap: 2px; }
.nav a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 10px 14px; border-radius: 999px;
  font: 500 14px/1 var(--f-sans); color: var(--muted);
  transition: color .3s;
}
.nav a .n { font: 500 9.5px/1 var(--f-mono); color: var(--faint); transition: color .3s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] .n { color: var(--accent); }
.nav-pill {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; width: 0;
  border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent);
  opacity: 0;
  transition: transform .55s var(--ease-out), width .55s var(--ease-out), opacity .3s;
}
.bar-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.theme-toggle:hover .i { transform: rotate(40deg); }
.theme-toggle .i { transition: transform .6s var(--ease-out); }
.cv-btn .i { width: 16px; height: 16px; }
.menu-toggle { display: none; position: relative; }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease-out); }
.menu-toggle span:first-child { transform: translateY(-3.5px); }
.menu-toggle span:last-child { transform: translateY(3.5px); }
.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 110px var(--gutter) 32px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .75s var(--ease), visibility 0s linear .75s;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .75s var(--ease), visibility 0s; }
.menu-open { overflow: hidden; }
.mm-links a {
  display: flex; align-items: baseline; gap: 14px;
  font: 300 clamp(40px, 11vw, 68px)/1.08 var(--f-display); letter-spacing: -.03em;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s, transform .7s var(--ease-out);
}
.mm-links a em { font-size: .4em; color: var(--faint); font-style: italic; }
.mm-links a .n { font: 500 11px var(--f-mono); color: var(--accent); }
.menu-open .mm-links a { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .05s); }
.mm-foot p { margin-top: 8px; font-weight: 500; }
.mm-mail { color: var(--muted); }

/* ==========================================================================
   SECTION HEAD  (ResumeQ hierarchy: title left, count right)
   ========================================================================== */
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-head h2 { margin-top: 22px; }
.section-meta { text-align: right; max-width: 240px; justify-self: end; }
.section-meta .count { display: block; font: italic 300 30px/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; color: var(--text); }
.section-meta p { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* facts row (Verso) */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.fact { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.fact .v { display: block; margin-top: 8px; font-size: 16px; font-weight: 500; line-height: 1.35; }

/* ==========================================================================
   HOME — HERO
   ========================================================================== */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; padding: calc(var(--header-h) + 56px) 0 40px; overflow: hidden; }
.hero-paper {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(60% 70% at 72% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 72% 45%, #000 0%, transparent 75%);
}
.hero-inner { flex: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { position: relative; }
.hero-name { margin-top: 28px; }
.hero-name .l1, .hero-name .l2 { display: block; }
.hero-name .l2 { padding-left: .9em; }
.hero-name sup { font: 500 .12em/1 var(--f-mono); color: var(--accent); vertical-align: top; margin-left: .15em; position: relative; top: .55em; letter-spacing: 0; }
.definition { margin-top: clamp(28px, 3vw, 40px); max-width: 540px; padding-left: 20px; border-left: 1px solid var(--line-strong); }
.def-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font: 500 12.5px/1.4 var(--f-mono); color: var(--faint); }
.def-head .fn { color: var(--accent); }
.def-head i { font: italic 400 17px/1 var(--f-display); color: var(--muted); }
.definition ol { margin-top: 12px; display: grid; gap: 8px; counter-reset: d; }
.definition li { counter-increment: d; display: grid; grid-template-columns: 24px 1fr; font-size: 17px; line-height: 1.5; color: var(--muted); }
.definition li::before { content: counter(d) "."; font: 500 12px/1.95 var(--f-mono); color: var(--accent); }
.definition li em { font-family: var(--f-display); font-style: italic; font-size: 1.08em; color: var(--text); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3vw, 40px); }
.hero-facts { margin-top: clamp(40px, 6vw, 72px); }

/* Venn figure */
.venn { position: relative; width: 100%; max-width: 600px; justify-self: end; }
.venn svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.v-ring { fill: none; stroke: var(--text); stroke-opacity: .55; stroke-width: 1.2; }
.js .v-ring { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s var(--ease) forwards; }
.v-ring:nth-child(2) { animation-delay: .25s; }
.v-ring:nth-child(3) { animation-delay: .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.v-fill { fill: transparent; transition: fill .6s var(--ease-out); }
.v-fill[data-k="t"].on { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.v-fill[data-k="b"].on { fill: color-mix(in srgb, var(--mark-solid) 42%, transparent); }
.v-fill[data-k="a"].on { fill: color-mix(in srgb, var(--text) 9%, transparent); }
.v-core { fill: var(--accent); transition: opacity .5s; }
.js .v-core { opacity: 0; animation: fadeIn 1s var(--ease-out) 1.6s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.v-orbit { fill: var(--text); }
.v-orbit.acc { fill: var(--accent); }
.v-dot { fill: var(--accent-ink); }
.v-here { font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; fill: var(--accent-ink); text-anchor: middle; }
.v-pair { font: 500 10px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; fill: var(--faint); text-anchor: middle; transition: fill .4s; }
.v-pair.on { fill: var(--text); }
.v-idx { font: 500 11px var(--f-mono); letter-spacing: .12em; fill: var(--accent); }
.v-word { font: italic 300 30px var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; fill: var(--text); letter-spacing: -.02em; transition: fill .4s; }
.venn[data-active] .v-label:not(.on) .v-word { fill: var(--faint); }
.v-tick { stroke: var(--line-strong); stroke-width: 1; }
.venn-cap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 6px; min-height: 104px; }
.venn-cap .mono { grid-row: span 2; padding-top: 4px; }
.venn-cap-title { font: italic 400 22px/1.15 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; }
.venn-cap-text { font-size: 15px; line-height: 1.5; color: var(--muted); }
.venn-cap.swap .venn-cap-title, .venn-cap.swap .venn-cap-text { animation: capIn .5s var(--ease-out); }
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.venn-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.venn-keys button { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: all .3s; }
.venn-keys button:hover, .venn-keys button[aria-pressed="true"] { border-color: var(--text); color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }

/* ==========================================================================
   HOME — INTRO
   ========================================================================== */
.intro-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.portrait { position: relative; padding: 14px 14px 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); rotate: -2.5deg; transition: rotate .9s var(--ease-out), translate .9s var(--ease-out), opacity 1s var(--ease-out), transform 1s var(--ease-out); max-width: 420px; }
.portrait:hover { rotate: 0deg; translate: 0 -4px; }
.portrait .tape { top: -12px; right: 24px; }
.portrait-img {
  aspect-ratio: 4 / 5; position: relative; overflow: hidden; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--bg-2) 0 2px, transparent 2px 10px), var(--bg);
}
.portrait-img > span:first-child { font: italic 300 clamp(80px, 10vw, 140px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--text); opacity: .85; letter-spacing: -.04em; }
.portrait-img .mono { position: absolute; left: 12px; bottom: 12px; font-size: 10px; opacity: 1; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font: italic 400 17px/1.3 var(--f-display); color: var(--muted); }
.portrait figcaption .mono { font-style: normal; }
.intro-main .lead-xl { margin-top: 28px; }
.intro-body { margin-top: 32px; columns: 2; column-gap: 40px; }
.intro-body p { color: var(--muted); break-inside: avoid; margin-bottom: 1em; }
.three { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.three li { padding: 22px 22px 8px 0; position: relative; }
.three li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.three .n { font: 500 11px/1 var(--f-mono); color: var(--accent); letter-spacing: .1em; }
.three h3 { margin-top: 14px; font-size: 26px; }
.three p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.intro-main .link-arrow { margin-top: 40px; }

/* ==========================================================================
   HOME — SELECTED WORK (sticky stacking cards)
   ========================================================================== */
.stack { display: grid; gap: 28px; }
.stack-card {
  position: sticky; top: calc(108px + var(--i) * 20px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 3.2vw, 44px);
  min-height: min(560px, 74vh);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 -20px 60px -30px rgba(0, 0, 0, .6);
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--p, 0) * .045));
  will-change: transform;
}
.stack-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: calc(var(--p, 0) * .35); pointer-events: none; }
.sc-copy { display: flex; flex-direction: column; gap: 20px; }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-no { font: italic 300 22px/1 var(--f-display); color: var(--accent); }
.sc-title { font-size: clamp(48px, 5.4vw, 84px); line-height: .92; letter-spacing: -.045em; font-weight: 300; margin-top: auto; }
.sc-title em { display: block; font-size: .44em; letter-spacing: -.02em; color: var(--muted); margin-top: .25em; }
.sc-copy > p { color: var(--muted); max-width: 46ch; }
.sc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.sc-art { border-radius: var(--r-md); overflow: hidden; min-height: 280px; }
.work-foot { display: flex; justify-content: center; margin-top: 64px; }

/* generative placeholder art (graph-paper notebook) */
.art {
  position: relative; display: block; overflow: hidden;
  background-color: color-mix(in srgb, var(--bg) 55%, var(--surface));
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.art svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.4s var(--ease-out); }
.hover-art:hover .art svg, a.art:hover svg { transform: scale(1.045); }
.art .art-label { position: absolute; left: 14px; bottom: 12px; font: 500 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.a-l { fill: none; stroke: var(--text); stroke-opacity: .26; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.a-l2 { fill: none; stroke: var(--text); stroke-opacity: .55; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.a-ink { fill: var(--text); }
.a-ink-s { fill: var(--text); opacity: .5; }
.a-acc { fill: var(--accent); }
.a-acc-soft { fill: var(--accent); opacity: .14; }
.a-acc-s { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.a-dash { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
.a-mark { fill: var(--mark-solid); stroke: #17160F; stroke-width: 1.2; }
.a-box { fill: var(--surface); stroke: var(--text); stroke-opacity: .4; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.a-box-acc { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.a-t { font: 500 10px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; fill: var(--faint); }
.a-t-ink { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; fill: var(--text); }
.a-t-dark { font: 600 9px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; fill: #17160F; }
.a-spin { transform-origin: 240px 180px; animation: spin 80s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.a-bar { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 40ms); }
.hover-art:hover .a-bar, a.art:hover .a-bar { transform: scaleY(1.12); }
.a-float { animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.3s); }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ==========================================================================
   EXPERIENCE ROWS  (ResumeQ 3-column)
   ========================================================================== */
.xp-list { border-bottom: 1px solid var(--line); }
.xp-row {
  position: relative; display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1.3fr) 40px;
  gap: clamp(20px, 3vw, 40px); align-items: start;
  padding: 36px 0; border-top: 1px solid var(--line);
}
.xp-row::before {
  content: ""; position: absolute; inset: 0 -20px; z-index: -1; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow);
  opacity: 0; transform: scale(.98); transition: opacity .4s, transform .6s var(--ease-out);
}
a.xp-row:hover::before { opacity: 1; transform: none; }
.xp-when { font: 500 12px/1.6 var(--f-mono); letter-spacing: .06em; color: var(--muted); padding-top: 8px; }
.xp-when .now { display: inline-flex; align-items: center; color: var(--text); }
.xp-role { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; }
.xp-org { display: block; margin-top: 6px; font: italic 300 20px/1.2 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--muted); }
.xp-desc { color: var(--muted); font-size: 16px; }
.xp-desc + .tags, .xp-desc + .metrics { margin-top: 16px; }
.xp-go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: all .5s var(--ease-out); }
a.xp-row:hover .xp-go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }
.list-foot { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   HOME — CURIOSITY (questions + /now)
   ========================================================================== */
.cur-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.questions { margin-top: 56px; counter-reset: q; }
.questions li {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px;
  padding: 26px 0; border-top: 1px solid var(--line); cursor: default; outline: none;
}
.questions li:last-child { border-bottom: 1px solid var(--line); }
.q-no { font: 500 11.5px/2.4 var(--f-mono); color: var(--faint); letter-spacing: .08em; transition: color .3s; }
.q { font: 300 clamp(22px, 2.1vw, 30px)/1.22 var(--f-display); letter-spacing: -.015em; transition: color .4s, transform .6s var(--ease-out); }
.q-note { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out), opacity .4s; opacity: 0; }
.q-note > span { overflow: hidden; font-size: 14.5px; color: var(--muted); }
.q-note > span::before { content: "↳ "; color: var(--accent); }
.questions li:hover .q-note, .questions li:focus-visible .q-note { grid-template-rows: 1fr; opacity: 1; }
.questions li:hover .q-note > span, .questions li:focus-visible .q-note > span { padding-top: 10px; }
.questions li:hover .q-no, .questions li:focus-visible .q-no { color: var(--accent); }
.questions li:hover .q, .questions li:focus-visible .q { transform: translateX(8px); }

.now-card {
  position: relative; margin-top: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-lg);
  position: sticky; top: 120px;
}
.now-card .tape { top: -12px; left: 24px; transform: rotate(-3deg); }
.now-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px dashed var(--line-strong); }
.now-head .live { display: inline-flex; align-items: center; gap: 0; color: var(--text); }
.now-card dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.now-card dl > div:last-child { border-bottom: 0; padding-bottom: 4px; }
.now-card dt { font: 500 11px/1.9 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.now-card dd { font-size: 16px; line-height: 1.45; }
.now-card dd em { font-family: var(--f-display); font-size: 1.1em; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 8px; }
.eq i { width: 2px; background: var(--accent); animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.eq i:nth-child(2) { height: 100%; animation-delay: -.5s; }
.eq i:nth-child(3) { height: 60%; animation-delay: -.8s; }
@keyframes eq { 50% { transform: scaleY(.35); } }
.eq i { transform-origin: bottom; }

/* ==========================================================================
   HOME — TRAJECTORY
   ========================================================================== */
.path { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding-top: 56px; }
.path::before, .path::after { content: ""; position: absolute; top: 31px; left: 0; height: 2px; }
.path::before { right: 0; background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 50%); background-size: 10px 2px; }
.path::after { width: 0; background: var(--accent); transition: width 2.2s var(--ease) .3s; }
.path.in::after { width: calc(50% + 7px); }
.station { position: relative; padding-right: 32px; }
.st-year { position: absolute; top: -56px; left: 0; }
.st-dot { position: absolute; top: -32px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); transition: all .5s var(--ease-out); transition-delay: var(--d, 0ms); }
.path.in .station.done .st-dot, .path.in .station.current .st-dot { background: var(--accent); border-color: var(--accent); }
.station.current .st-dot { box-shadow: 0 0 0 6px var(--accent-soft); }
.station h3 { font-size: clamp(30px, 3vw, 44px); margin-top: 8px; }
.st-sub { font: italic 300 19px/1.3 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--accent); margin-top: 6px; }
.station p:last-child { margin-top: 12px; font-size: 15px; color: var(--muted); max-width: 30ch; }
.station.future h3, .station.future .st-sub { color: var(--faint); }
.here {
  position: absolute; top: -34px; left: 30px;
  font: 500 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  background: var(--text); color: var(--bg); padding: 6px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; transform: translateX(-6px); transition: all .6s var(--ease-out) 2.1s;
}
.here::after { content: ""; position: absolute; left: -3px; top: calc(50% - 4px); width: 8px; height: 8px; background: inherit; transform: rotate(45deg); }
.path.in .here { opacity: 1; transform: none; }
.station.current .st-year { color: var(--text); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { position: relative; overflow: hidden; padding-top: clamp(96px, 12vw, 168px); }
.foot-cta h2 { margin-top: 28px; max-width: 12ch; }
body[data-page="contact"] .foot-cta { display: none; }
body[data-page="contact"] .site-footer { padding-top: 40px; }
body[data-page="contact"] .foot-grid { margin-top: 0; border-top: 0; }
.foot-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 48px; }
.email-copy {
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  font: 300 clamp(26px, 3.4vw, 46px)/1.1 var(--f-display); letter-spacing: -.02em;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-strong);
  transition: border-color .3s, color .3s;
}
.email-copy:hover { border-color: var(--accent); color: var(--accent); }
.email-ico { position: relative; width: 26px; height: 26px; }
.email-ico .i { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .3s, transform .4s var(--ease-out); }
.email-ico .i:last-child { opacity: 0; transform: scale(.5); }
.email-copy.copied .email-ico .i:first-child { opacity: 0; transform: scale(.5); }
.email-copy.copied .email-ico .i:last-child { opacity: 1; transform: none; color: var(--ok); }
.email-tip {
  position: absolute; left: 0; top: -34px;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  background: var(--text); color: var(--bg); padding: 7px 10px; border-radius: 6px;
  opacity: 0; transform: translateY(6px); transition: all .35s var(--ease-out); pointer-events: none;
}
.email-copy:hover .email-tip, .email-copy.copied .email-tip, .email-copy:focus-visible .email-tip { opacity: 1; transform: none; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.1fr .8fr .8fr; gap: 32px; margin-top: clamp(72px, 9vw, 128px); padding-top: 28px; border-top: 1px solid var(--line); }
.foot-grid p, .foot-grid ul { margin-top: 12px; font-size: 15px; }
.foot-grid li + li { margin-top: 6px; }
.foot-grid .i { width: 14px; height: 14px; }
.foot-wordmark {
  margin-top: clamp(56px, 8vw, 104px);
  font: 300 clamp(80px, 21vw, 340px)/.78 var(--f-display); letter-spacing: -.06em;
  text-align: center; white-space: nowrap; color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  user-select: none; transform: translateY(8%);
  background: linear-gradient(180deg, var(--text) 0%, transparent 85%);
  -webkit-background-clip: text; background-clip: text;
  opacity: .2;
}
.foot-wordmark em { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
.foot-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: 13.5px; background: var(--bg); }
.foot-bottom .i { width: 14px; height: 14px; }

/* ==========================================================================
   INNER PAGE HERO
   ========================================================================== */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(56px, 8vw, 112px)) 0 clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero .hero-paper { -webkit-mask-image: radial-gradient(50% 80% at 85% 30%, #000 0%, transparent 75%); mask-image: radial-gradient(50% 80% at 85% 30%, #000 0%, transparent 75%); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.crumb { display: flex; align-items: center; gap: 10px; }
.crumb a { color: var(--faint); transition: color .3s; }
.crumb a:hover { color: var(--text); }
.page-hero h1 { margin-top: 28px; }
.page-hero .lead { margin-top: 28px; max-width: 46ch; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.catalog {
  --c-ink: #2B2A25;
  position: relative; justify-self: end; width: 100%; max-width: 440px;
  background: #FFFDF6; color: var(--c-ink);
  padding: 26px 26px 22px 46px;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 40px 70px -35px rgba(0, 0, 0, .55);
  background-image:
    linear-gradient(90deg, transparent 33px, rgba(214, 72, 64, .55) 33px, rgba(214, 72, 64, .55) 34px, transparent 34px),
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(76, 116, 196, .2) 25px 26px);
  background-position: 0 0, 0 58px;
  rotate: 2.2deg;
  transition: rotate .9s var(--ease-out), translate .9s var(--ease-out), opacity 1s var(--ease-out), transform 1s var(--ease-out);
  font-family: var(--f-mono);
}
.catalog:hover { rotate: 0deg; translate: 0 -4px; }
.cat-hole { position: absolute; left: 50%; bottom: 12px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3); }
.cat-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; padding-bottom: 8px; }
.cat-top strong { font: 500 22px/1 var(--f-mono); letter-spacing: -.02em; }
.catalog dl > div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 12.5px; line-height: 26px; }
.catalog dt { text-transform: uppercase; letter-spacing: .08em; color: #8A867A; font-size: 10.5px; }
.catalog dd { color: var(--c-ink); }
.catalog .stamp {
  position: absolute; right: 18px; bottom: 34px;
  font: 600 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: #4B36E5; border: 1.5px solid #4B36E5; padding: 7px 9px; border-radius: 4px;
  transform: rotate(-8deg); opacity: .8;
}

.story-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.story-aside { position: sticky; top: 130px; align-self: start; }
.story-aside h2 { margin-top: 20px; }
.story-body .lead-xl { margin-bottom: 40px; }
.story-cols { columns: 2; column-gap: 48px; }
.story-cols p { color: var(--muted); margin-bottom: 1.1em; break-inside: avoid-column; }
.story-cols p:first-child::first-letter {
  float: left; font: 300 4.6em/.8 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; font-style: italic;
  margin: .06em .1em 0 0; color: var(--accent);
}
.pullquote { margin: 48px 0 0; padding: 8px 0 8px 32px; border-left: 2px solid var(--accent); }
.pullquote p { font: italic 300 clamp(26px, 2.8vw, 40px)/1.18 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.015em; }
.pullquote cite { display: block; margin-top: 16px; font-style: normal; }

.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.num { padding: 32px 24px 28px 0; }
.num + .num { padding-left: 24px; border-left: 1px solid var(--line); }
.num-v { display: flex; align-items: baseline; font: 300 clamp(64px, 7vw, 108px)/.9 var(--f-display); letter-spacing: -.05em; }
.num-v sup { font: 400 .34em/1 var(--f-display); color: var(--accent); margin-left: 4px; align-self: flex-start; margin-top: .12em; }
.num p { margin-top: 14px; font-size: 15px; color: var(--muted); max-width: 22ch; }

.approach { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; min-height: 340px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: color .5s var(--ease-out), transform .7s var(--ease-out), border-color .5s;
}
.step::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--text); transform: translateY(101%); transition: transform .7s var(--ease-out); }
.step:hover { color: var(--bg); transform: translateY(-6px); border-color: var(--text); }
.step:hover::before { transform: none; }
.step-no { font: 300 64px/1 var(--f-display); letter-spacing: -.04em; color: var(--accent); }
.step h3 { margin-top: auto; font-size: 28px; }
.step p { margin-top: 12px; font-size: 15px; line-height: 1.55; min-height: calc(1.55em * 4); color: var(--muted); transition: color .5s; }
.step:hover p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.step-glyph { position: absolute; top: 28px; right: 28px; width: 56px; height: 56px; }
.step-glyph * { fill: none; stroke: currentColor; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.step:hover .step-glyph { animation: wobble 1.2s var(--ease-out); }
@keyframes wobble { 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(6deg); } }

.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.tier { padding: 32px 32px 8px 0; }
.tier + .tier { padding-left: 32px; border-left: 1px solid var(--line); }
.tier-head { display: flex; justify-content: space-between; align-items: center; }
.tier-head h3 { font-size: 34px; }
.meter { display: inline-flex; gap: 4px; }
.meter i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent); }
.meter i.on { background: var(--accent); }
.tier > p { margin-top: 10px; font-size: 15px; color: var(--muted); min-height: 3em; }
.skill-list { margin-top: 24px; display: grid; }
.skill-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-weight: 500; transition: padding .4s var(--ease-out), color .3s; }
.skill-list li:hover { padding-left: 8px; color: var(--accent); }
.skill-list li span { font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.toolkit { margin-top: 56px; display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.toolkit p { font: 400 clamp(18px, 1.6vw, 22px)/1.6 var(--f-mono); letter-spacing: -.01em; color: var(--muted); }
.toolkit p b { font-weight: 500; color: var(--text); }
.toolkit p i { font-style: normal; color: var(--accent); }
.toolkit p b { white-space: nowrap; }

.offclock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.polaroid { background: var(--surface); padding: 12px 12px 16px; border: 1px solid var(--line); box-shadow: var(--shadow); rotate: var(--r, 0deg); transition: rotate .7s var(--ease-out), translate .7s var(--ease-out), scale .7s var(--ease-out), box-shadow .5s, opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.polaroid:hover { rotate: 0deg; translate: 0 -8px; scale: 1.02; box-shadow: var(--shadow-lg); }
.polaroid .ph { aspect-ratio: 1; display: grid; place-items: center; background: var(--bg-2); font: italic 300 96px/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--accent); }
.polaroid:nth-child(even) .ph { background: color-mix(in srgb, var(--mark-solid) 55%, var(--bg)); color: #17160F; }
.polaroid h3 { margin-top: 14px; font-size: 22px; }
.polaroid p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ==========================================================================
   EXPERIENCE PAGE
   ========================================================================== */
.xp-entry {
  display: grid; grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 4vw, 56px); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.xp-entry:last-child { border-bottom: 1px solid var(--line); }
.xp-meta { display: grid; gap: 10px; align-content: start; }
.xp-meta .xp-when { padding-top: 0; }
.xp-meta .tag { justify-self: start; }
.xp-head { position: sticky; top: 120px; align-self: start; }
.xp-head .xp-role { font-size: clamp(32px, 3.2vw, 48px); }
.xp-body .lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--text); }
.did { margin-top: 22px; display: grid; gap: 10px; }
.did li { display: grid; grid-template-columns: 22px 1fr; color: var(--muted); font-size: 16px; }
.did li::before { content: "→"; color: var(--accent); font-family: var(--f-mono); font-size: 14px; line-height: 1.75; }
.xp-body .metrics, .xp-body .tags { margin-top: 22px; }
.expander { margin-top: 28px; border-top: 1px dashed var(--line-strong); }
.expander-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; font: 500 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.expander-btn .i { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }
.expander-btn[aria-expanded="true"] .i { transform: rotate(135deg); color: var(--accent); }
.expander-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
.expander-panel > div { overflow: hidden; }
.expander-btn[aria-expanded="true"] + .expander-panel { grid-template-rows: 1fr; }
.expander-panel p { font: italic 300 21px/1.45 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--text); padding-bottom: 8px; }
.also { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.also li { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); }
.also li strong { font-weight: 500; }
.also li span:last-child { color: var(--muted); font-size: 14px; text-align: right; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.cta-band h3 { font-size: clamp(28px, 3vw, 44px); }

/* ==========================================================================
   PROJECTS INDEX
   ========================================================================== */
.pj-tools { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500;
  transition: all .35s var(--ease-out);
}
.filter sup { font: 500 10px/1 var(--f-mono); color: var(--faint); top: 0; }
.filter:hover { border-color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter[aria-pressed="true"] sup { color: inherit; opacity: .6; }
.view-toggle { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line); gap: 2px; }
.view-toggle button { height: 32px; padding: 0 14px; border-radius: 999px; font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: all .3s; }
.view-toggle button[aria-pressed="true"] { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.pj-count { margin-left: 4px; }

.pj-list { border-bottom: 1px solid var(--line); }
.pj-row {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 64px minmax(0, 1fr) 160px 80px 52px;
  gap: 24px; padding: 30px 0; border-top: 1px solid var(--line);
  transition: opacity .5s var(--ease-out);
}
.pj-row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--accent); transition: width .8s var(--ease-out); }
.pj-row:hover::after { width: 100%; }
.pj-list:not(.is-grid):hover .pj-row:not(:hover) { opacity: .38; }
.pj-art { display: none; }
.pj-no { font: italic 300 22px/1 var(--f-display); color: var(--accent); }
.pj-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; transition: transform .7s var(--ease-out); }
.pj-row:hover .pj-main { transform: translateX(14px); }
.pj-title { font: 300 clamp(40px, 5.2vw, 76px)/1 var(--f-display); letter-spacing: -.04em; }
.pj-sub { font: italic 300 clamp(18px, 1.7vw, 24px)/1.2 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--muted); }
.pj-go { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: all .55s var(--ease-out); }
.pj-row:hover .pj-go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }
.pj-row.is-hidden { display: none; }
.pj-row.is-entering { animation: rowIn .7s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 60ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(18px); } }
.pj-list.is-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; border-bottom: 0; }
.is-grid .pj-row { grid-template-columns: auto 1fr auto; grid-template-areas: "art art art" "no cat year" "main main go"; gap: 14px 12px; padding: 0; border-top: 0; align-items: center; }
.is-grid .pj-row::after { display: none; }
.is-grid .pj-art { display: block; grid-area: art; aspect-ratio: 4 / 3; border-radius: var(--r-md); margin-bottom: 6px; }
.is-grid .pj-no { grid-area: no; font-size: 18px; }
.is-grid .pj-cat { grid-area: cat; }
.is-grid .pj-year { grid-area: year; }
.is-grid .pj-main { grid-area: main; flex-direction: column; gap: 4px; }
.is-grid .pj-title { font-size: 40px; }
.is-grid .pj-sub { font-size: 18px; }
.is-grid .pj-go { grid-area: go; width: 44px; height: 44px; align-self: end; }
.is-grid .pj-row:hover .pj-main { transform: none; }
.pj-empty { padding: 64px 0; text-align: center; color: var(--muted); display: none; }
.pj-empty.show { display: block; }

.pj-preview {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: 320px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  opacity: 0; transition: opacity .35s var(--ease-out);
}
.pj-preview.show { opacity: 1; }
.pj-preview .art { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.pj-preview .art.on { opacity: 1; }
@media (hover: none), (max-width: 980px) { .pj-preview { display: none; } }

/* ==========================================================================
   CASE STUDY
   ========================================================================== */
.progress { position: fixed; left: 0; top: 0; z-index: 70; height: 3px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
.cs-hero { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 0; }
.cs-title-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-top: 28px; }
.cs-title-row h1 em { display: block; font-size: .42em; letter-spacing: -.02em; color: var(--muted); margin-top: .2em; }
.cs-meta { margin-top: clamp(48px, 6vw, 80px); }
.cs-cover { margin-top: clamp(40px, 5vw, 64px); aspect-ratio: 16 / 8; border-radius: var(--r-lg); border: 1px solid var(--line); }
.cs-cover .art-label { left: 20px; bottom: 18px; }
.cs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
.toc { position: sticky; top: 120px; align-self: start; display: grid; }
.toc .k { margin-bottom: 12px; }
.toc a { display: flex; gap: 12px; padding: 9px 0 9px 16px; border-left: 2px solid var(--line); font-size: 14.5px; color: var(--faint); transition: color .3s, border-color .3s, padding .4s var(--ease-out); }
.toc a span { font: 500 10.5px/1.9 var(--f-mono); }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-color: var(--accent); padding-left: 22px; }
.cs-section { padding: 0 0 clamp(56px, 7vw, 96px); scroll-margin-top: 120px; }
.cs-section + .cs-section { padding-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }
.cs-section h2 { font-size: clamp(34px, 3.8vw, 56px); margin: 16px 0 28px; }
.cs-section .prose p { font-size: 18px; }
.steps { margin-top: 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.steps li { position: relative; padding: 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: "0" counter(s); font: 500 11px/1 var(--f-mono); color: var(--accent); letter-spacing: .1em; }
.steps li strong { display: block; margin-top: 28px; font: 400 22px/1.1 var(--f-display); letter-spacing: -.01em; }
.steps li p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.steps li:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; translate: 0 -50%; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.arch { margin-top: 36px; display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 28px; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; }
.arch-node { flex: 1 0 128px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); }
.arch-node.acc { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.arch-node .mono { font-size: 10px; }
.arch-node strong { display: block; margin-top: 10px; font-weight: 500; font-size: 15px; line-height: 1.3; }
.arch-link { flex: 0 0 36px; align-self: center; height: 1px; background: var(--line-strong); position: relative; }
.arch-link::after { content: ""; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left: 5px solid var(--line-strong); border-right: 0; }
.results { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.result { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.result .num-v { font-size: clamp(56px, 5vw, 80px); }
.result p { margin-top: 12px; color: var(--muted); font-size: 15px; }
.learned { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.learned > div { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.learned h3 { font-size: 26px; margin: 12px 0 14px; }
.learned ul { display: grid; gap: 10px; }
.learned li { color: var(--muted); padding-left: 22px; position: relative; font-size: 16px; }
.learned li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.next-project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .7s var(--ease-out); }
.next-project:hover { transform: translateY(-6px); }
.next-project h2 { margin-top: 18px; font-size: clamp(48px, 6vw, 96px); font-weight: 300; letter-spacing: -.045em; }
.next-project h2 em { display: block; font-size: .36em; color: var(--muted); letter-spacing: -.02em; margin-top: .3em; }
.next-project .art { aspect-ratio: 4 / 3; border-radius: var(--r-md); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.topic { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; transition: all .35s var(--ease-out); }
.topic::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; transition: all .3s; }
.topic:hover { border-color: var(--text); }
.topic[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.topic[aria-pressed="true"]::before { background: currentColor; }
.details { margin-top: 56px; }
.details > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); }
.details > div:last-child { border-bottom: 1px solid var(--line); }
.details dd { font-weight: 500; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.details .i { width: 14px; height: 14px; }
.mini-copy { font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); transition: all .3s; }
.mini-copy:hover { color: var(--text); border-color: var(--text); }
.mini-copy.copied { color: var(--ok); border-color: var(--ok); }

.form-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3.4vw, 44px); box-shadow: var(--shadow-lg); }
.form-card .tape { top: -12px; right: 32px; }
.form-card h2 { font-size: clamp(30px, 3vw, 42px); }
.form-card h2 + p { margin-top: 10px; color: var(--muted); }
.form { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; height: 52px; padding: 0 16px;
  font: 400 16px/1.4 var(--f-sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: 150px; padding: 14px 16px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.field .err { font-size: 13px; color: var(--danger); min-height: 0; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .err { display: block; }
.form-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form-foot small { color: var(--faint); font-size: 13px; max-width: 34ch; }
.form-success { display: none; text-align: left; padding: 24px 0 4px; }
.form-card.sent .form { display: none; }
.form-card.sent .form-success { display: block; animation: capIn .6s var(--ease-out); }
.form-success .tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.form-success .tick .i { width: 26px; height: 26px; }
.form-success h3 { margin-top: 24px; font-size: 36px; }
.form-success p { margin-top: 10px; color: var(--muted); }
.form-success button { margin-top: 24px; }

/* ==========================================================================
   CV PAGE (screen) — print rules live in the @media print block below
   ========================================================================== */
.cv-page { padding: calc(var(--header-h) + 40px) 0 96px; background: var(--bg-2); min-height: 100vh; }
.cv-toolbar { width: min(100% - 2 * var(--gutter), 210mm); margin: 0 auto 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cv-toolbar .u { color: var(--muted); font-size: 14.5px; }
.cv-toolbar .right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cv-sheet {
  --cv-ink: #16150F; --cv-muted: #4F4C44; --cv-faint: #858175; --cv-line: #DCD8CE; --cv-accent: #4B36E5;
  width: min(100% - 2 * var(--gutter), 210mm); margin: 0 auto;
  background: #FFFFFF; color: var(--cv-ink);
  padding: 15mm 16mm 14mm; border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 40px 80px -40px rgba(0, 0, 0, .45);
  font: 400 9.4pt/1.45 var(--f-sans);
  color-scheme: light;
}
@media (min-width: 900px) { .cv-sheet { min-height: 297mm; } }
.cv-sheet ::selection { background: #E0F55F; }
.cv-head { display: grid; grid-template-columns: 1fr auto; gap: 8mm; align-items: end; padding-bottom: 5mm; border-bottom: .4mm solid var(--cv-ink); }
.cv-head h1 { font: 340 30pt/1 var(--f-display); letter-spacing: -.03em; color: var(--cv-ink); }
.cv-head h1 em { font-style: italic; font-weight: 300; font-variation-settings: "SOFT" 100, "WONK" 1; }
.cv-head .cv-role { margin-top: 2.5mm; font-size: 10.5pt; font-weight: 500; }
.cv-contact { margin-top: 2.5mm; display: flex; flex-wrap: wrap; gap: 1mm 4mm; font: 400 8pt/1.4 var(--f-mono); color: var(--cv-muted); }
.cv-mono-badge { width: 16mm; height: 16mm; border-radius: 3mm; background: var(--cv-ink); color: #fff; display: grid; place-items: center; font: 500 9pt/1 var(--f-mono); letter-spacing: .06em; }
.cv-sec { display: grid; grid-template-columns: 30mm 1fr; gap: 6mm; padding: 4mm 0; border-bottom: .25mm solid var(--cv-line); }
.cv-sec:last-child { border-bottom: 0; }
.cv-sec > h2 { font: 500 7.4pt/1.5 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cv-accent); padding-top: .6mm; }
.cv-sec p { color: var(--cv-muted); }
.cv-item + .cv-item { margin-top: 3.2mm; }
.cv-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; }
.cv-item-head strong { font-weight: 600; font-size: 9.8pt; color: var(--cv-ink); }
.cv-item-head strong span { font-weight: 400; color: var(--cv-muted); }
.cv-date { font: 400 7.8pt/1.4 var(--f-mono); color: var(--cv-faint); white-space: nowrap; }
.cv-item ul { margin-top: 1mm; display: grid; gap: .6mm; }
.cv-item li { position: relative; padding-left: 3.6mm; color: var(--cv-muted); }
.cv-item li::before { content: "–"; position: absolute; left: 0; color: var(--cv-faint); }
.cv-skills { display: grid; gap: 1.2mm; }
.cv-skills div { display: grid; grid-template-columns: 26mm 1fr; gap: 3mm; }
.cv-skills dt { font-weight: 600; color: var(--cv-ink); }
.cv-skills dd { color: var(--cv-muted); }
.cv-sheet a { color: inherit; }
.cv-note { width: min(100% - 2 * var(--gutter), 210mm); margin: 20px auto 0; text-align: center; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  .nav a .n { display: none; }
  .nav a { padding: 10px 11px; }
  .approach { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offclock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  :root { --header-h: 76px; }
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .cv-btn span { display: none; }
  .cv-btn { width: 40px; padding: 0; }
  .bar { height: 56px; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 40px); }
  .hero-inner { grid-template-columns: 1fr; }
  .venn { justify-self: center; max-width: 520px; margin-top: 24px; }
  .intro-grid, .cur-grid, .story-grid, .contact-grid, .page-hero-grid, .cs-title-row { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; }
  .story-aside, .now-card, .xp-head { position: static; }
  .stack-card { grid-template-columns: 1fr; min-height: 0; position: relative; top: auto; transform: none; }
  .stack-card::after { display: none; }
  .sc-art { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .sc-title { margin-top: 8px; }
  .xp-row { grid-template-columns: 140px minmax(0, 1fr); }
  .xp-row .xp-desc-wrap { grid-column: 2; }
  .xp-go { display: none; }
  .xp-entry { grid-template-columns: 1fr; gap: 20px; }
  .xp-meta { grid-auto-flow: column; justify-content: start; align-items: center; gap: 16px; }
  .tiers { grid-template-columns: 1fr; }
  .tier, .tier + .tier { padding: 32px 0 8px; border-left: 0; }
  .tier + .tier { border-top: 1px solid var(--line-strong); }
  .cs-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .pj-list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog { justify-self: start; margin-top: 16px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .next-project { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-meta { text-align: left; justify-self: start; }
  .facts, .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .num:nth-child(3) { padding-left: 0; border-left: 0; }
  .num { border-top: 1px solid var(--line); }
  .intro-body, .story-cols { columns: 1; }
  .three { grid-template-columns: 1fr; }
  .three li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .xp-row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .xp-row .xp-desc-wrap { grid-column: auto; }
  .xp-when { padding-top: 0; }
  .xp-row::before { inset: 0 -12px; }
  .path { grid-template-columns: 1fr; padding-top: 0; padding-left: 40px; gap: 40px; }
  .path::before, .path::after { top: 6px; left: 7px; width: 2px; height: auto; bottom: 0; }
  .path::before { right: auto; background-image: linear-gradient(180deg, var(--line-strong) 50%, transparent 50%); background-size: 2px 10px; }
  .path::after { width: 2px; height: 0; bottom: auto; transition: height 2.2s var(--ease) .3s; }
  .path.in::after { width: 2px; height: 62%; }
  .station { padding-right: 0; }
  .st-year { position: static; display: block; }
  .st-dot { top: 2px; left: -40px; }
  .here { top: -4px; left: auto; right: 0; }
  .here::after { display: none; }
  .questions li { grid-template-columns: 1fr; gap: 6px; }
  .q-note { grid-template-rows: 1fr; opacity: 1; }
  .q-note > span { padding-top: 8px; }
  .approach, .offclock { grid-template-columns: 1fr 1fr; gap: 12px; }
  .step { min-height: 280px; padding: 22px; }
  .step-glyph { width: 40px; height: 40px; top: 22px; right: 22px; }
  .also { grid-template-columns: 1fr; }
  .also li { grid-template-columns: 56px 1fr; }
  .also li span:last-child { grid-column: 2; text-align: left; }
  .pj-row { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 14px; padding: 24px 0; }
  .pj-cat, .pj-year { display: none; }
  .pj-go { width: 40px; height: 40px; }
  .is-grid .pj-cat, .is-grid .pj-year { display: block; }
  .pj-list.is-grid { grid-template-columns: 1fr; }
  .steps, .results, .learned { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { right: 50%; top: auto; bottom: -11px; translate: 50% 0; content: "↓"; }
  .arch { flex-direction: column; }
  .arch-node { flex: none; }
  .arch-link { flex: 0 0 24px; width: 1px; height: 24px; align-self: center; }
  .arch-link::after { right: -3px; top: auto; bottom: 0; border: 3.5px solid transparent; border-top: 5px solid var(--line-strong); border-bottom: 0; }
  .form { grid-template-columns: 1fr; }
  .details > div { grid-template-columns: 1fr; gap: 6px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .toolkit { grid-template-columns: 1fr; }
  .venn-cap { grid-template-columns: 1fr; }
  .venn-cap .mono { grid-row: auto; }
  .catalog { padding-left: 42px; }
  .catalog dl > div { grid-template-columns: 78px 1fr; }
}
@media screen and (max-width: 760px) {
  .cv-sheet { padding: 22px 18px; font-size: 10.5pt; }
  .cv-sec { grid-template-columns: 1fr; gap: 2mm; }
  .cv-head { grid-template-columns: 1fr; }
  .cv-mono-badge { display: none; }
  .cv-item-head { flex-direction: column; gap: 0; }
  .cv-skills div { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 359px) { .brand-name { display: none; } }
@media (max-width: 420px) {
  .approach, .offclock { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .split .w > span { transform: none; }
  .hl { background-size: 100% 62%; }
}

/* ==========================================================================
   PRINT — only the CV sheet prints, exactly one A4 page
   ========================================================================== */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body::after, .site-header, .mobile-menu, .skip, .cv-toolbar, .cv-note, .site-footer, .progress { display: none !important; }
  .cv-page { padding: 0; background: #fff; min-height: 0; }
  .cv-sheet { width: 210mm; min-height: 0; margin: 0; padding: 12mm 15mm 9mm; box-shadow: none; border-radius: 0; font-size: 8.85pt; line-height: 1.4; }
  .cv-head { padding-bottom: 4mm; }
  .cv-head h1 { font-size: 28pt; }
  .cv-sec { padding: 3mm 0; }
  .cv-item + .cv-item { margin-top: 2.4mm; }
  .cv-item ul { margin-top: .6mm; gap: .3mm; }
  .cv-skills { gap: .8mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: none; }
}
