/* ============================================================
 * gurman.is-a.dev
 * One stylesheet for the home page, the blog index and posts.
 * No inline styles anywhere: the Content-Security-Policy forbids
 * them, so per-element values are set from site.js.
 * ============================================================ */

/* ---------- fonts (self-hosted, SIL OFL: assets/fonts/OFL.txt) ---------- */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexSans-Regular-Latin1.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexSans-Medium-Latin1.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexSans-SemiBold-Latin1.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-Regular-Latin1.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-Medium-Latin1.woff2) format('woff2'); }

/* ---------- tokens ---------- */
:root {
  --bg: #f4f4f2;
  --ink: #111214;
  --ink-2: #55585e;
  --line: #dcddd8;
  --dot: #2f9e6e;
  --slab: #0e0f11;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 40px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012; --ink: #ecedea; --ink-2: #a4a7ad; --line: #26282c; --dot: #4cc38a; --slab: #17191c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1012; --ink: #ecedea; --ink-2: #a4a7ad; --line: #26282c; --dot: #4cc38a; --slab: #17191c;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
b, strong { font-weight: 600; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.defs { position: absolute; width: 0; height: 0; }
.skip {
  position: absolute; left: var(--pad); top: -80px; z-index: 20;
  padding: 10px 14px; background: var(--ink); color: var(--bg); text-decoration: none;
}
.skip:focus { top: 12px; }
@view-transition { navigation: auto; }

/* ---------- links ---------- */
.arrow {
  width: 0.68em; height: 0.68em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  transition: transform 0.3s var(--ease);
}
.link {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 10px 0;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
  transition: text-decoration-color 0.2s;
}
.link:hover { text-decoration-color: var(--ink); }
.link:hover .arrow, .row:hover .arrow { transform: translate(2px, -2px); }
.links { display: flex; flex-wrap: wrap; gap: 0 28px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-head__in { position: relative; display: flex; flex-wrap: wrap; align-items: center; min-height: 72px; }
.brand { padding: 12px 0; font-weight: 500; text-decoration: none; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a {
  padding: 12px 0; font-size: 15px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.theme-btn {
  width: 44px; height: 44px; margin: 0 -13px 0 13px; padding: 0;
  display: grid; place-items: center;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.theme-btn svg { width: 18px; height: 18px; transition: transform 0.6s var(--ease); }
:root[data-theme="dark"] .theme-btn svg { transform: rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn svg { transform: rotate(180deg); }
}

.tui-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; margin-left: 24px; padding: 0 12px;
  font: 500 13px var(--mono); color: var(--ink); background: none; border: 1px solid var(--line); cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.tui-btn:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); }

/* Scroll progress: the header's bottom edge fills as you read, and a
   small robot walks along it. --p (0 to 1) is set from site.js. */
.track { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.site-head.is-scrolled .track { opacity: 1; }
.track::before {
  content: ''; position: absolute; inset: 0; background: var(--ink);
  transform: scaleX(var(--p, 0)); transform-origin: left;
}
.walker {
  position: absolute; bottom: 1px; left: 0; --px: 1px; pointer-events: none;
  opacity: 0; transition: opacity 0.3s, transform 0.18s linear;
  transform: translateX(calc(var(--p, 0) * (var(--track-w, 0px) - 16 * var(--px))));
}
.site-head.is-scrolled .walker { opacity: 1; }
/* The walker's position lives in transform, so its bob must not touch
   transform (the shared .sprite bob does): it steps on margin instead. */
.sprite.walker { animation: step 1.3s steps(1) infinite; }
.sprite.walker.is-walking { animation-duration: 0.24s; }
@keyframes step { 0%, 49.9% { margin-bottom: 0; } 50%, 100% { margin-bottom: var(--px); } }
@media (min-resolution: 2dppx) { .walker { --px: 1.5px; } }

/* ---------- sprites ---------- */
.sprite {
  display: block; flex: none;
  width: calc(16 * var(--px)); height: calc(16 * var(--px));
  image-rendering: pixelated; image-rendering: crisp-edges;
  animation: bob 1.3s steps(1) infinite;
  animation-delay: var(--phase, 0s);
}
@keyframes bob {
  0%, 49.9% { transform: none; }
  50%, 100% { transform: translateY(calc(-1 * var(--px))); }
}
@keyframes hop {
  0% { transform: none; }
  18% { transform: translateY(calc(-2 * var(--px))); }
  36% { transform: translateY(calc(-3 * var(--px))); }
  54% { transform: translateY(calc(-2 * var(--px))); }
  72%, 100% { transform: none; }
}
.lineup a:hover .sprite, .project:hover .sprite, .flag__title:hover .sprite, .sprite.is-hop {
  animation: hop 0.5s steps(1), bob 1.3s steps(1) 0.5s infinite;
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(64px, 6.5vw, 88px); }
.status { display: flex; align-items: center; gap: 10px; }
.status i { flex: none; width: 8px; height: 8px; background: var(--dot); animation: pulse 2.4s steps(1) infinite; }
@keyframes pulse { 0%, 79.9% { opacity: 1; } 80%, 100% { opacity: 0.25; } }
.hero h1 {
  margin-top: 28px; max-width: 980px;
  font-size: clamp(38px, 5.6vw, 80px); line-height: 1.02; font-weight: 500;
  letter-spacing: -0.035em; text-wrap: balance;
}
.hero__lede {
  margin-top: clamp(22px, 2.4vw, 32px); max-width: 640px;
  font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2);
}
.hero__lede b { color: var(--ink); font-weight: 500; }
.hero__lede a { color: var(--ink); font-weight: 500; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.hero .links { margin-top: clamp(18px, 2.4vw, 30px); }

/* word-by-word title reveal: each word rises out of its own clip box */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.word > span { display: inline-block; }
.js .word > span { transform: translateY(110%); }
.js.is-ready .word > span {
  transform: none;
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i) * 55ms);
}

/* project index: six sprites standing on one ground line */
.lineup {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: clamp(48px, 6vw, 88px);
  --px: 4px;
}
.lineup a { display: flex; flex-direction: column; text-decoration: none; }
.lineup__stand { position: relative; display: block; border-bottom: 1px solid var(--ink); }
.lineup__name { padding-top: 12px; font-size: 12px; transition: color 0.2s; }
.lineup a:hover .lineup__name { color: var(--ink); }
.js .lineup__stand { border-bottom-color: transparent; }
.js .lineup__stand::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
}
.js.is-ready .lineup__stand::after {
  transform: none;
  transition: transform 0.15s linear;
  transition-delay: calc(0.45s + var(--i) * 0.15s);
}
.lineup a:nth-child(1) { --i: 0; } .lineup a:nth-child(2) { --i: 1; } .lineup a:nth-child(3) { --i: 2; }
.lineup a:nth-child(4) { --i: 3; } .lineup a:nth-child(5) { --i: 4; } .lineup a:nth-child(6) { --i: 5; }

/* ---------- flagship: OVAT ---------- */
.flag {
  --bg: var(--slab); --ink: #ecedea; --ink-2: #a4a7ad; --line: #2c2f34;
  --mint: #7cf5c4; --blue: #5b8def;
  background: var(--bg); color: var(--ink);
  padding: clamp(64px, 8vw, 112px) 0;
  scroll-margin-top: 72px;
}
.flag__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--mint); }
.flag__kicker i { width: 8px; height: 8px; background: var(--mint); }
.flag__title { display: flex; align-items: flex-end; gap: clamp(16px, 2.4vw, 32px); margin-top: 28px; --px: 8px; }
.flag__title h1 {
  font-size: clamp(84px, 15vw, 208px); line-height: 0.8; font-weight: 600; letter-spacing: -0.055em;
  margin-left: -0.04em;
}
.flag__tag {
  margin-top: clamp(28px, 3.4vw, 44px); max-width: 860px;
  font-size: clamp(24px, 2.9vw, 40px); line-height: 1.15; font-weight: 500; letter-spacing: -0.025em; text-wrap: balance;
}
.flag__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px clamp(40px, 6vw, 88px);
  margin-top: clamp(40px, 5vw, 72px);
}
.flag__desc { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.flag__list { margin-top: 28px; border-top: 1px solid var(--line); }
.flag__list li { padding: 16px 0; border-bottom: 1px solid var(--line); line-height: 1.55; color: var(--ink-2); }
.flag__list b { display: block; color: var(--ink); font-weight: 500; }
.flag .links { margin-top: 18px; }
.flag__mentors { margin-top: 18px; line-height: 1.7; }

/* terminal: the commands type themselves once on screen */
.term {
  margin: 0; padding: 22px 24px; min-height: 172px;
  border: 1px solid var(--line); background: #08090a;
  font-family: var(--mono); font-size: 13px; line-height: 1.9; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.term .t-p { color: var(--mint); }
.term .t-c { color: #7d8189; }
.term .caret { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: var(--mint); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* measured results */
.metric { padding: 26px 0; border-bottom: 1px solid var(--line); }
.metric:last-child { border-bottom: 0; padding-bottom: 0; }
.metric__label { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.metric__nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; }
.metric__nums b { font-size: clamp(34px, 3.4vw, 46px); line-height: 1; font-weight: 500; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.metric__nums span { color: var(--ink-2); }
.bars { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px; margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.bar { height: 10px; background: var(--line); }
.bar i { display: block; height: 100%; width: calc(var(--v, 1) * 100%); background: var(--ink-2); transform-origin: left; }
.bar--win i { background: var(--mint); }
.js .bar i { transform: scaleX(0); }
.js .is-in .bar i { transform: none; transition: transform 1.1s var(--ease) 0.25s; }
.cells { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; margin-top: 16px; }
.cells i { aspect-ratio: 1; background: var(--line); }
.cells .c1 { background: var(--ink-2); }
.cells .c2 { background: var(--mint); }
.js .cells .c1, .js .cells .c2 { opacity: 0; transform: scale(0.4); }
.js .is-in .cells .c1, .js .is-in .cells .c2 {
  opacity: 1; transform: none;
  transition: opacity 0.2s, transform 0.3s var(--ease);
  transition-delay: calc(0.2s + var(--n) * 16ms);
}

/* ---------- sections ---------- */
.section {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px 40px;
  position: relative; padding-top: 88px; padding-bottom: 88px;
}
/* hairline between sections, aligned to the content edge */
.section::before, .site-foot::before {
  content: ''; position: absolute; top: 0; left: var(--pad); right: var(--pad); height: 1px; background: var(--line);
}
.section, .project { scroll-margin-top: 96px; }
.flag + .section::before { display: none; }
.section__head { position: sticky; top: 104px; align-self: start; }
.section__head h2 { font-size: 15px; font-weight: 500; }
.section__head p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.subhead { margin: 56px 0 20px; font-size: 15px; font-weight: 500; }
.subhead--first { margin-top: 0; }

/* ---------- work ---------- */
.project {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 36px;
  padding: 44px 0; border-top: 1px solid var(--line);
  --px: 5px;
}
.project:first-child { padding-top: 0; border-top: 0; }
/* the flagship row: bigger sprite and title, and a label */
.project--flag { --px: 7px; }
.project.project--flag h3 { font-size: clamp(40px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.035em; }
.project.project--flag .project__tag { margin-top: 12px; font-size: 22px; }
.project__kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--ink); }
.project__kicker i { width: 8px; height: 8px; background: #5b8def; }
#ovat { --accent: #5b8def; } #ovasearch { --accent: #8e6be8; } #lisper { --accent: #2fbfa5; } #vaultagent { --accent: #c9643b; }
#parable { --accent: #9aa3c7; } #sutra { --accent: #6ccb5f; }
.project h3 { font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.project h3 a {
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 3px; text-underline-offset: 7px;
  transition: text-decoration-color 0.25s;
}
.project h3 a:hover { text-decoration-color: var(--accent); }
.project__tag { margin-top: 6px; font-size: 19px; line-height: 1.4; }
.project__desc { margin-top: 14px; max-width: 600px; line-height: 1.6; color: var(--ink-2); }
.project > div > .mono { margin-top: 18px; }
.project .links { margin-top: 8px; font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 20px; }
.facts dt { font-size: 24px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.facts dd { margin-top: 4px; font-size: 13px; color: var(--ink-2); }

/* ---------- rows: pull requests, side projects, posts ---------- */
.row {
  display: flex; align-items: baseline; gap: 28px;
  padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.rows > .row:first-child { padding-top: 0; border-top: 0; }
.row > .mono { flex: none; width: 132px; transition: color 0.2s; }
a.row:hover > .mono { color: var(--ink); }
.row__main { flex: 1; min-width: 0; }
.row__title { display: block; font-size: 19px; line-height: 1.4; }
.row__note { display: block; margin-top: 4px; max-width: 600px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.row .arrow { font-size: 16px; }
.row__tag { flex: none; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.more { margin-top: 10px; font-size: 15px; }
.empty { color: var(--ink-2); }

/* ---------- journey: a timeline that fills as you scroll ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 1px solid var(--line); cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.chip span { font-family: var(--mono); font-size: 11px; opacity: 0.7; }
.chip:hover { color: var(--ink); border-color: var(--ink-2); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.journey { position: relative; padding-left: 30px; }
.journey::before, .journey::after {
  content: ''; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: var(--line);
}
.journey::after { background: var(--ink); transform: scaleY(var(--fill, 1)); transform-origin: top; transition: transform 0.2s linear; }
.journey li { position: relative; padding: 0 0 36px; --mark: var(--ink); }
.journey li[hidden] { display: none; }
.journey li:last-child { padding-bottom: 0; }
.journey li[data-kind="experience"] { --mark: #5b8def; }
.journey li[data-kind="open-source"] { --mark: #2fbfa5; }
.journey li[data-kind="hackathon"] { --mark: #8e6be8; }
.journey li[data-kind="honor"] { --mark: #e09e12; }
.journey li::before {
  content: ''; position: absolute; z-index: 1; left: -31px; top: 5px; width: 9px; height: 9px;
  background: var(--mark); box-shadow: 0 0 0 4px var(--bg);
}
.journey__title { margin-top: 4px; font-size: 21px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.journey__title a { text-underline-offset: 5px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); transition: text-decoration-color 0.2s; }
.journey__title a:hover { text-decoration-color: var(--ink); }
.journey__detail { margin-top: 6px; max-width: 600px; line-height: 1.55; color: var(--ink-2); }
.js .journey li { opacity: 0; transform: translateX(-14px); }
.js .journey li.is-on {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--n, 0) * 60ms);
}

/* ---------- about ---------- */
.about > p {
  max-width: 700px;
  font-size: clamp(20px, 1.8vw, 24px); line-height: 1.45; letter-spacing: -0.01em;
}
.about > p + p { margin-top: 20px; color: var(--ink-2); }
.specs { margin-top: 44px; border-top: 1px solid var(--line); }
.specs--flush { margin-top: 0; }
.specs div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 28px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.specs dd { line-height: 1.6; }

/* ---------- contact ---------- */
.biglink {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none;
  font: 500 clamp(38px, 4.4vw, 60px)/1.1 var(--sans); letter-spacing: -0.03em;
}
.biglink:first-child { padding-top: 0; border-top: 0; }
.biglink:last-child { padding-bottom: 0; }
.biglink > span { transition: transform 0.5s var(--ease); }
.biglink .arrow { width: 0.5em; height: 0.5em; stroke-width: 0.9; transition-duration: 0.5s; }
.biglink:hover > span { transform: translateX(14px); }
.biglink:hover .arrow { transform: translate(5px, -5px); }

/* ---------- footer ---------- */
.site-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  position: relative; padding-top: 28px; padding-bottom: 40px;
  font-size: 14px; color: var(--ink-2);
}
.site-foot nav { display: flex; gap: 20px; }
.site-foot a { text-underline-offset: 4px; }
.site-foot a:hover { color: var(--ink); }

/* ---------- blog ---------- */
.page-head { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); }
.page-head h1 { font-size: clamp(38px, 5.6vw, 80px); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; }
.page-head p { margin-top: 20px; max-width: 560px; font-size: 18px; color: var(--ink-2); }
.feed { padding-bottom: 104px; }
.feed .rows { border-top: 1px solid var(--line); padding-top: 28px; }

.post { max-width: 760px; padding-top: clamp(40px, 6vw, 80px); padding-bottom: 96px; }
.post__back { font-size: 15px; }
.post__back .arrow { transform: rotate(-135deg); }
.post__back:hover .arrow { transform: rotate(-135deg) translate(2px, -2px); }
.post h1 { margin-top: 28px; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.06; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
.post__meta { margin-top: 20px; }
.prose { margin-top: 44px; font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { margin-top: 2em; font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; }
.prose h3 { margin-top: 1.8em; font-size: 21px; line-height: 1.3; font-weight: 500; }
.prose a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: square; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin-left: 0; margin-right: 0; padding-left: 20px; border-left: 2px solid var(--ink); color: var(--ink-2); }
.prose code { font-family: var(--mono); font-size: 0.86em; padding: 0.12em 0.36em; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.prose pre { padding: 20px 22px; overflow-x: auto; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 14px; line-height: 1.7; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.prose hr { height: 1px; border: 0; background: var(--line); margin: 2.4em 0; }
/* a bare URL on its own line becomes a card */
.card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 20px; border: 1px solid var(--line); text-decoration: none;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--ink); }
.card:hover .arrow { transform: translate(2px, -2px); }
.card b { display: block; font-size: 17px; font-weight: 500; }
.card span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- terminal mode ---------- */
.tui-open body { overflow: hidden; }
.tui {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: #08090a; color: #d7dad3; font-family: var(--mono); font-size: 14px; line-height: 1.6;
  --mint: #7cf5c4; color-scheme: dark;
  /* opens and closes the same way: site.js toggles .is-open, then [hidden] */
  opacity: 0; transform: translateY(18px) scale(0.985);
  transition: opacity 0.36s var(--ease), transform 0.46s var(--ease);
}
.tui.is-open { opacity: 1; transform: none; }
.tui[hidden] { display: none; }
/* the page steps back while the terminal is up */
body > header, body > main, body > footer { transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.tui-open body > header, .tui-open body > main, .tui-open body > footer { opacity: 0; transform: scale(0.985); }
.tui__bar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px 0 20px; border-bottom: 1px solid #23262a; color: #8b9097; }
.tui__close { padding: 7px 12px; font: inherit; color: #d7dad3; background: none; border: 1px solid #2c2f34; cursor: pointer; }
.tui__close, .tui__chips button { transition: color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease); }
.tui__close:hover { color: #08090a; background: #d7dad3; }
.tui__screen { flex: 1; overflow-y: auto; padding: 24px 20px 12px; }
.tui__out, .tui__line { max-width: 940px; margin: 0 auto; }
.tui__line { display: flex; align-items: center; gap: 10px; }
.tui__prompt { color: var(--mint); white-space: nowrap; }
.tui__input { flex: 1; min-width: 0; padding: 6px 0; font: inherit; color: #fff; background: none; border: 0; outline: 0; caret-color: var(--mint); }
.tui__chips { display: flex; gap: 8px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #23262a; overflow-x: auto; scrollbar-width: none; }
.tui__chips::-webkit-scrollbar { display: none; }
.tui__chips button { flex: none; padding: 8px 12px; font: inherit; font-size: 13px; color: #d7dad3; background: none; border: 1px solid #2c2f34; cursor: pointer; }
.tui__chips button:hover { color: var(--mint); border-color: var(--mint); }
.tui__ln { white-space: pre-wrap; overflow-wrap: anywhere; animation: tui-ln 0.2s steps(2) both; animation-delay: calc(var(--n) * 18ms); }
@keyframes tui-ln { from { opacity: 0; } to { opacity: 1; } }
.tui .t-h { color: #fff; font-weight: 500; }
.tui .t-d { color: #8b9097; }
.tui .t-e { color: #ff8f8f; }
.tui .t-p, .tui .t-k { color: var(--mint); }
.tui .t-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 16px; }
.tui a { color: #9ec1ff; text-underline-offset: 3px; }
.tui__sprites { display: flex; flex-wrap: wrap; gap: 16px; padding: 4px 0 14px; --px: 5px; }
.tui :focus-visible { outline-color: var(--mint); }

/* ---------- interaction: one feel for everything you can press ---------- */
/* hover eases in, a press dips, and focus looks the same everywhere */
.link, .tui-btn, .chip, .theme-btn, .brand, .card, .site-foot a { transition: color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), text-decoration-color 0.25s var(--ease), transform 0.2s var(--ease); }
.link:active, .tui-btn:active, .chip:active, .theme-btn:active, .card:active, .tui__close:active, .tui__chips button:active { transform: scale(0.96); }
.biglink:active > span, a.row:active .row__main { transform: translateX(6px); }
.theme-btn:hover svg { transform: rotate(24deg); }
:root[data-theme="dark"] .theme-btn:hover svg { transform: rotate(204deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn:hover svg { transform: rotate(204deg); } }
/* nav: an underline draws in from the left */
.site-nav a { position: relative; }
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
/* rows slide a little toward the pointer, like the big contact links */
.row__main { transition: transform 0.45s var(--ease); }
a.row:hover .row__main { transform: translateX(8px); }
.lineup a .sprite, .project .sprite { transition: filter 0.3s; }

/* ---------- scroll reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

/* the parts of a project, the rows of a list and the contact links arrive in turn */
.js .project > div > *, .js .rows[data-reveal] > *, .js [data-reveal] > .biglink { opacity: 0; transform: translateY(12px); }
.js .project.is-in > div > *, .js .rows[data-reveal].is-in > *, .js [data-reveal].is-in > .biglink {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(0.08s + var(--k, 0) * 0.07s);
}
.js .project > div > :nth-child(2), .js .rows > :nth-child(2), .js .biglink:nth-child(2) { --k: 1; }
.js .project > div > :nth-child(3), .js .rows > :nth-child(3), .js .biglink:nth-child(3) { --k: 2; }
.js .project > div > :nth-child(4), .js .rows > :nth-child(4), .js .biglink:nth-child(4) { --k: 3; }
.js .project > div > :nth-child(5), .js .rows > :nth-child(5), .js .biglink:nth-child(5) { --k: 4; }
.js .project > div > :nth-child(6), .js .rows > :nth-child(6) { --k: 5; }
.js .project > div > :nth-child(7), .js .rows > :nth-child(7) { --k: 6; }
/* the header settles in on load */
@keyframes settle { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.js .site-head__in { animation: settle 0.8s var(--ease) both; }
/* the hero drifts and dims as it scrolls away; --hp (0 to 1) comes from site.js */
.hero { transform: translateY(calc(var(--hp, 0) * 48px)); opacity: calc(1 - var(--hp, 0) * 0.75); }

/* theme switch: the two themes cross-fade slowly (site.js) */
:root.theming::view-transition-old(root), :root.theming::view-transition-new(root) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
/* browsers without view transitions fade the colours instead */
:root.theming-css *, :root.theming-css *::before, :root.theming-css *::after { transition: background-color 0.7s ease, color 0.7s ease, border-color 0.7s ease, fill 0.7s ease, stroke 0.7s ease !important; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .flag__grid { grid-template-columns: minmax(0, 1fr); }
  .tui-btn__t { display: none; }
  .site-nav { gap: 20px; }
}
@media (max-width: 860px) {
  .section { grid-template-columns: minmax(0, 1fr); padding-top: 64px; padding-bottom: 64px; }
  .section__head { position: static; }
}
@media (max-width: 640px) {
  :root { --pad: 20px; }
  .site-head { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-head__in { padding-top: 8px; }
  .track, .walker { display: none; }
  .tui-btn { margin-left: auto; }
  .tui-btn__t { display: none; }
  .theme-btn { margin-left: 4px; }
  .tui { font-size: 13px; }
  .tui__input { font-size: 16px; }
  .tui .t-kv { grid-template-columns: 112px minmax(0, 1fr); gap: 0 12px; }
  .site-nav {
    order: 3; width: calc(100% + 2 * var(--pad)); gap: 22px; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad);
    border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 14px 0; font-size: 14px; }
  .lineup { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .flag__title { --px: 5px; }
  .section { padding-top: 48px; padding-bottom: 56px; }
  .project { grid-template-columns: minmax(0, 1fr); padding: 36px 0; --px: 4px; }
  .project--flag { --px: 5px; }
  .project h3 { font-size: 26px; }
  .project__tag { font-size: 18px; }
  .row { flex-wrap: wrap; gap: 4px 16px; padding: 16px 0; }
  .row > .mono { width: 100%; }
  .row .arrow { display: none; }
  .row__title { font-size: 18px; }
  .specs div { grid-template-columns: minmax(0, 1fr); }
  .biglink { padding: 16px 0; }
  .term { padding: 18px; font-size: 13px; }
  .prose { font-size: 17px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .word > span, .js [data-reveal], .js .journey li, .js .cells i, .js .project > div > *, .js .rows[data-reveal] > *, .js [data-reveal] > .biglink { opacity: 1; transform: none; }
  .hero { transform: none; opacity: 1; }
  .js .lineup__stand::after, .js .bar i { transform: none; }
  @view-transition { navigation: none; }
}
