/* Layout: a restrained, classic résumé-page. Paper and ink, one royal blue for team work and one brass
   for founder work. Ornament is removed; meaning is carried by the animated figures beside each claim. */
:root {
  --paper: #fbfbf9;
  --panel: #ffffff;
  --ink: #111a2b;
  --ink-2: #3c4658;
  --mute: #6b7381;
  --rule: #e4e6ea;
  --rule-2: #d3d7de;
  --royal: #1f3f94;
  --royal-soft: rgba(31, 63, 148, 0.08);
  --brass: #9a6a12;
  --brass-soft: rgba(154, 106, 18, 0.1);
  --ok: #2e7a4f;
  --bad: #a3392b;
  --shadow: 0 1px 2px rgba(17, 26, 43, 0.04), 0 12px 32px -18px rgba(17, 26, 43, 0.18);

  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --t-hero: clamp(2.9rem, 1.6rem + 5vw, 5.4rem);
  --t-h2: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  --t-h3: clamp(1.5rem, 1.25rem + 0.9vw, 1.95rem);
  --gutter: clamp(16px, 4.5vw, 48px);
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1120; --panel: #101a2e; --ink: #eceff4; --ink-2: #b9c1ce; --mute: #8892a3;
    --rule: #1e2a40; --rule-2: #2a3853; --royal: #93b1ff; --royal-soft: rgba(147, 177, 255, 0.1);
    --brass: #d9aa56; --brass-soft: rgba(217, 170, 86, 0.12); --ok: #6cc290; --bad: #e57d6d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b1120; --panel: #101a2e; --ink: #eceff4; --ink-2: #b9c1ce; --mute: #8892a3;
  --rule: #1e2a40; --rule-2: #2a3853; --royal: #93b1ff; --royal-soft: rgba(147, 177, 255, 0.1);
  --brass: #d9aa56; --brass-soft: rgba(217, 170, 86, 0.12); --ok: #6cc290; --bad: #e57d6d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color 0.4s, color 0.4s; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--royal); color: var(--paper); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p, dl, dd, ul { margin: 0; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.01em; }
.muted { color: var(--mute); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--royal); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Controls ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 4px; font: 500 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease); }
.btn .arr { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--royal); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.86rem; }
.btn-sm .arr { width: 14px; height: 14px; }
.btn-sm:hover .arr { transform: translate(2px, -2px); }

.icon-btn { width: 44px; height: 44px; border-radius: 4px; border: 1px solid var(--rule-2); background: none; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; transition: border-color 0.3s, color 0.3s, background-color 0.3s; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; grid-area: 1 / 1; transition: opacity 0.35s, transform 0.5s var(--ease); }
.icon-btn .fill { fill: currentColor; stroke: none; }
#theme .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="dark"] #theme .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] #theme .i-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme .i-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) #theme .i-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
}
.text-link { display: inline-block; color: var(--royal); text-decoration: none; font-weight: 500; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 9px) / 0 1px no-repeat; padding-block: 9px; transition: background-size 0.45s var(--ease); width: fit-content; }
.text-link:hover { background-size: 100% 1px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 97%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; min-width: 44px; text-decoration: none; font: 500 1rem var(--serif); }
.mono-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 500 0.82rem var(--serif); letter-spacing: 0.04em; border-radius: 3px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { position: relative; text-decoration: none; color: var(--ink-2); font-size: 0.9rem; padding-block: 8px; transition: color 0.25s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .icon-btn { width: 40px; height: 40px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) 0; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(32px, 6vw, 80px); align-items: end; }
.overline { display: inline-flex; align-items: center; gap: 10px; font: 500 0.85rem var(--sans); color: var(--ink-2); }
.overline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.display { font: 500 var(--t-hero)/1.02 var(--serif); letter-spacing: -0.02em; margin-top: 22px; }
.hero-role { font: 400 clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem)/1.4 var(--serif); color: var(--ink-2); margin-top: 18px; }
.hero-role strong { color: var(--ink); font-weight: 500; }
.lede { font-size: 1.06rem; color: var(--ink-2); max-width: 38em; margin-top: 16px; line-height: 1.7; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero-copy { padding-bottom: clamp(32px, 4vw, 48px); }
.socials { display: inline-flex; gap: 8px; }
.portrait { position: relative; margin: 0 0 -1px; justify-self: end; align-self: end; width: 100%; max-width: 400px; }
/* The cut-out figure always stands in a soft pool of light that fades into the page with no edge.
   Light theme: an ink wash, so the dark jacket dissolves into ink, not grey. Dark theme: a blue glow. */
.portrait-glow { position: absolute; inset: 2% -12% 6% -12%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side at 50% 55%, rgba(31, 63, 148, 0.14), rgba(31, 63, 148, 0.06) 50%, rgba(31, 63, 148, 0.02) 78%, transparent 100%); }
.portrait-art { position: relative; }
.portrait picture { display: block; }
.portrait img { width: 100%; height: auto; display: block; }
/* Light theme: soften the near-black jacket against white paper and give the figure a quiet ground shadow. */
:root:not([data-theme="dark"]) .portrait img { filter: contrast(0.92) brightness(1.06) saturate(0.96) drop-shadow(0 18px 28px rgba(17, 26, 43, 0.10)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .portrait img { filter: none; } }
:root[data-theme="dark"] .portrait-glow { inset: 4% -10% auto -10%; aspect-ratio: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--royal) 16%, transparent), color-mix(in srgb, var(--royal) 5%, transparent) 60%, transparent); }
:root[data-theme="dark"] .portrait img { -webkit-mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.6) 78%, transparent 99%); mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.6) 78%, transparent 99%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .portrait-glow { inset: 4% -10% auto -10%; aspect-ratio: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--royal) 16%, transparent), color-mix(in srgb, var(--royal) 5%, transparent) 60%, transparent); }
  :root:not([data-theme="light"]) .portrait img { -webkit-mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.6) 78%, transparent 99%); mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.6) 78%, transparent 99%); }
}
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; border-block: 1px solid var(--rule); position: relative; }
.ledger > div { padding: 22px 20px 22px 0; display: grid; gap: 6px; align-content: start; }
.ledger > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.ledger dt { font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.ledger dd { display: grid; gap: 2px; }
.ledger b { font: 500 1.2rem/1.3 var(--serif); }
.ledger span { font-size: 0.86rem; color: var(--ink-2); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding-top: 26px; }
.metrics > div { display: flex; align-items: baseline; gap: 10px; padding-right: 20px; }
.metrics > div + div { padding-left: 20px; }
.metrics dt { font: 500 1.6rem/1 var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.metrics dd { margin: 0; font-size: 0.88rem; color: var(--mute); }
@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .metrics > div:nth-child(3) { padding-left: 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 120px) 0; }
.sec-head { display: grid; gap: 12px; max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.kicker { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--royal); }
.kicker.brass { color: var(--brass); }
.sec-head h2 { font: 500 var(--t-h2)/1.12 var(--serif); letter-spacing: -0.015em; }
.sec-sub { color: var(--ink-2); font-size: 1.06rem; max-width: 40em; }
.split-h .line-mask { overflow: hidden; }

/* Principle band: one deliberately dark band in both themes */
.principle-band { background: #0d1526; color: #eceff4; margin-top: clamp(64px, 8vw, 110px); border-block: 1px solid #1e2a40; }
.pb-pin { min-height: 92vh; display: flex; align-items: center; padding-block: 64px; }
.pb-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 64px); align-items: center; width: 100%; }
.pb-kicker { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #d9aa56; margin-bottom: 18px; }
.pb-lines { font: 500 clamp(1.6rem, 1rem + 1.4vw, 2.15rem)/1.22 var(--serif); letter-spacing: -0.015em; }
.pb-lines span { display: block; }
@media (min-width: 981px) { .pb-lines span { white-space: nowrap; } }
.pb-lines span:nth-child(1) { color: #d9aa56; }
.pb-lines span:nth-child(4), .pb-lines span:nth-child(5) { color: #93b1ff; }
.pb-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pb-svg .tangle { fill: none; stroke: #8892a3; stroke-width: 1.2; }
.pb-svg .essential { fill: none; stroke: #d9aa56; stroke-width: 3; stroke-linecap: round; }
.pb-svg .node { fill: #0d1526; stroke: #eceff4; stroke-width: 2; }
.pb-svg .key { fill: #d9aa56; }
.pb-svg text { font-family: var(--mono); font-weight: 500; fill: #b9c1ce; letter-spacing: 0.04em; }
.pb-svg text.acc { fill: #8892a3; }
.pb-svg text.ess { fill: #d9aa56; }
@media (max-width: 980px) {
  .pb-pin { min-height: 0; padding-block: 56px; }
  .pb-inner { grid-template-columns: 1fr; }
}

/* Figures */
.fig-frame, .fig { margin: 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; }
.fig { display: grid; }
.fig svg.f { display: block; width: 100%; height: auto; }
.fig .fig-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.fig .fig-title { font: 500 0.75rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.replay { font: 500 0.75rem var(--mono); color: var(--ink-2); background: none; border: 1px solid var(--rule-2); border-radius: 3px; padding: 6px 12px; min-height: 36px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: border-color 0.25s, color 0.25s; }
.replay:hover { border-color: var(--ink); color: var(--ink); }
.replay svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.cap { padding: 12px 16px 14px; border-top: 1px solid var(--rule); font: italic 400 0.92rem/1.5 var(--serif); color: var(--ink-2); }
.cap-n, .fig .cap::before { font: normal 500 0.75rem var(--mono); letter-spacing: 0.04em; color: var(--mute); margin-right: 8px; }
body { counter-reset: fig 1; }
.fig { counter-increment: fig; }
.fig .cap::before { content: "Fig. " counter(fig); }

/* SVG figure vocabulary: every figure draws with these classes so both themes work. */
.f .ln { fill: none; stroke: var(--rule-2); stroke-width: 1.2; }
.f .ln-ink { fill: none; stroke: var(--ink-2); stroke-width: 1.2; }
.f .ln-royal { fill: none; stroke: var(--royal); stroke-width: 1.6; }
.f .ln-brass { fill: none; stroke: var(--brass); stroke-width: 1.6; }
.f .ln-ok { fill: none; stroke: var(--ok); stroke-width: 1.6; }
.f .ln-bad { fill: none; stroke: var(--bad); stroke-width: 1.6; }
.f .dash { stroke-dasharray: 3 4; }
.f .box { fill: var(--panel); stroke: var(--rule-2); stroke-width: 1; }
.f .box-royal { fill: var(--royal-soft); stroke: var(--royal); stroke-width: 1; }
.f .box-brass { fill: var(--brass-soft); stroke: var(--brass); stroke-width: 1; }
.f .fill-royal { fill: var(--royal); } .f .fill-brass { fill: var(--brass); } .f .fill-ok { fill: var(--ok); }
.f .fill-bad { fill: var(--bad); } .f .fill-mute { fill: var(--rule-2); } .f .fill-ink { fill: var(--ink); } .f .fill-panel { fill: var(--panel); }
.f text { font-family: var(--mono); font-size: 12px; fill: var(--ink-2); }
@media (max-width: 600px) { .f text { font-size: 13px; } }
.f text.t-ink { fill: var(--ink); font-weight: 500; }
.f text.t-mute { fill: var(--mute); }
.f text.t-royal { fill: var(--royal); } .f text.t-brass { fill: var(--brass); } .f text.t-ok { fill: var(--ok); } .f text.t-bad { fill: var(--bad); }
.f text.t-big { font-family: var(--serif); font-size: 26px; font-weight: 500; fill: var(--ink); }
.f text.t-mid { font-family: var(--serif); font-size: 14px; font-weight: 500; fill: var(--ink); }

/* Trace (Fig. 1) */
.trace-scroll { overflow-x: auto; }
.trace-grid { min-width: 700px; position: relative; padding: 8px 0 14px; }
.trow { display: grid; grid-template-columns: 220px 1fr; align-items: center; min-height: 48px; padding-inline: 20px; transition: background-color 0.25s; }
.trow:hover { background: color-mix(in srgb, var(--royal) 4%, transparent); }
.trow .who { display: grid; line-height: 1.25; min-width: 0; }
.trow .who b { font: 500 1rem var(--serif); }
.trow .who span { font-size: 0.76rem; color: var(--mute); }
.trow .lane { position: relative; height: 12px; }
.span { position: absolute; top: 2px; height: 8px; border-radius: 2px; background: var(--royal); transform-origin: 0 50%; }
.span.f { background: var(--brass); }
.span.ed { background: var(--rule-2); }
.span.live::after { content: ""; position: absolute; right: -4px; top: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; color: inherit; box-sizing: border-box; background: var(--panel); }
.span.live { color: var(--royal); } .span.live.f { color: var(--brass); }
.tgroup { position: relative; z-index: 1; background: var(--panel); padding: 14px 20px 4px; font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--royal); }
.tgroup.brass { color: var(--brass); }
.taxis { display: grid; grid-template-columns: 220px 1fr; padding-inline: 20px; height: 30px; }
.taxis .k { font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); padding-top: 6px; }
.taxis .ticks { position: relative; }
.taxis .ticks span { position: absolute; transform: translateX(-50%); font: 400 0.75rem var(--mono); color: var(--mute); top: 5px; }
.gridline { position: absolute; top: 38px; bottom: 14px; width: 1px; background: var(--rule); pointer-events: none; }

/* Experience */
.company { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding-block: 40px; border-top: 1px solid var(--rule); }
.co-head { display: grid; gap: 4px; align-content: start; position: sticky; top: 96px; }
.co-head h3 { font: 500 var(--t-h3)/1.15 var(--serif); }
.co-role { font-weight: 500; }
.co-meta { color: var(--mute); }
.co-note { margin-top: 6px; font-size: 0.85rem; line-height: 1.5; color: var(--ink-2); max-width: 24ch; }
.claims { display: grid; gap: 36px; min-width: 0; }
.claim { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
.claim-text { display: grid; gap: 8px; padding-top: 6px; }
.claim-text h4 { font: 600 1rem var(--sans); }
.claim-text p { color: var(--ink-2); line-height: 1.7; }
.claim-text strong { color: var(--ink); font-weight: 600; }
.claim-text .num { font-family: var(--serif); font-weight: 600; color: var(--royal); }

/* Ventures */
.venture { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(24px, 5vw, 64px); padding-block: 48px; border-top: 1px solid var(--rule); align-items: center; }
.v-copy { display: grid; gap: 16px; min-width: 0; align-content: start; }
.v-meta { color: var(--brass); }
.v-copy h3 { font: 500 clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem)/1.1 var(--serif); }
.v-what { font-size: 1.08rem; }
.v-why { font-size: 0.95rem; color: var(--ink-2); line-height: 1.55; }
.v-why span { display: block; font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-bottom: 2px; }
.v-results { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 14px; }
.v-results li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--brass); }
.v-results b { font: 600 1rem/1.35 var(--sans); color: var(--ink); }
.v-results span { font-size: 0.9rem; line-height: 1.5; color: var(--mute); }
.v-stack { color: var(--mute); }
.v-visual { display: grid; gap: 16px; min-width: 0; }

/* How I build */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.steps li { position: relative; padding: 28px 22px 26px 0; display: grid; gap: 8px; align-content: start; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--rule); }
.steps li::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--royal); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.8s var(--ease); }
.steps li.on::before { transform: scaleX(1); }
.step-n { font: 500 0.75rem var(--mono); color: var(--royal); letter-spacing: 0.06em; }
.steps h4 { font: 500 1.15rem/1.25 var(--serif); }
.steps p { color: var(--ink-2); font-size: 0.9rem; line-height: 1.6; }
.toolkit { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: 200px 1fr; gap: 16px 40px; }
.toolkit h3 { font: 500 1.4rem var(--serif); }
.toolkit dl { margin: 0; display: grid; }
.toolkit dl div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding-block: 12px; border-top: 1px solid var(--rule); }
.toolkit dl div:last-child { border-bottom: 1px solid var(--rule); }
.toolkit dt { font-weight: 600; font-size: 0.92rem; }
.toolkit dd { margin: 0; color: var(--ink-2); font-size: 0.92rem; line-height: 1.6; }
@media (max-width: 980px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .toolkit { grid-template-columns: 1fr; }
}
@media (max-width: 720px) { .toolkit dl div { grid-template-columns: 1fr; gap: 4px; } }

/* Problem solving */
.cp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.cp-list { list-style: none; padding: 0; display: grid; }
.cp-list li > a, .cp-list li.award { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding-block: 16px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.cp-list li:first-child > a { border-top: 1px solid var(--rule); }
.cp-list span { font-weight: 600; }
.cp-list b { font: 500 1.25rem var(--serif); text-align: right; grid-row: span 2; align-self: center; }
.cp-list em { font-style: normal; font-size: 0.86rem; color: var(--mute); }
.cp-list a { transition: padding 0.4s var(--ease); }
.cp-list a:hover { padding-left: 8px; }
.cp-list a:hover span { color: var(--royal); }

/* Contact */
.contact { margin-top: clamp(80px, 10vw, 140px); padding-block: clamp(64px, 8vw, 110px); border-top: 1px solid var(--rule); background: var(--panel); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.display-2 { font: 500 clamp(2.2rem, 1.5rem + 3vw, 3.6rem)/1.08 var(--serif); letter-spacing: -0.02em; margin-top: 12px; }
.contact-lede { margin-top: 16px; font: 400 1.15rem/1.5 var(--serif); color: var(--ink-2); max-width: 32em; }
.facts-list { margin-top: 28px; }
.facts-list div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding-block: 12px; border-top: 1px solid var(--rule); }
.facts-list dt { font: 500 0.75rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); padding-top: 3px; }
.direct { margin-top: 24px; display: grid; gap: 10px; }
.copy-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy-row .mono { color: var(--mute); width: 48px; }
.copy-row code { font: 500 0.95rem var(--sans); user-select: all; overflow-wrap: anywhere; }
.copy { font: 500 0.75rem var(--mono); border: 1px solid var(--rule-2); background: none; color: var(--ink-2); border-radius: 3px; padding: 6px 10px; min-height: 32px; cursor: pointer; transition: border-color 0.25s, color 0.25s; }
.copy:hover { border-color: var(--ink); color: var(--ink); }

.composer { border: 1px solid var(--rule); border-radius: 4px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; align-content: start; background: var(--paper); }
.composer h3 { font: 500 1.4rem var(--serif); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 0.82rem; font-weight: 500; color: var(--ink-2); }
.field input:not([type="radio"]) { min-height: 46px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 4px; background: var(--panel); color: var(--ink); font: 400 0.95rem var(--sans); width: 100%; transition: border-color 0.25s, box-shadow 0.25s; }
.field input:not([type="radio"]):focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
.preview { margin: 0; font: 400 0.8rem/1.65 var(--mono); color: var(--ink-2); background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 14px; white-space: pre-wrap; min-height: 120px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toast { font-size: 0.85rem; color: var(--ok); }

.foot { border-top: 1px solid var(--rule); padding-block: 26px; }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--mute); font-size: 0.88rem; }

/* ---------- Motion start states (only when JS and motion are allowed) ---------- */
.anim [data-in], .anim [data-reveal] { opacity: 0; transform: translateY(18px); }
.anim:not(.anim-ready) .display, .anim:not(.anim-ready) .split-h { visibility: hidden; }
.anim .portrait-art, .anim .portrait-glow { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { justify-self: center; max-width: 320px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .company, .venture, .cp-grid, .contact-grid, .modes { grid-template-columns: 1fr; }
  .co-head { position: static; }
}
@media (max-width: 720px) {
  .nav-links, .brand > span:last-child { display: none; }
  .nav-actions { margin-left: auto; }
  .claim { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .facts-list div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 440px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Touch devices: every control at least 44px, per Apple and WCAG target-size guidance. */
@media (pointer: coarse), (max-width: 720px) {
  .nav-actions .icon-btn { width: 44px; height: 44px; }
  .btn-sm { min-height: 44px; }
  .replay { min-height: 44px; padding-inline: 14px; }
  .copy { min-height: 44px; padding-inline: 14px; }
  .text-link { padding-block: 12px; background-position: 0 calc(100% - 12px); }
}

/* Tablets: keep the full menu on one line */
@media (max-width: 1023px) and (min-width: 721px) {
  .brand > span:last-child { display: none; }
  .nav-inner { gap: 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.86rem; }
}

/* Phones: stack each result (number over label) and fit the career trace to the screen, no sideways scroll */
@media (max-width: 720px) {
  .metrics > div { display: grid; gap: 4px; align-content: start; }
  .metrics dt { font-size: 1.5rem; }
  .trace-grid { min-width: 0; }
  .trow, .taxis { grid-template-columns: 112px 1fr; padding-inline: 14px; }
  .trow .who b { font-size: 0.92rem; }
  .trow .who span { font-size: 0.75rem; }
  .tgroup { padding-inline: 14px; line-height: 1.5; }
  .taxis .ticks span { font-size: 0.75rem; }
}
