/* ==========================================================================
   Aramis Lopez · portfolio & résumé
   Editorial system: bone paper, ink, one blue for annotation. Serif for
   reading, grotesk for labels, mono only for machine values.
   ========================================================================== */

:root {
  --paper: #F2EEE5;
  --paper-2: #EAE5D9;
  --paper-3: #E0D9CA;
  --card: #F8F5EF;
  --ink: #16140F;
  --ink-2: #3B372F;
  --ink-3: #665F54;
  --ink-4: #8F877A;
  --rule: #D7D0C2;
  --rule-2: #BCB3A2;
  --blue: #2B3FC8;
  --blue-soft: rgba(43, 63, 200, .09);
  --green: #1D6A43;
  --green-soft: rgba(29, 106, 67, .12);
  --red: #AE3A20;
  --red-soft: rgba(174, 58, 32, .1);
  --shadow: 0 1px 1px rgba(22, 20, 15, .05), 0 18px 40px -18px rgba(22, 20, 15, .32);
  --grain: url("/assets/tex/grain.png");

  --f-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1360px;
  --col-gap: clamp(16px, 2vw, 28px);
  --mast-h: 56px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #121110;
  --paper-2: #1A1916;
  --paper-3: #24221E;
  --card: #1D1B18;
  --ink: #EEE9DF;
  --ink-2: #CCC5B8;
  --ink-3: #9D9588;
  --ink-4: #776F63;
  --rule: #2E2B26;
  --rule-2: #474138;
  --blue: #97A4FF;
  --blue-soft: rgba(151, 164, 255, .12);
  --green: #66C592;
  --green-soft: rgba(102, 197, 146, .14);
  --red: #E58368;
  --red-soft: rgba(229, 131, 104, .13);
  --shadow: 0 1px 1px rgba(0, 0, 0, .35), 0 20px 44px -18px rgba(0, 0, 0, .75);
  --grain: url("/assets/tex/grain-dark.png");
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--mast-h) + 12px);
}
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 220px;
  color: var(--ink);
  font: 400 18px/1.62 var(--f-serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
@media (max-width: 600px) { body { font-size: 17px; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
em { font-style: italic; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.page { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.num { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.muted { color: var(--ink-3); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font: 600 14px var(--f-sans); text-decoration: none;
}
.skip:focus { top: 12px; }

.kicker {
  font: 600 11.5px/1.3 var(--f-sans);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker--rule { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kicker--rule::after { content: ""; flex: 1; height: 1px; background: var(--rule-2); transform-origin: left; }

/* underline that retracts and redraws on hover */
.link {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 1px;
  transition: color .25s;
}
.link:hover { color: var(--blue); animation: relink .7s var(--ease); }
@keyframes relink {
  0% { background-position: 100% 100%; background-size: 100% 1px; }
  45% { background-position: 100% 100%; background-size: 0 1px; }
  46% { background-position: 0 100%; background-size: 0 1px; }
  100% { background-position: 0 100%; background-size: 100% 1px; }
}

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot--live { background: var(--green); position: relative; }
.motion .dot--live::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid var(--green); opacity: 0; animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(2.1); opacity: 0; } }

/* buttons: sharp corners, a blue wash rises from the bottom on hover */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 14px/1 var(--f-sans); letter-spacing: .02em;
  padding: 16px 20px; min-height: 48px;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  text-decoration: none; cursor: pointer;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue); transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .5s var(--ease);
}
.btn:hover { color: #fff; border-color: var(--blue); }
.btn:hover::before { transform: scaleY(1); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover svg { transform: translateY(2px); }
.btn--sm { padding: 12px 16px; min-height: 44px; font-size: 13px; }
:root[data-theme="dark"] .btn:hover { color: #0d0d10; }

/* ==========================================================================
   Running head
   ========================================================================== */
.mast {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--mast-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  backdrop-filter: saturate(1.1) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.mast__in { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.mast__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; min-height: 44px; }
.mast__mono {
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid var(--ink); font: italic 400 19px/1 var(--f-serif); padding-bottom: 2px;
  transition: background .3s, color .3s;
}
.mast__brand:hover .mast__mono { background: var(--ink); color: var(--paper); }
.mast__name { font: 600 13px/1 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; }
.mast__section { display: flex; align-items: baseline; gap: 10px; font: 600 11.5px/1 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.mast__no { color: var(--blue); font-variant-numeric: tabular-nums; }
.mast__label { display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; min-width: 11ch; }
.mast__label-in { display: block; }
.mast__right { justify-self: end; display: flex; align-items: center; gap: 6px; }
.mast__market { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; font: 600 11.5px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.mast__market .dot { width: 6px; height: 6px; }
.mast__market.is-open .dot { background: var(--green); }
.mast__clock { letter-spacing: .04em; }
.mast__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  background: transparent; border: 1px solid transparent; cursor: pointer;
  font: 600 11.5px/1 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  transition: border-color .3s, background .3s;
}
.mast__btn:hover { border-color: var(--rule-2); }
.mast__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.burger { display: inline-grid; gap: 4px; width: 16px; }
.burger i { display: block; height: 1.5px; background: currentColor; transition: transform .45s var(--ease); }
.mast__btn[aria-expanded="true"] .burger i:first-child { transform: translateY(2.75px) rotate(45deg); }
.mast__btn[aria-expanded="true"] .burger i:last-child { transform: translateY(-2.75px) rotate(-45deg); }
.mast__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.mast__progress i { display: block; height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 1080px) { .mast__market { display: none; } }
@media (max-width: 760px) {
  .mast__name { display: none; }
  .mast__in { grid-template-columns: auto 1fr auto; }
  .mast__section { justify-self: start; }
  .mast__btn-txt { display: none; }
  .mast__btn { padding: 0 10px; min-width: 44px; min-height: 44px; justify-content: center; }
}

/* ---------- contents overlay ---------- */
.contents {
  position: fixed; inset: var(--mast-h) 0 0; z-index: 55;
  background: var(--paper); background-image: var(--grain); background-size: 220px;
  overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-io);
}
.contents.is-open { clip-path: inset(0 0 0 0); }
.contents__in { padding: clamp(28px, 6vh, 64px) 0 48px; }
.contents__list { margin-top: 22px; border-top: 1px solid var(--rule-2); counter-reset: c; }
.contents__list li { border-bottom: 1px solid var(--rule); }
.contents__list a {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 16px;
  padding: clamp(14px, 2.4vh, 22px) 0; text-decoration: none;
  transition: color .3s;
}
/* Slide the number and title with a transform; animating padding would re-run layout every frame. */
.contents__list a > span:not(.contents__d) { transition: transform .45s var(--ease); }
.contents__list a:hover { color: var(--blue); }
.contents__list a:hover > span:not(.contents__d) { transform: translateX(14px); }
.contents__list .num { font: 600 12px var(--f-sans); letter-spacing: .12em; color: var(--blue); }
.contents__t { font-weight: 300; font-size: clamp(2rem, 5.5vw, 4.4rem); line-height: 1; letter-spacing: -.035em; }
.contents__d { font: 500 14px var(--f-sans); color: var(--ink-3); text-align: right; }
.contents__foot { margin-top: 28px; font-size: 1.05rem; }
.contents__foot a { color: var(--ink); }
@media (max-width: 760px) {
  .contents__list a { grid-template-columns: 40px 1fr; }
  .contents__d { display: none; }
}

/* ==========================================================================
   Cover
   ========================================================================== */
.cover {
  min-height: 100svh;
  padding: calc(var(--mast-h) + clamp(24px, 5vh, 56px)) 0 clamp(28px, 5vh, 56px);
  display: flex; flex-direction: column; justify-content: center;
}
.cover__rail { display: flex; align-items: center; gap: 18px; }
.cover__rule { flex: 1; height: 1px; background: var(--rule-2); transform-origin: left; }
.cover__name {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .16em;
  margin: clamp(10px, 2.5vh, 30px) 0 clamp(34px, 6.5vh, 68px);
  font-weight: 300; font-size: clamp(4.4rem, 15.2vw, 15rem); line-height: .86; letter-spacing: -.045em;
  font-variation-settings: "opsz" 60;
}
.cover__first, .cover__last { display: inline-block; }
.cover__last { font-style: italic; letter-spacing: -.04em; }
.cover__name .char { display: inline-block; will-change: transform; }

.cover__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 40px; align-items: start; }
.cover__intro { grid-column: 1 / span 5; }
.cover__fig { grid-column: 7 / -1; }
.cover__lede { font-size: clamp(1.15rem, 1.55vw, 1.42rem); line-height: 1.5; color: var(--ink-2); max-width: 40ch; }
.cover__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 30px; }
.cover__cta .link { font: 600 14px/1 var(--f-sans); letter-spacing: .02em; padding-block: 6px 5px; }
.cover__now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; font: 500 14px/1.4 var(--f-sans); color: var(--ink-2); }
.cover__now span { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11.5px; color: var(--green); }
.cover__next {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; margin-top: clamp(28px, 5vh, 56px);
  font: 600 11.5px/1 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); text-decoration: none;
  min-height: 44px;
}
.cover__next svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.motion .cover__next svg { animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(4px); } }
.cover__next:hover { color: var(--blue); }

@media (max-width: 960px) {
  .cover__intro, .cover__fig { grid-column: 1 / -1; }
  .cover { min-height: auto; }
}

/* hold the cover until the intro timeline takes over */
.motion.js:not(.ready) .cover__rail,
.motion.js:not(.ready) .cover__name,
.motion.js:not(.ready) .cover__lede,
.motion.js:not(.ready) .cover__cta,
.motion.js:not(.ready) .cover__now,
.motion.js:not(.ready) .cover__fig,
.motion.js:not(.ready) .cover__next { visibility: hidden; }

/* ---------- figures ---------- */
.fig { margin: 0; }
.fig__head {
  display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font: 600 11.5px/1.2 var(--f-sans); letter-spacing: .12em; text-transform: uppercase;
}
.fig__no { color: var(--blue); }
.fig__title { color: var(--ink); }
.fig__meta { margin-left: auto; color: var(--ink-3); letter-spacing: .06em; }
.fig__cap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px;
  font: 500 13px/1.45 var(--f-sans); color: var(--ink-3);
}
.fig__cap .fig__no { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 11.5px; margin-right: 8px; }
.fig__src { margin-left: auto; }
.key { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.key__line { width: 18px; height: 2px; background: var(--ink); }
.key__line--blue { background: var(--blue); }
.fig__head .fig__no, .fig__head .fig__title { white-space: nowrap; }
@media (max-width: 600px) {
  .fig__src { margin-left: 0; }
  .fig__head { flex-wrap: wrap; row-gap: 6px; }
  .fig__meta { flex-basis: 100%; margin-left: 0; order: 3; }
}

/* ---------- charts (drawn by app.js) ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart--commits { height: clamp(230px, 34vh, 360px); touch-action: pan-y; }
.axis-t { font: 500 11px var(--f-sans); fill: var(--ink-3); letter-spacing: .04em; }
.axis-l { stroke: var(--rule); stroke-width: 1; }
.axis-base { stroke: var(--rule-2); stroke-width: 1; }
.s-human { stroke: var(--ink); stroke-width: 1.8; fill: none; }
.s-bot { stroke: var(--blue); stroke-width: 1.8; fill: none; }
.a-human { fill: var(--ink); opacity: .035; }
.a-bot { fill: var(--blue); opacity: .045; }
.end-dot { stroke: var(--paper); stroke-width: 2; }
.end-dot--human { fill: var(--ink); }
.end-dot--bot { fill: var(--blue); }
.end-label { font: 300 26px var(--f-serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; }
.end-label--human { fill: var(--ink); }
.end-label--bot { fill: var(--blue); }
.note-tick { stroke: var(--blue); stroke-width: 1; stroke-dasharray: 2 3; }
.note-t { font: italic 400 14px var(--f-serif); fill: var(--blue); }
.cross { stroke: var(--ink-3); stroke-width: 1; }
.cross-dot { stroke: var(--paper); stroke-width: 2; }
.tip {
  position: absolute; top: 0; left: 0; z-index: 3; pointer-events: none;
  padding: 9px 11px; background: var(--ink); color: var(--paper);
  font: 500 12px/1.5 var(--f-sans); white-space: nowrap;
  opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s;
}
.tip.is-on { opacity: 1; transform: none; }
.tip b { font-weight: 700; }
.tip .tip__d { display: block; letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; opacity: .75; }
.tip .sw { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.sec { padding: clamp(96px, 15vh, 168px) 0; position: relative; }
.sec__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); margin-bottom: clamp(44px, 7vh, 88px); }
.sec__no { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; font: 600 12px/1 var(--f-sans); letter-spacing: .14em; color: var(--blue); }
.sec__rule { flex: 1; height: 1px; background: var(--rule-2); transform-origin: left; }
.sec__title {
  grid-column: 1 / -1; margin-top: .2em;
  font-weight: 300; font-size: clamp(3rem, 8.6vw, 8.4rem); line-height: .9; letter-spacing: -.045em;
  font-variation-settings: "opsz" 60;
}
.sec__dek { grid-column: 7 / -1; margin-top: clamp(22px, 3vh, 36px); font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 960px) { .sec__dek { grid-column: 1 / -1; } }

/* SplitText wraps each line in "<class>-mask" with overflow: clip. Pad the mask so
   descenders and italic overhangs survive tight display line-heights. */
.split-line-mask { padding: 0 .1em .16em; margin: 0 -.1em -.16em; }

/* ---------- 01 brief ---------- */
.brief__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 56px; }
.brief__text { grid-column: 1 / span 7; }
.brief__ledger { grid-column: 9 / -1; }
.brief__lede { font-size: clamp(1.35rem, 2.2vw, 2.05rem); line-height: 1.34; letter-spacing: -.012em; font-weight: 350; max-width: 35ch; }
.facts { margin-top: clamp(36px, 5vh, 56px); border-top: 1px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 600 11.5px/1.9 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { font-size: 1.02rem; }
.ledger { border-top: 1px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
.ledger__l { font: 500 14px/1.45 var(--f-sans); color: var(--ink-2); max-width: 30ch; }
.ledger__v { font-weight: 300; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: .9; letter-spacing: -.03em; white-space: nowrap; }
.ledger__v b { font-weight: inherit; }
@media (max-width: 960px) {
  .brief__text, .brief__ledger { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- 02 work: flagship ---------- */
.work { padding-bottom: clamp(64px, 10vh, 120px); }
.flag {
  position: relative; background: var(--paper-2); border-block: 1px solid var(--rule);
  padding: clamp(64px, 10vh, 120px) 0 clamp(56px, 8vh, 96px);
}
.flag__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.flag__head .kicker { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.flag__head .kicker .link { color: var(--ink); }
.flag__title {
  grid-column: 1 / -1; margin: .12em 0 .22em;
  font-weight: 300; font-size: clamp(4rem, 12.5vw, 12.5rem); line-height: .88; letter-spacing: -.05em;
  font-variation-settings: "opsz" 60;
}
.flag__dek { grid-column: 1 / span 8; font-size: clamp(1.3rem, 2.3vw, 2.1rem); line-height: 1.3; letter-spacing: -.012em; font-weight: 350; max-width: 34ch; }
.flag__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vh, 64px); border-top: 1px solid var(--ink); }
.flag__stats > div { padding: 16px 18px 18px 0; border-right: 1px solid var(--rule); }
.flag__stats > div + div { padding-left: 18px; }
.flag__stats > div:last-child { border-right: 0; }
.flag__stats dt { font: 600 11.5px/1.3 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.flag__stats dd { font-size: 1.05rem; line-height: 1.4; }
.flag__stats b { font-weight: 600; }
@media (max-width: 960px) {
  .flag__dek { grid-column: 1 / -1; }
  .flag__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flag__stats > div { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; }
  .flag__stats > div:nth-child(odd) { padding-right: 16px; }
}
@media (max-width: 520px) { .flag__stats { grid-template-columns: 1fr; } }

/* scroll story: text steps on the left, a sticky stage on the right */
.story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); margin-top: clamp(24px, 4vh, 48px); }
.story__steps { grid-column: 1 / span 5; }
.story__stage { grid-column: 6 / -1; position: relative; }
.stage {
  position: sticky; top: calc(var(--mast-h) + 5vh);
  height: min(calc(100vh - var(--mast-h) - 10vh), 680px);
  display: grid;
}
.stage__item { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; }
.stage__item.is-on { opacity: 1; visibility: visible; }
.stage__item > .fig { width: 100%; }
.no-motion-fallback .stage__item { transition: opacity .4s; }
.stage__dots { position: absolute; right: -22px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.stage__dots li { width: 5px; height: 5px; border-radius: 50%; background: var(--rule-2); transition: background .4s, transform .4s var(--ease); }
.stage__dots li.is-on { background: var(--blue); transform: scale(1.6); }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; max-width: 34rem; }
.step__no { font: italic 400 1.35rem/1 var(--f-serif); color: var(--blue); margin-bottom: 14px; }
.step__title { font-weight: 300; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1; letter-spacing: -.035em; margin-bottom: 18px; }
.step p:not(.step__no) { font-size: 1.12rem; line-height: 1.62; color: var(--ink-2); }
.step__visual { display: none; }
.step:last-child { min-height: 66vh; }
.motion .step { transition: opacity .6s var(--ease); }
.motion .story.is-live .step:not(.is-on) { opacity: .28; }
@media (max-width: 1100px) { .stage__dots { right: -14px; } }
@media (max-width: 960px) {
  .story { display: block; }
  .story__stage { display: none; }
  .step { min-height: 0; max-width: none; padding: 40px 0 24px; border-top: 1px solid var(--rule); }
  .step:first-child { border-top: 0; }
  .step__visual { display: block; margin-top: 28px; }
  .motion .story.is-live .step:not(.is-on) { opacity: 1; }
}

.flag__foot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 32px;
  align-items: end; margin-top: clamp(24px, 3vh, 40px); padding-top: 32px; border-top: 1px solid var(--ink);
}
.flag__foot > div:nth-child(1) { grid-column: 1 / span 5; }
.flag__foot > div:nth-child(2) { grid-column: 6 / span 4; }
.flag__foot > .btn { grid-column: 11 / -1; justify-self: end; }
.stack { font-size: 1.02rem; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 960px) {
  .flag__foot > div:nth-child(1), .flag__foot > div:nth-child(2), .flag__foot > .btn { grid-column: 1 / -1; justify-self: start; }
}

/* language mix */
.langbar__track { display: flex; height: 10px; gap: 2px; }
.langbar__seg { height: 100%; transform-origin: left; }
.langbar__key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font: 500 13px var(--f-sans); color: var(--ink-2); }
.langbar__key span { display: inline-flex; align-items: center; gap: 7px; }
.langbar__key i { width: 9px; height: 9px; }
.lang-0 { background: var(--ink); }
.lang-1 { background: var(--blue); }
.lang-2 { background: var(--rule-2); }
.lang-3 { background: var(--ink-4); }
.lang-4 { background: var(--paper-3); }

/* browser frame for screenshots */
.browser { background: var(--card); border: 1px solid var(--rule-2); box-shadow: var(--shadow); overflow: hidden; }
.browser__bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-2); }
.browser__bar span { margin-left: 10px; font: 12px var(--f-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; }
.shot { position: relative; }
/* Ballpark's effect chart, drawn at build time once the experiment has answers. */
.fx { display: block; width: 100%; height: auto; overflow: visible; margin: 6px 0 10px; }
.fx__tick { font: 10px var(--f-mono); fill: var(--ink-3); }
.fx__label { font: 500 12px var(--f-sans); fill: var(--ink-2); }
.fx__val { font: 11px var(--f-mono); fill: var(--ink); }
.shot__stack { position: relative; padding-bottom: 13%; }
.shot__float { position: absolute; right: -2%; bottom: 0; width: 56%; border: 1px solid var(--rule-2); background: var(--card); box-shadow: var(--shadow); }
@media (max-width: 960px) { .shot__float { right: 0; } }

/* verification illustration */
.vfy__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vfy__card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--rule-2); padding: 16px 16px 74px; box-shadow: var(--shadow); }
.vfy__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.vfy__file { font: 12px var(--f-mono); color: var(--ink-3); }
.vfy__tag { font: 600 10.5px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; padding: 5px 7px; border: 1px solid var(--rule-2); color: var(--ink-2); }
.vfy__title { font-size: 1.3rem; line-height: 1.15; letter-spacing: -.015em; margin-bottom: 12px; }
.vfy__lines { display: grid; gap: 2px; }
.vfy__lines li { position: relative; font: 13px/1.5 var(--f-mono); color: var(--ink-2); padding: 3px 6px; }
.vfy__lines li.h { font: 600 10.5px/1.2 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-top: 10px; }
.vfy__lines li.hit { transition: background .35s, color .35s; }
.vfy__card.is-marked[data-verdict="fail"] li.hit { background: var(--red-soft); color: var(--red); text-decoration: line-through; text-decoration-thickness: 1px; }
.vfy__card.is-marked[data-verdict="pass"] li.hit { background: var(--green-soft); color: var(--green); }
.vfy__scan { position: absolute; left: 0; right: 0; top: 0; height: 26px; background: linear-gradient(transparent, var(--blue-soft) 40%, var(--blue-soft) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--blue) 45%, transparent); opacity: 0; pointer-events: none; }
.stamp {
  position: absolute; right: 12px; bottom: 12px; display: grid; justify-items: center; gap: 2px;
  padding: 8px 12px 7px; border: 2px solid currentColor; transform: rotate(-7deg);
  font: 700 13px/1 var(--f-sans); letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; background: color-mix(in srgb, var(--card) 85%, transparent);
}
.stamp small { font: 600 9.5px/1 var(--f-sans); letter-spacing: .12em; }
.stamp--fail { color: var(--red); }
.stamp--pass { color: var(--green); }
.vfy__card.is-marked .stamp { opacity: 1; }
@media (max-width: 600px) { .vfy__cards { grid-template-columns: 1fr; } }

/* pipeline */
.machine { background: var(--card); border: 1px solid var(--rule-2); padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow); }
.pipe { display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr 44px 1fr; align-items: stretch; }
.pipe > li:not(.pipe__flow) { display: grid; align-content: start; gap: 6px; padding: 14px 12px; border: 1px solid var(--ink); background: var(--paper); min-height: 150px; }
.pipe b { font-weight: 400; font-size: 1.25rem; letter-spacing: -.015em; }
.pipe span:not(.pipe__n):not(.num) { font: 500 12.5px/1.4 var(--f-sans); color: var(--ink-3); }
.pipe__n { font: 600 11px var(--f-sans); letter-spacing: .12em; color: var(--blue); }
.pipe__flow { position: relative; display: grid; place-items: center; }
.pipe__flow::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--blue) 0 6px, transparent 6px 11px);
  background-size: 11px 2px;
}
.motion .pipe__flow::before { animation: flow 0.9s linear infinite; }
.motion .machine.is-paused .pipe__flow::before { animation-play-state: paused; }
@keyframes flow { to { background-position: 11px 0; } }
.pipe__flow .num { position: relative; top: -18px; font: 600 11.5px var(--f-sans); color: var(--blue); background: var(--card); padding: 0 3px; }
.machine__k { margin: 22px 0 10px; }
.agents { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.agents li { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--rule-2); }
.agents b { font-weight: 400; font-size: 1rem; line-height: 1.2; }
.agents span { font: 500 11.5px var(--f-sans); color: var(--ink-3); letter-spacing: .04em; }
@media (max-width: 700px) {
  .pipe { grid-template-columns: 1fr; }
  .pipe > li:not(.pipe__flow) { min-height: 0; }
  .pipe__flow { height: 34px; }
  .pipe__flow::before { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform: translateX(-50%); background: repeating-linear-gradient(180deg, var(--blue) 0 6px, transparent 6px 11px); background-size: 2px 11px; }
  @keyframes flow { to { background-position: 0 11px; } }
  .pipe__flow .num { top: 0; left: 18px; }
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- index of work ---------- */
.index { margin-top: clamp(80px, 12vh, 140px); }
.index__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; margin-bottom: clamp(28px, 5vh, 48px); }
.index__title { grid-column: 1 / span 6; font-weight: 300; font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: .92; letter-spacing: -.045em; }
.index__dek { grid-column: 8 / -1; font: 500 14px/1.55 var(--f-sans); color: var(--ink-3); max-width: 46ch; }
@media (max-width: 960px) { .index__title, .index__dek { grid-column: 1 / -1; } .index__dek { margin-top: 16px; } }

.index__table { --cols: 52px minmax(0, 1fr) 190px 250px 124px 28px; border-bottom: 1px solid var(--ink); }
.index__cols {
  display: grid; grid-template-columns: var(--cols); column-gap: 20px; align-items: end;
  padding-bottom: 10px; border-bottom: 1px solid var(--ink);
  font: 600 11px/1 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3);
}
.index__cols .c-time { position: relative; height: 12px; }
.axis { position: absolute; inset: 0; }
.axis span { position: absolute; bottom: 0; transform: translateX(-2px); }
.index__group {
  padding: 30px 0 10px; font: 600 11.5px/1 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--blue);
}

.row { position: relative; border-top: 1px solid var(--rule); }
.index__group + .row { border-top-color: var(--rule-2); }
.row__btn {
  position: relative; width: 100%; display: grid; grid-template-columns: var(--cols); column-gap: 20px; align-items: center;
  padding: 20px 0; background: none; border: 0; text-align: left; cursor: pointer;
}
.row__btn::before {
  content: ""; position: absolute; inset: 0 calc(-1 * min(var(--gutter), 20px)); z-index: -1;
  background: var(--paper-2); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.row__btn:hover::before, .row.is-open .row__btn::before { transform: scaleX(1); }
.row { isolation: isolate; }
.row__no { font: 600 12px var(--f-sans); letter-spacing: .12em; color: var(--ink-3); }
.row__name { display: grid; gap: 4px; min-width: 0; }
.row__t { font-weight: 350; font-size: clamp(1.55rem, 2.3vw, 2.1rem); line-height: 1.02; letter-spacing: -.028em; transition: transform .55s var(--ease), color .3s; }
.row__btn:hover .row__t { transform: translateX(10px); }
.row.is-open .row__t { font-style: italic; color: var(--blue); }
.row__k { font: 500 14px/1.45 var(--f-sans); color: var(--ink-3); transition: transform .55s var(--ease) .03s; }
.row__btn:hover .row__k { transform: translateX(10px); }
.row__stack { font: 500 13px/1.4 var(--f-sans); color: var(--ink-2); }
.row__time { display: block; height: 30px; }
.row__time svg { display: block; width: 100%; height: 100%; overflow: visible; }
.row__status { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--f-sans); letter-spacing: .06em; color: var(--ink-2); white-space: nowrap; }
.row__icon { position: relative; width: 16px; height: 16px; justify-self: end; }
.row__icon i { position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease); }
.row__icon i:last-child { transform: rotate(90deg); }
.row.is-open .row__icon i:last-child { transform: rotate(0deg); }
.row__btn:focus-visible { outline-offset: -2px; }

.strip-base { stroke: var(--rule-2); stroke-width: 1; }
.strip-month { stroke: var(--rule); stroke-width: 1; }
.strip-tick { fill: var(--ink); }
.row:hover .strip-tick, .row.is-open .strip-tick { fill: var(--blue); }
.strip-span { fill: var(--ink-3); opacity: .75; }
.row:hover .strip-span, .row.is-open .strip-span { fill: var(--blue); }

.row__panel { display: grid; grid-template-rows: 1fr; }
.js .row__panel { grid-template-rows: 0fr; transition: grid-template-rows .75s var(--ease-io); }
.js .row.is-open .row__panel { grid-template-rows: 1fr; }
.row__panel-in { min-height: 0; overflow: hidden; }
.note { display: grid; grid-template-columns: 52px minmax(0, 5fr) minmax(0, 6fr); column-gap: 20px; row-gap: 32px; padding: 12px 0 56px; }
.note__text { grid-column: 2; max-width: 38rem; }
.note__text p { font-size: 1.05rem; line-height: 1.62; color: var(--ink-2); }
.note__text p + p { margin-top: 14px; }
.note__vis { grid-column: 3; min-width: 0; }
.note__facts { margin-top: 24px; border-top: 1px solid var(--ink); }
.note__facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.note__facts dt { font: 600 11px/1.9 var(--f-sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.note__facts dd { font-size: .98rem; font-variant-numeric: lining-nums tabular-nums; }
.note__links { margin-top: 26px; }
.js .row:not(.is-open) .note { visibility: hidden; transition: visibility 0s .75s; }

.gates { margin-top: 20px; columns: 2; column-gap: 24px; }
.gates li { break-inside: avoid; position: relative; padding: 5px 0 5px 16px; font: 500 13px/1.45 var(--f-sans); color: var(--ink-2); }
.gates li::before { content: ""; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border: 1px solid var(--blue); }

@media (max-width: 1100px) { .index__table { --cols: 44px minmax(0, 1fr) 150px 200px 110px 24px; } }
@media (max-width: 960px) {
  .index__cols { display: none; }
  .row__btn {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    grid-template-areas: "no name icon" ". meta meta" ". time time";
    row-gap: 10px; padding: 18px 0;
  }
  .row__no { grid-area: no; align-self: start; padding-top: 8px; }
  .row__name { grid-area: name; }
  .row__icon { grid-area: icon; align-self: start; margin-top: 10px; }
  .row__stack { grid-area: meta; display: inline; }
  .row__status { grid-area: meta; justify-self: end; }
  .row__time { grid-area: time; height: 24px; }
  .row__btn:hover .row__t, .row__btn:hover .row__k { transform: none; }
  .note { grid-template-columns: 34px minmax(0, 1fr); }
  .note__text, .note__vis { grid-column: 2; }
  .gates { columns: 1; }
}
@media (max-width: 520px) {
  .row__stack { display: none; }
  .row__status { justify-self: start; }
  .note__facts > div { grid-template-columns: 1fr; gap: 0; }
}

/* project visuals */
.demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.demo { overflow: hidden; border: 1px solid var(--rule-2); background: var(--card); }
.demo img { transition: transform .8s var(--ease); }
.demo:hover img { transform: scale(1.05); }

.funnel__list { margin-top: 14px; border-top: 1px solid var(--ink); }
.funnel__list li { display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; row-gap: 8px; padding: 14px 0 12px; border-bottom: 1px solid var(--rule); }
.funnel__n { font-weight: 300; font-size: 2rem; line-height: 1; letter-spacing: -.03em; }
.funnel__l { align-self: center; font: 500 14px/1.4 var(--f-sans); color: var(--ink-2); }
.funnel__l em { font-style: normal; font-weight: 700; color: var(--blue); margin-left: 6px; white-space: nowrap; }
.funnel__bar { grid-column: 1 / -1; display: block; height: 8px; width: max(var(--w), 3px); background: var(--ink); transform-origin: left; }
.funnel__list li.is-final .funnel__bar { background: var(--blue); }
.funnel__list li.is-final .funnel__n { color: var(--blue); }

.split__bar { display: flex; height: 44px; margin-top: 16px; border: 1px solid var(--ink); }
.split__bar i { display: block; height: 100%; width: var(--w); transform-origin: left; }
.split__a { background: repeating-linear-gradient(-45deg, var(--rule-2) 0 1.5px, transparent 1.5px 7px); }
.split__b { background: var(--ink); }
.split__key { margin-top: 16px; display: grid; gap: 8px; font: 500 14px/1.4 var(--f-sans); color: var(--ink-2); }
.split__key li { display: flex; align-items: center; gap: 10px; }
.split__key b { font-weight: 700; color: var(--ink); }
.sw { display: inline-block; width: 12px; height: 12px; flex: none; border: 1px solid var(--ink); }
.sw--hatch { background: repeating-linear-gradient(-45deg, var(--rule-2) 0 1.5px, transparent 1.5px 4px); }
.sw--ink { background: var(--ink); }
.sw--red { background: var(--red); border-color: var(--red); }
.sw--rule { background: var(--rule-2); border-color: var(--rule-2); }
.sw--blue { background: var(--blue); border-color: var(--blue); }

.kal__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.kal__grid .kicker { margin-bottom: 12px; }
.viz--calib { aspect-ratio: 1; max-width: 320px; }
.viz svg { display: block; width: 100%; height: 100%; overflow: visible; }
.calib-diag { stroke: var(--ink-4); stroke-dasharray: 3 4; stroke-width: 1; }
.calib-gap { fill: var(--red-soft); }
.calib-line { stroke: var(--red); stroke-width: 1.8; fill: none; }
.calib-pt { fill: var(--red); stroke: var(--card); stroke-width: 1.5; }
.calib-frame { fill: none; stroke: var(--rule-2); }
.calib-note { font: italic 400 13px var(--f-serif); fill: var(--ink-2); }
.bars { display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; font: 500 13px var(--f-sans); color: var(--ink-2); }
.bars i { display: block; height: 14px; width: var(--w); background: var(--red); opacity: .85; transform-origin: left; }
.bars b { font: 600 13px var(--f-sans); color: var(--red); }
@media (max-width: 600px) { .kal__grid { grid-template-columns: 1fr; } .bars li { grid-template-columns: 96px 1fr auto; } }

.whale .kicker { margin-bottom: 12px; }
.viz--units { width: 100%; }
.u { fill: var(--rule); }
.u-mm { fill: var(--red); }
.u-gate { fill: var(--rule-2); }
.u-pass { fill: var(--ink); }
.u-track { fill: var(--blue); }
.whale__key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 16px; font: 500 13.5px/1.4 var(--f-sans); color: var(--ink-2); }
.whale__key li { display: flex; align-items: center; gap: 9px; }
.whale__key b { font-weight: 700; color: var(--ink); }

.phones__row { display: flex; justify-content: center; align-items: flex-end; padding: 10px 0 6px; }
.phone { width: 30%; max-width: 190px; border: 7px solid #111; border-radius: 26px; overflow: hidden; background: #0c1020; box-shadow: var(--shadow); transition: transform .7s var(--ease); }
.phone img { width: 100%; }
.phone--l { transform: translateX(14%) rotate(-6deg) scale(.9); }
.phone--c { position: relative; z-index: 2; width: 34%; max-width: 215px; }
.phone--r { transform: translateX(-14%) rotate(6deg) scale(.9); }
.phones:hover .phone--l { transform: translateX(-4%) rotate(-8deg) scale(.92); }
.phones:hover .phone--r { transform: translateX(4%) rotate(8deg) scale(.92); }

.tiles__canvas { display: block; width: 100%; aspect-ratio: 16 / 10; background: #0B1222; border: 1px solid var(--rule-2); }

.pins__fan { display: flex; justify-content: center; align-items: flex-end; padding: 16px 0 4px; }
.pin { width: 30%; max-width: 200px; border: 1px solid var(--rule-2); background: var(--card); box-shadow: var(--shadow); transition: transform .7s var(--ease); }
.pin--l { transform: translateX(12%) rotate(-7deg); }
.pin--c { position: relative; z-index: 2; width: 34%; max-width: 225px; }
.pin--r { transform: translateX(-12%) rotate(7deg); }
.pins:hover .pin--l { transform: translateX(-2%) rotate(-9deg); }
.pins:hover .pin--r { transform: translateX(2%) rotate(9deg); }

/* ---------- commit ledger ---------- */
.ledgerbook { margin-top: clamp(96px, 14vh, 160px); }
.ledgerbook__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; margin-bottom: 36px; }
.ledgerbook__head .index__title { grid-column: 1 / span 7; }
.ledgerbook__head .index__dek { grid-column: 8 / -1; }
.ledgerbook__stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stat { padding: 18px 16px 18px 0; display: grid; gap: 6px; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--rule); }
.stat__v { font-weight: 300; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: .95; letter-spacing: -.035em; }
.stat--blue .stat__v { color: var(--blue); }
.stat__l { font: 500 13px/1.35 var(--f-sans); color: var(--ink-3); }
@media (max-width: 960px) {
  .ledgerbook__head .index__title, .ledgerbook__head .index__dek { grid-column: 1 / -1; }
  .ledgerbook__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-bottom: 1px solid var(--rule); }
  .stat + .stat { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
}
.heat { margin-top: 28px; }
.heat__wrap { position: relative; width: 100%; }
.heat__wrap svg { display: block; overflow: visible; }
.hc { transform-box: fill-box; transform-origin: center; }
.h0 { fill: var(--paper-3); }
.h1 { fill: color-mix(in srgb, var(--ink) 24%, var(--paper-3)); }
.h2 { fill: color-mix(in srgb, var(--ink) 48%, var(--paper-3)); }
.h3 { fill: color-mix(in srgb, var(--ink) 72%, var(--paper-3)); }
.h4 { fill: var(--ink); }
.hb { fill: var(--blue); }
.hc-hit { stroke: var(--blue); stroke-width: 1.5; }
.heat__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font: 500 12.5px var(--f-sans); color: var(--ink-3); }
.heat__legend > i { width: 12px; height: 12px; }
.heat__legend .l0 { background: var(--paper-3); }
.heat__legend .l1 { background: color-mix(in srgb, var(--ink) 24%, var(--paper-3)); }
.heat__legend .l2 { background: color-mix(in srgb, var(--ink) 48%, var(--paper-3)); }
.heat__legend .l3 { background: color-mix(in srgb, var(--ink) 72%, var(--paper-3)); }
.heat__legend .l4 { background: var(--ink); }
.heat__bot { display: inline-flex; align-items: center; gap: 7px; margin-left: 18px; }
.heat__bot i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.heat__updated { margin-left: auto; }

/* ==========================================================================
   03 Experience
   ========================================================================== */
.exp__list { position: relative; padding-left: 36px; }
.exp__spine { position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.exp__spine i { position: absolute; inset: 0; background: var(--blue); transform-origin: top; transform: scaleY(0); }
.job { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: clamp(28px, 5vh, 52px) 0; border-top: 1px solid var(--rule); }
.job:first-of-type { border-top: 1px solid var(--ink); }
.job::before {
  content: ""; position: absolute; left: -40px; top: clamp(40px, 6.2vh, 64px); width: 9px; height: 9px;
  border: 1px solid var(--ink-3); background: var(--paper); border-radius: 50%; transition: background .4s, border-color .4s;
}
.job.is-past::before { background: var(--blue); border-color: var(--blue); }
.job__when { grid-column: 1 / span 3; display: grid; gap: 4px; align-content: start; padding-top: 10px; font: 600 12px/1.4 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.job__when .num { color: var(--ink); }
.job__body { grid-column: 4 / -1; }
.job__co { font-weight: 300; font-size: clamp(2.1rem, 4.2vw, 3.6rem); line-height: 1; letter-spacing: -.035em; }
.job__role { margin-top: 8px; font-style: italic; font-size: 1.2rem; color: var(--ink-2); }
.job__pts { margin-top: 20px; display: grid; gap: 10px; max-width: 64ch; }
.job__pts li { position: relative; padding-left: 22px; font-size: 1.02rem; line-height: 1.6; color: var(--ink-2); }
.job__pts li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: var(--ink-3); }
.job__pts mark { background: linear-gradient(transparent 58%, var(--blue-soft) 58%); color: var(--ink); padding: 0 1px; }
@media (max-width: 960px) {
  .exp__list { padding-left: 22px; }
  .job::before { left: -26px; }
  .job__when, .job__body { grid-column: 1 / -1; }
  .job__when { padding-top: 0; margin-bottom: 10px; grid-auto-flow: column; justify-content: start; gap: 14px; }
}

/* ==========================================================================
   04 Record
   ========================================================================== */
.record__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 48px; }
.entry { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.entry:first-of-type { padding-top: 0; }
.entry__t { font-weight: 350; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.02em; }
.entry__s { margin-top: 6px; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.entry__m { margin-top: 6px; font: 600 11.5px/1.4 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags span { font: 600 11px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; border: 1px solid var(--rule-2); }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 28px; margin-top: clamp(56px, 9vh, 96px); padding-top: 24px; border-top: 1px solid var(--ink); }
.skills__v { margin-top: 10px; font-size: 1.05rem; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 960px) { .record__grid, .skills { grid-template-columns: 1fr; } }

/* ==========================================================================
   05 Contact
   ========================================================================== */
.contact { padding-bottom: clamp(72px, 12vh, 140px); }
.contact__lede { font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.4; font-weight: 350; max-width: 36ch; }
.contact__mail { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 28px; margin-top: clamp(36px, 6vh, 64px); padding-bottom: clamp(28px, 4vh, 40px); border-bottom: 1px solid var(--ink); }
.contact__addr {
  display: inline-flex; flex-wrap: wrap; text-decoration: none; position: relative;
  font-weight: 300; font-size: clamp(2.3rem, 7.4vw, 7rem); line-height: 1; letter-spacing: -.045em;
  font-variation-settings: "opsz" 60;
}
.contact__addr span:last-child { font-style: italic; color: var(--ink-3); transition: color .4s; }
.contact__addr::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease);
}
.contact__addr:hover::after { transform: scaleX(1); transform-origin: left; }
.contact__addr:hover span:last-child { color: var(--blue); }
.copy {
  position: relative; display: inline-grid; min-height: 44px; padding: 0 16px; margin-bottom: 6px;
  border: 1px solid var(--rule-2); background: transparent; cursor: pointer;
  font: 600 12px/44px var(--f-sans); letter-spacing: .1em; text-transform: uppercase; overflow: hidden;
}
.copy span { grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
.copy__b { transform: translateY(100%); opacity: 0; color: var(--green); }
.copy.is-done .copy__a { transform: translateY(-100%); opacity: 0; }
.copy.is-done .copy__b { transform: none; opacity: 1; }
.copy:hover { border-color: var(--ink); }
.contact__alt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 20px; margin-top: 28px; }
.contact__alt li { display: grid; gap: 8px; font-size: 1.1rem; }
.contact__sign { margin-top: clamp(56px, 9vh, 96px); font-size: 1.2rem; color: var(--ink-2); }
.contact__sig { display: block; margin-top: 6px; font-style: italic; font-weight: 300; font-size: clamp(2.6rem, 5vw, 3.8rem); letter-spacing: -.03em; color: var(--blue); }
@media (max-width: 760px) { .contact__alt { grid-template-columns: 1fr; } }

/* ---------- colophon ---------- */
.colophon { border-top: 1px solid var(--rule-2); padding: 28px 0 40px; }
.colophon__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: .92rem; color: var(--ink-3); }
.colophon__in p:first-child { max-width: 70ch; }

/* ---------- hover preview for the index ---------- */
.peek {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: 340px; opacity: 0; transform: translate3d(-9999px, 0, 0);
}
.peek__in { transform-origin: 0 0; background: var(--card); border: 1px solid var(--rule-2); box-shadow: var(--shadow); overflow: hidden; }
.peek__in img { width: 100%; }
.peek.is-tall { width: 210px; }
.peek__stat { padding: 20px 20px 18px; }
.peek__stat b { display: block; font-weight: 300; font-size: 3rem; line-height: .95; letter-spacing: -.04em; font-variant-numeric: lining-nums tabular-nums; }
.peek__stat span { display: block; margin-top: 8px; font: 500 13px/1.4 var(--f-sans); color: var(--ink-3); }
.peek__stat.is-red b { color: var(--red); }
@media (hover: none), (pointer: coarse) { .peek { display: none; } }

/* ---------- view transitions (theme) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .mast, .contents, .peek, .cover__next, .copy { display: none !important; }
  body { background: #fff; }
  .js .row__panel { grid-template-rows: 1fr; }
  .js .row:not(.is-open) .note { visibility: visible; }
}
