/* Andrew Anter — personal site
   Paper + stencil type, one red rule, no product pitch. The spine beside the
   identity screen is the one ornament: the stages of a system I own end to end.
   Design source: landing.figcraft, page "v2 — personal". */

@font-face {
  font-family: "Bebas Neue";
  src: url("assets/fonts/BebasNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("assets/fonts/FiraSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("assets/fonts/FiraSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Two palettes: ember on paper (light) and ember on graphite (dark). The
   accent keeps one hue across both, so the brand survives the switch. */

:root {
  --display: "Bebas Neue", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
  --body: "Fira Sans", "Liberation Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e0f0c;
  --ink: #edeae0;
  --muted: #a09a8c;
  --rule: rgba(237, 234, 224, 0.16);
  --stamp: #ef4f33;
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #faf7f0;
  --ink: #191512;
  --muted: #6f6a60;
  --rule: #d8d4c6;
  --stamp: #c33f1f;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  max-width: 1440px;
  padding-inline: clamp(24px, 6.94vw, 100px);
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }
::selection { background: var(--stamp); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 3px;
}
/* whole-viewport sections take focus for screen-reader feedback after a
   view swap — a ring there would just frame the entire page */
.identity:focus-visible, .skills:focus-visible, .projects:focus-visible, .experience:focus-visible { outline: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 24px;
  top: 16px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font: 400 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

section[id] { scroll-margin-top: 24px; }

/* ---- shared type ---- */

.eyebrow {
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--stamp { color: var(--stamp); }

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.012em;
  text-wrap: balance;
}
.display--xl { font-size: clamp(2.8rem, 6.7vw, 6rem); }
.display--md { font-size: clamp(2.15rem, 3.9vw, 3.5rem); }
.display--identity { font-size: clamp(3.4rem, 6.7vw, 6rem); }

/* ---- identity: one screen = who am I ---- */

/* author display rules (e.g. .identity is flex) would beat the UA's
   [hidden] — enforce it for the view swap */
[hidden] { display: none !important; }
/* pre-paint boot guard: the head script stamps html.boot so the deep
   views stay down while the markup ships unhidden for crawlers and
   no-JS readers; main.js sets hidden per hash and drops the class */
html.boot #skills, html.boot #projects, html.boot #experience { display: none !important; }

/* ---- persistent top bar: view nav + theme, stays put while sections fade ---- */

.topbar {
  position: absolute;
  top: 40px;
  right: 0;
  display: flex;
  align-items: baseline;
  gap: 28px;
  z-index: 5;
}
.nav-link {
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid var(--rule);
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.theme-toggle {
  padding: 6px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-bottom-color: var(--ink); }

main { position: relative; }

.identity {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 64px 56px;
}
.identity__eyebrow { display: flex; align-items: center; gap: 12px; }
.identity__mark {
  display: inline-block;
  flex: none;
  width: 11px;
  height: 14px;
}
.identity__mark .pin-body { fill: var(--stamp); }
.identity__mark .pin-dot { fill: var(--paper); }
.identity__name {
  margin-top: 20px;
  font-size: clamp(4.4rem, 12.4vw, 11.2rem);
  text-wrap: initial;
}
.identity__claim {
  margin-top: 28px;
  max-width: 56ch;
  font-size: 19px;
  line-height: 1.55;
}
.identity__bar {
  margin-top: clamp(48px, 7vh, 72px);
  padding-top: 30px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.identity__label {
  display: block;
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.identity__value {
  display: block;
  margin-top: 8px;
  font: 600 15px/1.45 var(--body);
  color: var(--ink);
}
.nowrap { white-space: nowrap; }
.identity__links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.identity__links a {
  font: 400 14px/1.45 var(--mono);
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
}
.identity__links a:hover { color: var(--stamp); border-bottom-color: var(--stamp); }

.identity__hook { margin-top: 20px; font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.identity__hook em { font-style: normal; color: var(--stamp); }
.identity__door { margin-top: 14px; }
.identity__door a, .identity__doors a { font: 400 13px/1.4 var(--mono); color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid var(--rule); }
.identity__door a:hover, .identity__doors a:hover { color: var(--stamp); border-bottom-color: var(--stamp); }
.identity__doors { margin-top: clamp(28px, 4.5vh, 44px); display: flex; flex-wrap: wrap; gap: 12px 32px; }

/* skills, projects and experience are also URL fragments; without this clamp the
   browser's own anchor pass (which fires before the swap script) would
   smooth-scroll straight past the identity screen. A huge margin makes that pass
   resolve to the page top instead — the fade owns the motion. */
#skills, #projects, #experience { scroll-margin-top: 100000px; }

/* ---- skills: viewport two, all capabilities ---- */

.skills { padding-block: clamp(72px, 10vh, 96px) 64px; min-height: 100svh; }

/* main title, then category-labelled card grids: the inventory speaks for itself */
.skills__title { text-wrap: initial; }
.skills__cat { margin-top: clamp(28px, 4.5vh, 44px); }
.skills__cat-label { font: 400 11px/1.4 var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); margin-top: 12px; border-top: 1px solid var(--rule); }
.tool { padding: 12px 0; border-bottom: 1px solid var(--rule); position: relative; }
.tool__name { display: block; font: 400 14px/1.4 var(--mono); color: var(--ink); }
.tool__detail { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.tool__logo {
  position: absolute; right: 0; top: 50%; z-index: 0; width: 34px; height: 34px;
  transform: translateY(-50%); background-color: var(--ink); opacity: 0.16; pointer-events: none;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
.tool__name, .tool__detail { position: relative; z-index: 1; }
.tool:has(.tool__logo) .tool__detail { padding-right: 46px; }

/* ---- projects: viewport three, the public work ---- */

.projects { padding-block: clamp(72px, 10vh, 96px) 64px; min-height: 100svh; }
.projects__title { text-wrap: initial; }
.projects__cat { margin-top: clamp(28px, 4.5vh, 44px); }
.projects__cat-label { font: 400 11px/1.4 var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.projects__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); margin-top: 12px; border-top: 1px solid var(--rule); }
.project { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.project__name { display: inline-block; font: 400 15px/1.4 var(--mono); color: var(--ink); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid var(--rule); }
.project__name:hover { color: var(--stamp); border-bottom-color: var(--stamp); }
.project__detail { display: block; margin-top: 8px; max-width: 58ch; font-size: 14px; line-height: 1.55; color: var(--muted); }
.project__meta { display: block; margin-top: 10px; font: 400 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.projects__more { margin-top: clamp(28px, 4.5vh, 44px); }
.projects__more a { font: 400 13px/1.4 var(--mono); color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid var(--rule); }
.projects__more a:hover { color: var(--stamp); border-bottom-color: var(--stamp); }

/* ---- experience: viewport four, the work story ---- */

.experience { padding-block: clamp(72px, 10vh, 96px) 64px; min-height: 100svh; }
.experience__title { text-wrap: initial; }
.experience .work__list { margin-top: clamp(28px, 4.5vh, 44px); }
.experience .work__note { margin-top: 40px; }

/* ---- spine screens ---- */

.stages-band {
  margin-top: 64px;
  padding: 72px 0 0;
  border-top: 1px solid var(--rule);
  max-width: 460px;
}

/* the spine */

.stages {
  font: 400 13px/1.45 var(--body);
  padding-top: 2px;
}
.stages__list {
  position: relative;
  margin-top: 28px;
}
.stages__list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 1px;
  height: calc(100% + 14px);
  background: var(--stamp);
  transform-origin: top;
}
.stages__list li {
  position: relative;
  padding-left: 24px;
}
.stages__list li + li { margin-top: 18px; }
.stages__list li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 9px;
  height: 9px;
  background: var(--stamp);
}
.stages__stage {
  display: block;
  font: 400 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.stages__detail { display: block; margin-top: 4px; color: var(--muted); }
.stages__note {
  margin-top: 34px;
  max-width: 32ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* Motion lives behind one guard: prefers-reduced-motion. Hiding also requires
   JS (html.js), so content without JS or with reduced motion is fully visible. */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* ---- identity load sequence ---- */

  html.js .identity__name { opacity: 0; transform: translateY(-0.24em); transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.85, 0.3, 1); }
  html.js .identity__eyebrow { opacity: 0; transition: opacity 0.65s ease 0.55s; }
  html.js .identity__mark { opacity: 0; transform: translateY(-9px); transition: opacity 0.45s ease 0.6s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s; }
  html.js .identity__claim { opacity: 0; transform: translateY(18px); transition: opacity 0.75s ease 1.05s, transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) 1.05s; }
  html.js .identity__bar { border-top-color: transparent; }
  html.js .identity__bar .identity__cell { opacity: 0; transform: translateY(12px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1); }
  html.js .identity__bar .identity__cell:nth-child(1) { transition-delay: 1.6s; }
  html.js .identity__bar .identity__cell:nth-child(2) { transition-delay: 1.85s; }
  html.js .identity__bar .identity__cell:nth-child(3) { transition-delay: 2.1s; }
  html.js .identity__bar .identity__cell:nth-child(4) { transition-delay: 2.35s; }
  html.js .identity__hook { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease 1.45s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 1.45s; }
  html.js .identity__door { opacity: 0; transition: opacity 0.6s ease 1.7s; }
  html.js .identity__doors { opacity: 0; transform: translateY(10px); transition: opacity 0.6s ease 2.6s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 2.6s; }

  html.js .identity.go .identity__eyebrow { opacity: 1; }
  html.js .identity.go .identity__mark { opacity: 1; transform: none; }
  html.js .identity.go .identity__name { opacity: 1; transform: none; }
  html.js .identity.go .identity__claim { opacity: 1; transform: none; }
  html.js .identity.go .identity__bar .identity__cell { opacity: 1; transform: none; }
  html.js .identity.go .identity__hook { opacity: 1; transform: none; }
  html.js .identity.go .identity__door { opacity: 1; }
  html.js .identity.go .identity__doors { opacity: 1; transform: none; }

  /* the bar's rule draws in after the name lands */
  .identity__bar { position: relative; }
  html.js .identity__bar::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--rule);
    transform: scaleX(0);
    transform-origin: left;
  }
  html.js .identity.go .identity__bar::after { transform: scaleX(1); transition: transform 0.75s cubic-bezier(0.2, 0.75, 0.25, 1) 1.35s; }

  /* the whole top bar arrives last — it is outside .identity, so "go"
     lands on the document element; every entry fades into its slot,
     staggered by sibling position so future nav items join the ladder
     with no new rules */
  html.js .topbar > * {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(1.2s + 0.12s * (sibling-index() - 1));
  }
  html.js.go .topbar > * { opacity: 1; transform: none; }

  /* repeat visits in the same tab session skip the long show: main.js
     marks html.seen from sessionStorage and the same choreography
     compresses to ~2.5s — the nav still lands last */
  html.js.seen .identity__name { transition-duration: 0.5s; }
  html.js.seen .identity__eyebrow { transition-delay: 0.25s; transition-duration: 0.55s; }
  html.js.seen .identity__mark { transition-delay: 0.3s; transition-duration: 0.55s; }
  html.js.seen .identity__claim { transition-delay: 0.55s; transition-duration: 0.6s; }
  html.js.seen .identity.go .identity__bar::after { transition-delay: 0.75s; transition-duration: 0.6s; }
  html.js.seen .identity__bar .identity__cell { transition-duration: 0.5s; }
  html.js.seen .identity__bar .identity__cell:nth-child(1) { transition-delay: 0.85s; }
  html.js.seen .identity__bar .identity__cell:nth-child(2) { transition-delay: 1s; }
  html.js.seen .identity__bar .identity__cell:nth-child(3) { transition-delay: 1.15s; }
  html.js.seen .identity__bar .identity__cell:nth-child(4) { transition-delay: 1.3s; }
  html.js.seen .identity__hook { transition-delay: 0.75s; transition-duration: 0.6s; }
  html.js.seen .identity__door { transition-delay: 0.95s; transition-duration: 0.5s; }
  html.js.seen .identity__doors { transition-delay: 1.45s; transition-duration: 0.5s; }
  html.js.seen .topbar > * { transition-duration: 0.45s; transition-delay: calc(0.45s + 0.08s * (sibling-index() - 1)); }

  /* ---- view swap: fade out, swap visibility, fade in (no scrolling) ---- */

  html.js .identity, html.js .skills, html.js .projects, html.js .experience {
    transition: opacity 0.42s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  html.js .v-leave { opacity: 0; transform: translateY(-10px); }
  /* entering views settle DOWNWARD from above: a downward translate on a
     100svh-tall section pushes content past the viewport bottom, which
     extends the scrollable overflow and flashes a scrollbar mid-fade.
     Upward offsets overflow off the top, which never scrolls. */
  html.js .v-enter { opacity: 0; transform: translateY(-12px); }
  /* skills + projects: each card reveals as it scrolls into view, rising
     12px in place. Hover spotlights one card — faint ink wash, rule tint,
     logo lit in its brand color (skills) or name lit ember (projects) —
     while every other card dims. Short eased transitions both directions;
     border/background stay in the reveal transition list so the two
     systems never fight. */
  html.js .skills [data-reveal], html.js .projects [data-reveal] { transform: translateY(12px); transition: opacity 0.25s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, background-color 0.2s ease; }
  html.js .skills [data-reveal].in, html.js .projects [data-reveal].in { opacity: 1; transform: none; }
  .tool__logo { transition: opacity 0.2s ease, background-color 0.25s ease; }
  .skills:has(.tool:hover) .tool:not(:hover), .projects:has(.project:hover) .project:not(:hover) { opacity: 0.4; }
  html.js .skills:has(.tool:hover) .tool:not(:hover):not(.in), html.js .projects:has(.project:hover) .project:not(:hover):not(.in) { opacity: 0; }
  .tool:hover, .project:hover { border-bottom-color: var(--ink); background-color: color-mix(in srgb, var(--ink) 5%, transparent); }
  .tool:hover .tool__logo { opacity: 1; background-color: var(--brand, var(--ink)); }
  .project:hover .project__name { color: var(--stamp); border-bottom-color: var(--stamp); }

  /* ---- scroll reveals ---- */

  html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.16, 0.84, 0.3, 1); }
  html.js [data-reveal].in { opacity: 1; transform: none; }

  html.js [data-reveal] .principle { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
  html.js [data-reveal].in .approach__grid .principle:nth-child(1) { transition-delay: 0.05s; }
  html.js [data-reveal].in .approach__grid .principle:nth-child(2) { transition-delay: 0.17s; }
  html.js [data-reveal].in .approach__grid .principle:nth-child(3) { transition-delay: 0.29s; }
  html.js [data-reveal].in .approach__grid .principle:nth-child(4) { transition-delay: 0.41s; }

  html.js [data-reveal] .entry { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease 0.12s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s; }
  html.js [data-reveal] .work__note, html.js [data-reveal] .now__body, html.js [data-reveal] .now__stack, html.js [data-reveal] .now__fine { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease 0.28s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.28s; }

  html.js [data-reveal].in .principle { opacity: 1; transform: none; }
  html.js [data-reveal].in .entry { opacity: 1; transform: none; }
  html.js [data-reveal].in .work__note, html.js [data-reveal].in .now__body, html.js [data-reveal].in .now__stack, html.js [data-reveal].in .now__fine { opacity: 1; transform: none; }

  html.js [data-reveal] .colophon__body > div { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease 0.15s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s; }
  html.js [data-reveal].in .colophon__body > div:nth-child(2) { transition-delay: 0.3s; }
  html.js [data-reveal].in .colophon__body > div { opacity: 1; transform: none; }

  /* quiet link + title hovers (non-movement) */
  a { transition: color 0.18s ease, border-color 0.18s ease; }
  .entry__title { transition: color 0.25s ease; }
  .entry:hover .entry__title { color: var(--stamp); }

  /* theme swap = the new theme settles down over the old one, top to
     bottom (View Transitions, 0.88s — the view swap's out+in pace) —
     the same enter-from-above language as the views. Decelerating
     curve: motion is visible early, then eases to rest instead of
     snapping at the end. Browsers without the API fall back to the
     html.aa-swap crossfade below. */
  ::view-transition-old(root), ::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
  }
  ::view-transition-new(root) {
    animation: vt-wipe 0.88s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  /* the overlay is decorative — never trap the mouse */
  ::view-transition { pointer-events: none; }
  @keyframes vt-wipe {
    from { clip-path: inset(0 0 100% 0); }
    to   { clip-path: inset(0 0 0 0); }
  }

  /* fallback crossfade — only exists while a swap runs (html.aa-swap) */
  html.aa-swap, html.aa-swap *, html.aa-swap *::before, html.aa-swap *::after {
    transition: background-color 0.88s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.88s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.88s cubic-bezier(0.2, 0.8, 0.2, 1), fill 0.88s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.88s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  /* spine draws once its band scrolls into view */
  html.js .stages-band li::before,
  html.js .stages-band li:not(:last-child)::after { opacity: 0; }
  html.js .stages-band.in li::before,
  .stages-band.in li::before { animation: dot-in 0.35s ease-out both; }
  html.js .stages-band.in li:not(:last-child)::after,
  .stages-band.in li:not(:last-child)::after { animation: draw-spine 0.5s ease-out both; }
  .stages__list li:nth-child(1)::before { animation-delay: 0.28s; }
  .stages__list li:nth-child(2)::before { animation-delay: 0.40s; }
  .stages__list li:nth-child(3)::before { animation-delay: 0.52s; }
  .stages__list li:nth-child(4)::before { animation-delay: 0.64s; }
  .stages__list li:nth-child(5)::before { animation-delay: 0.76s; }
  .stages__list li:nth-child(6)::before { animation-delay: 0.88s; }
  .stages__list li:nth-child(7)::before { animation-delay: 1.00s; }
  .stages__list li:nth-child(1)::after { animation-delay: 0.34s; }
  .stages__list li:nth-child(2)::after { animation-delay: 0.46s; }
  .stages__list li:nth-child(3)::after { animation-delay: 0.58s; }
  .stages__list li:nth-child(4)::after { animation-delay: 0.70s; }
  .stages__list li:nth-child(5)::after { animation-delay: 0.82s; }
  .stages__list li:nth-child(6)::after { animation-delay: 0.94s; }

  @keyframes draw-spine {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
  }
  @keyframes dot-in {
    from { opacity: 0; transform: scale(0.4); }
    to   { opacity: 1; transform: scale(1); }
  }
}

/* ---- print: paper sees everything, no motion ---- */

@media print {
  html.js [data-reveal], html.js [data-reveal] * { opacity: 1 !important; transform: none !important; }
  .theme-toggle { display: none; }
  .topbar { display: none; }
  .identity, .skills, .projects, .experience { display: block !important; }
  html.boot #skills, html.boot #projects, html.boot #experience { display: block !important; }
}

/* ---- approach ---- */

.approach { margin-top: 96px; padding-top: 40px; border-top: 1px solid var(--rule); }
.approach .display--md { margin-top: 22px; }

.approach__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 60px;
  margin-top: 64px;
}
.principle { padding-top: 18px; border-top: 1px solid var(--rule); margin-bottom: 56px; }
.principle__claim {
  margin-top: 18px;
  max-width: 26ch;
  font: 600 19px/1.4 var(--body);
  letter-spacing: -0.005em;
}
.principle__why {
  margin-top: 14px;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---- work ---- */

.work { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--rule); }
.work .display--md { margin-top: 22px; }

.work__list { margin-top: 54px; border-top: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
}
.entry__main { padding: 26px 40px 44px 0; }
.entry__title {
  margin-top: 18px;
  font: 400 clamp(1.5rem, 2.2vw, 2rem)/1 var(--display);
  letter-spacing: 0.012em;
  text-transform: uppercase;
}
.entry__desc {
  margin-top: 16px;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.6;
}
.entry__outcome {
  padding: 46px 0 44px 44px;
  border-left: 1px solid var(--rule);
  font: 400 14px/1.5 var(--mono);
  letter-spacing: 0.01em;
  color: var(--stamp);
}

.work__note {
  margin-top: 26px;
  font: 400 12px/1.6 var(--mono);
  color: var(--muted);
}
.work__edu {
  margin-top: 40px;
  font: 400 12px/1.6 var(--mono);
  color: var(--muted);
}

/* ---- now ---- */

.now { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--rule); }
.now__body {
  margin-top: 22px;
  max-width: 820px;
  font-size: 20px;
  line-height: 1.5;
}
.now__stack {
  margin-top: 34px;
  font: 400 12px/1.6 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}
.now__label {
  display: inline-block;
  margin-right: 12px;
  color: var(--stamp);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.now__fine {
  margin-top: 8px;
  font: 400 12px/1.6 var(--mono);
  color: var(--muted);
}

/* ---- colophon ---- */

.colophon {
  margin-top: 84px;
  padding: 44px 0 56px;
  border-top: 1px solid var(--rule);
}
.colophon__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(32px, 5vw, 64px);
  margin-top: 26px;
}
.colophon__links {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 34px;
  font: 400 13px/1.4 var(--mono);
  letter-spacing: 0.02em;
}
.colophon__links a { text-decoration: none; color: var(--muted); }
.colophon__links a:hover { color: var(--stamp); }
.colophon__links .colophon__mail { font-size: 18px; color: var(--ink); }
.colophon__about { padding-top: 6px; }
.colophon__about p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.colophon__about p + p { margin-top: 22px; color: var(--ink); }

/* ---- narrow ---- */

@media (max-width: 1080px) {
  .identity { gap: 0; }
  .skills, .projects, .experience { padding-block: 96px 56px; }
  .identity__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .approach__grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; margin-top: 48px; }
  .principle { margin-bottom: 40px; }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry__main { padding: 26px 0 0; }
  .entry__outcome { padding: 0 0 34px; border-left: 0; margin-top: 16px; }
  .colophon__body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .tools, .projects__grid { grid-template-columns: minmax(0, 1fr); }
  main { display: flex; flex-direction: column; min-height: 100svh; }
  .topbar { position: static; padding-top: 20px; gap: 12px; }
  .nav-link, .theme-toggle { font-size: 10px; letter-spacing: 0.08em; padding: 17px 2px; }
  .identity { flex: 1; min-height: 0; padding-block: 32px 40px; }
  .identity__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .identity__doors { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stages-band { margin-top: 40px; padding-top: 44px; }
  .stages__note { margin-top: 26px; }
  .approach { margin-top: 64px; padding-top: 34px; }
  .work { margin-top: 24px; padding-top: 34px; }
  .work__list { margin-top: 36px; }
  .now { margin-top: 48px; padding-top: 34px; }
  .now__body { font-size: 18px; }
  .colophon { margin-top: 56px; padding-top: 34px; }
  .colophon__links .colophon__mail { font-size: 15px; }
}
