/* Connor Weldy portfolio
   Identity: an engineering drawing set. Archivo (expanded) for display,
   Geist for reading, Geist Mono for annotations. One accent: the signal blue
   from the CW mark. Venture panels keep their own brand colors. */

@font-face {
  font-family: "Archivo";
  src: url("./assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("./assets/fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("./assets/fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #eceef1;
  --bg-raise: #f6f7f9;
  --bg-sunk: #e1e5ea;
  --ink: #0c0f14;
  --ink-2: #2d3441;
  --muted: #5a6371;
  --faint: #7f8794;
  --line: #cdd2da;
  --line-strong: #aab2bd;
  --grid: rgba(12, 15, 20, .055);
  --grid-major: rgba(12, 15, 20, .085);
  --accent: #1f4fe0;
  --accent-strong: #133bb3;
  --accent-soft: rgba(31, 79, 224, .1);
  --on-accent: #ffffff;
  --on-ink: #f6f7f9;
  --chip: #dde2ea;
  --shadow: 16, 24, 40;
  --fig-ink: #121824;
  --fig-accent: #1f4fe0;
  --fig-mode: 0;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1400px;
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090b0f;
    --bg-raise: #10141a;
    --bg-sunk: #06080b;
    --ink: #e8ecf2;
    --ink-2: #c3cad5;
    --muted: #8d96a5;
    --faint: #667080;
    --line: #232b36;
    --line-strong: #394352;
    --grid: rgba(232, 236, 242, .04);
    --grid-major: rgba(232, 236, 242, .07);
    --accent: #6f90ff;
    --accent-strong: #9ab0ff;
    --accent-soft: rgba(111, 144, 255, .14);
    --on-accent: #05070b;
    --on-ink: #090b0f;
    --chip: #dde2ea;
    --shadow: 0, 0, 0;
    --fig-ink: #cdd6e4;
    --fig-accent: #5d84ff;
    --fig-mode: 1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090b0f;
  --bg-raise: #10141a;
  --bg-sunk: #06080b;
  --ink: #e8ecf2;
  --ink-2: #c3cad5;
  --muted: #8d96a5;
  --faint: #667080;
  --line: #232b36;
  --line-strong: #394352;
  --grid: rgba(232, 236, 242, .04);
  --grid-major: rgba(232, 236, 242, .07);
  --accent: #6f90ff;
  --accent-strong: #9ab0ff;
  --accent-soft: rgba(111, 144, 255, .14);
  --on-accent: #05070b;
  --on-ink: #090b0f;
  --chip: #dde2ea;
  --shadow: 0, 0, 0;
  --fig-ink: #cdd6e4;
  --fig-accent: #5d84ff;
  --fig-mode: 1;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  overflow-x: clip;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease !important;
}
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
kbd { font-family: var(--font-mono); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.shell {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared type ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg) scale(.8);
}
.eyebrow-count {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.section { padding-block: clamp(64px, 8vw, 112px) 0; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
  align-items: end;
  gap: 18px clamp(24px, 5vw, 72px);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-title {
  font-family: var(--font-display);
  font-stretch: 116%;
  font-weight: 800;
  font-size: clamp(2.3rem, 5.4vw, 4.9rem);
  line-height: .94;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section-intro {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 25rem;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease);
}
.btn span[aria-hidden] { font-family: var(--font-mono); transition: transform .25s var(--ease); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover span[aria-hidden] { transform: translateY(3px); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost:hover span[aria-hidden] { transform: translate(2px, -2px); }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
}
.brand-chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--chip);
  box-shadow: inset 0 0 0 1px rgba(12, 15, 20, .08);
}
.brand-chip img { width: 27px; height: auto; }
.brand-chip--sm { width: 28px; height: 28px; border-radius: 7px; }
.brand-chip--sm img { width: 22px; }
.brand-name {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 750;
  font-size: 15px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--bg-sunk); }
.site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.header-tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.palette-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.palette-trigger:hover { border-color: var(--line-strong); color: var(--ink); }
.palette-trigger .i-menu, .palette-trigger .t-narrow { display: none; }
.palette-trigger svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.palette-kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-sunk);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.theme-control {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.theme-control button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.theme-control button:hover { color: var(--ink); }
.theme-control button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.theme-control svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-control svg .fill { fill: currentColor; stroke: none; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

/* Without JavaScript, hide controls that need it. */
.no-js .palette-trigger, .no-js .theme-control, .no-js .figure-tabs, .no-js .figure-readout, .no-js .figure-hint, .no-js #hero-canvas { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(20px, 4vw, 52px) clamp(28px, 4vw, 48px);
}
.hero-grid {
  position: absolute;
  inset: calc(var(--header-h) * -1) 0 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 68% 38%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 68% 38%, #000 25%, transparent 78%);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(20px, 3.5vw, 56px);
}
.hero-copy { min-width: 0; padding-block: clamp(12px, 3vw, 40px); }
.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-kicker span:first-child { color: var(--ink); font-weight: 600; }
.hero-kicker span + span::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 14px;
  vertical-align: middle;
  background: var(--line-strong);
}
.hero-title {
  margin: clamp(16px, 2.2vw, 26px) 0 clamp(20px, 2.4vw, 28px);
  font-family: var(--font-display);
  font-stretch: 114%;
  font-weight: 800;
  font-size: clamp(2.35rem, 5.2vw, 5.4rem);
  line-height: .95;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero-title .word { display: inline-block; }
.hw {
  position: relative;
  display: inline;
  color: var(--ink);
  cursor: pointer;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 0% .075em;
  transition: color .35s ease, background-size .6s var(--ease);
}
.hw.is-active { color: var(--accent); background-size: 100% .075em; }
.hero-lede {
  max-width: 35rem;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.62;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3vw, 34px); }

.hero-figure { position: relative; min-width: 0; display: grid; gap: 12px; }
.figure-stage {
  position: relative;
  height: clamp(320px, 40vw, 560px);
  touch-action: pan-y;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#hero-canvas.is-dragging { cursor: grabbing; }
.figure-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62%, 360px);
  height: auto;
  transform: translate(-50%, -50%);
  transition: opacity .6s ease;
}
.hero-figure.is-live .figure-fallback { opacity: 0; }
.hero-figure.no-webgl #hero-canvas, .hero-figure.no-webgl .figure-hint { display: none; }
:root[data-theme="dark"] .hero-figure:not(.is-live) .figure-fallback { padding: 7%; border-radius: 28px; background: var(--chip); }
.reg { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--line-strong); }
.reg::before { left: 0; right: 0; top: 50%; height: 1px; }
.reg::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.reg--tl { top: 0; left: 0; }
.reg--tr { top: 0; right: 0; }
.reg--bl { bottom: 0; left: 0; }
.reg--br { bottom: 0; right: 0; }
.figure-hint {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.figure-stage:hover .figure-hint { opacity: 1; }
.figure-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.figure-no { color: var(--accent); font-weight: 600; }
.figure-readout { font-variant-numeric: tabular-nums; color: var(--faint); white-space: nowrap; }
.figure-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.figure-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.figure-tabs button span { color: var(--faint); }
.figure-tabs button:hover { color: var(--ink); border-color: var(--line-strong); }
.figure-tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.figure-tabs button[aria-pressed="true"] span { color: inherit; opacity: .6; }

.title-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-raise) 70%, transparent);
}
.title-block > div { padding: 14px 18px 16px; min-width: 0; }
.title-block > div + div { border-left: 1px solid var(--line); }
.title-block dt {
  margin-bottom: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.title-block dd { font-weight: 550; font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.tb-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .02em;
}

/* Load sequence: the headline assembles once, then stays put. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .word { animation: rise .9s var(--ease) both; animation-delay: calc(var(--w, 0) * 55ms + 80ms); }
  .js .hero-kicker, .js .hero-lede, .js .hero-actions { animation: fade-up .8s var(--ease) both; }
  .js .hero-lede { animation-delay: .45s; }
  .js .hero-actions { animation-delay: .55s; }
  .js .title-block { animation: fade-up .8s .65s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Work ---------- */
.filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.filter:hover { color: var(--ink); background: var(--bg-sunk); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.filter-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: .65;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}
.work-card {
  --span: 6;
  grid-column: span var(--span);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raise);
  transition: border-color .3s ease, box-shadow .4s ease;
}
.work-card:hover { border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(var(--shadow), .35); }
.work-card:focus-within { border-color: var(--accent); }
.work-card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-vignette {
  --v-bg: #dfe3ea;
  position: relative;
  isolation: isolate;
  height: clamp(250px, 24vw, 330px);
  overflow: hidden;
  border-radius: 5px;
  background: var(--v-bg);
}
.card-vignette > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.vignette-logo {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.vignette-logo img {
  width: var(--logo-w, 60%);
  height: auto;
  max-height: var(--logo-h, 70%);
  object-fit: contain;
  transition: transform .8s var(--ease);
}
.work-card:hover .vignette-logo img { transform: scale(1.035); }
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 10px 8px;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.card-cat { color: var(--accent); font-weight: 600; }
.card-label { color: var(--muted); }
.card-title {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 6; border-radius: 10px; }
.card-link:focus-visible { outline: none; }
.card-tagline {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--ink-2);
  text-wrap: balance;
}
.card-summary { max-width: 38rem; color: var(--muted); font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.card-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.card-specs > div { padding: 10px 12px 0 0; min-width: 0; }
.card-specs > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.card-specs dt {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.card-specs dd { margin-top: 3px; font-size: 13.5px; font-weight: 550; line-height: 1.35; }
.card-keys { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12.5px; }
.card-keys span { display: inline-flex; align-items: center; gap: 6px; }
.card-keys kbd {
  min-width: 24px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  font-size: 11px;
  text-align: center;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}
.card-domain { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.card-go i { font-style: normal; display: inline-block; transition: transform .3s var(--ease); }
.work-card:hover .card-go i { transform: translate(3px, -3px); }
.work-card--play .card-go {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
}
.card-status { color: var(--muted); }

/* Feature layout: one wide card with the panel beside the text */
.work-card.is-feature { --span: 12; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; }
.work-card.is-feature .card-vignette { height: auto; min-height: clamp(340px, 30vw, 430px); }
.work-card.is-feature .card-body { padding: 18px 18px 10px 24px; justify-content: center; }
.work-card.is-feature .card-title { font-size: clamp(2rem, 3.4vw, 3.1rem); }
.work-card.is-feature .card-tagline { font-size: 1.25rem; }

.empty-state { padding: 48px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); text-align: center; }
.noscript-list { display: grid; gap: 10px; font-size: 17px; }

/* ---------- Scene: Iron Saddle Armory (drafting sheet) ---------- */
.scene-saddle {
  --v-bg: #eee6d8;
  --saddle-ink: #7c2d1f;
  background-color: var(--v-bg);
  background-image:
    linear-gradient(rgba(96, 60, 30, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 60, 30, .09) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 45%, #f8f3ea 0%, rgba(248, 243, 234, 0) 70%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  background-position: center;
}
.scene-saddle .vignette-logo { --logo-w: min(66%, 440px); --logo-h: 58%; }
.scene-saddle .vignette-logo img { filter: drop-shadow(0 10px 18px rgba(80, 40, 20, .12)); }
.sd-dim { position: absolute; z-index: 2; color: var(--saddle-ink); font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.sd-dim--h { left: 9%; right: 9%; bottom: 26px; height: 1px; }
.sd-dim--v { top: 16%; bottom: 16%; left: 26px; width: 1px; }
.sd-line { position: absolute; inset: 0; background: currentColor; opacity: .75; transform-origin: center; transition: transform 1.2s var(--ease); }
.sd-dim--h .sd-line { transform: scaleX(var(--draw, 1)); }
.sd-dim--v .sd-line { transform: scaleY(var(--draw, 1)); }
.sd-dim--h::before, .sd-dim--h::after, .sd-dim--v::before, .sd-dim--v::after { content: ""; position: absolute; background: currentColor; opacity: .75; }
.sd-dim--h::before, .sd-dim--h::after { top: -6px; width: 1px; height: 13px; }
.sd-dim--h::before { left: 0; }
.sd-dim--h::after { right: 0; }
.sd-dim--v::before, .sd-dim--v::after { left: -6px; width: 13px; height: 1px; }
.sd-dim--v::before { top: 0; }
.sd-dim--v::after { bottom: 0; }
.sd-label {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 2px 8px;
  background: var(--v-bg);
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.sd-dim--v .sd-label { transform: translate(-50%, -50%) rotate(-90deg); }
.sd-stamp { position: absolute; z-index: 2; top: 16px; right: 16px; width: 92px; height: 92px; color: var(--saddle-ink); }
.sd-stamp svg { width: 100%; height: 100%; overflow: visible; }
.sd-stamp text { font-family: var(--font-mono); font-size: 9.2px; letter-spacing: 2.1px; fill: currentColor; text-transform: uppercase; }
.sd-stamp .ring { fill: none; stroke: currentColor; stroke-width: 1; opacity: .7; }
.sd-callout { position: absolute; z-index: 2; left: 22px; top: 18px; color: var(--saddle-ink); font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; }
.sd-callout b { display: block; font-weight: 600; }

/* ---------- Scene: Apis Dynamics (honeycomb field) ---------- */
.scene-apis { --v-bg: radial-gradient(ellipse at 50% 42%, #1b1e23 0%, #0a0b0d 72%); }
.scene-apis .vignette-logo { --logo-w: min(66%, 400px); --logo-h: 42%; }
.scene-apis .vignette-logo::before {
  content: "";
  position: absolute;
  width: min(80%, 480px);
  height: 46%;
  background: radial-gradient(ellipse, rgba(10, 11, 13, .85) 30%, transparent 70%);
}
.scene-apis .vignette-logo img { position: relative; }
.ap-tag {
  position: absolute;
  z-index: 4;
  left: 18px;
  bottom: 16px;
  color: #c9a24a;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ap-tag--r { left: auto; right: 18px; color: #8b8f96; }

/* ---------- Scene: FFL Bridge (selection flow) ---------- */
.scene-bridge {
  --v-bg: #f4f1e9;
  background-color: var(--v-bg);
  background-image: radial-gradient(rgba(150, 115, 50, .22) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.fb-wrap { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 26px); padding: 18px; }
.fb-logo { width: min(52%, 280px); height: auto; }
.fb-flow { width: min(96%, 540px); height: auto; overflow: visible; }
.fb-flow .edge { fill: none; stroke: #c79a48; stroke-width: 1.4; opacity: .55; }
.fb-flow .node rect { fill: #fffdf8; stroke: #d9cdb3; stroke-width: 1; }
.fb-flow .node--end rect { fill: #0b0f12; stroke: #0b0f12; }
.fb-flow text { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; fill: #2b2f33; text-transform: uppercase; }
.fb-flow .node--end text { fill: #f4e7c8; }
.fb-flow .check { fill: none; stroke: #0b0f12; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12; stroke-dashoffset: 12; transition: stroke-dashoffset .4s ease; }
.fb-flow .check-ring { fill: #fffdf8; stroke: #c79a48; stroke-width: 1.2; transition: fill .3s ease; }
.fb-flow .node.is-ok .check { stroke-dashoffset: 0; }
.fb-flow .node.is-ok .check-ring { fill: #f1dfb5; }
.fb-flow .pulse { fill: #c79a48; }

/* ---------- Scene: Plainspoken Design (update request) ---------- */
.scene-plainspoken {
  --v-bg: linear-gradient(155deg, #f2f5ff 0%, #dde6fb 100%);
  --ps-navy: #0f1a44;
  --ps-blue: #3d5bf5;
}
.ps-logo { position: absolute; z-index: 4; top: 18px; left: 20px; width: clamp(84px, 11vw, 122px); height: auto; }
.ps-window {
  position: absolute;
  z-index: 2;
  top: 26px;
  right: -4%;
  bottom: -14px;
  width: 66%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(15, 26, 68, .12);
  border-radius: 10px 10px 0 0;
  background: #ffffff;
  box-shadow: 0 30px 60px -24px rgba(15, 26, 68, .35);
  overflow: hidden;
  transition: transform .9s var(--ease);
}
.work-card:hover .ps-window { transform: translateY(-6px); }
.ps-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid #e7eaf3; flex: none; }
.ps-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d7dcea; }
.ps-url { margin-left: 8px; padding: 2px 10px; border-radius: 99px; background: #f1f3f9; color: #69708a; font-family: var(--font-mono); font-size: 9.5px; }
.ps-hero { padding: 16px 18px 18px; background: var(--ps-navy); color: #ffffff; flex: none; }
.ps-eyebrow { color: #9fb2ff; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; }
.ps-head { margin-top: 6px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(14px, 1.5vw, 19px); font-weight: 700; line-height: 1.15; max-width: 18em; }
.ps-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 18px; }
.ps-photo { border-radius: 6px; background: linear-gradient(135deg, #c7d3ff, #7d93f0); transition: background .6s ease; }
.scene-plainspoken[data-step="2"] .ps-photo { background: linear-gradient(135deg, #ffd9a8, #f08a5d); }
.ps-hours { display: grid; align-content: start; gap: 5px; color: #394060; font-size: 10.5px; }
.ps-hours b { color: var(--ps-navy); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; }
.ps-hours span { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid #edf0f7; }
.ps-sat { border-radius: 3px; transition: background-color .5s ease, color .5s ease; }
.scene-plainspoken[data-step="2"] .ps-sat { background: #e4f6ea; color: #0f6b3a; }
.ps-request {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 18px;
  width: min(54%, 250px);
  padding: 12px 13px;
  border: 1px solid rgba(15, 26, 68, .1);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 40px -18px rgba(15, 26, 68, .45);
  color: var(--ps-navy);
  transition: transform .9s var(--ease);
}
.work-card:hover .ps-request { transform: translateY(-10px); }
.ps-request small { color: var(--ps-blue); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; }
.ps-request p { margin: 5px 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: 12.5px; line-height: 1.35; }
.ps-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 99px; background: #eef1ff; color: var(--ps-blue); font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; transition: background-color .4s ease, color .4s ease; }
.ps-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.scene-plainspoken[data-step="1"] .ps-status { background: #fff4e0; color: #9a5b00; }
.scene-plainspoken[data-step="2"] .ps-status { background: #e4f6ea; color: #0f6b3a; }

/* ---------- Scene: Voidrunner (warp field) ---------- */
.scene-voidrunner {
  --v-bg: #04060d;
  background:
    radial-gradient(ellipse 60% 55% at 22% 28%, rgba(106, 58, 230, .32), transparent 70%),
    radial-gradient(ellipse 55% 50% at 82% 76%, rgba(20, 170, 255, .22), transparent 70%),
    #04060d;
}
.scene-voidrunner .vignette-logo { --logo-w: min(46%, 280px); --logo-h: 72%; }
.scene-voidrunner .vignette-logo img { filter: drop-shadow(0 0 28px rgba(80, 190, 255, .35)); }
.vr-ring {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(70%, 440px);
  aspect-ratio: 3.2 / 1;
  border: 1px solid rgba(120, 210, 255, .45);
  border-radius: 50%;
  transform: translate(-50%, -38%);
  box-shadow: 0 0 30px rgba(90, 170, 255, .25), inset 0 0 22px rgba(150, 90, 255, .25);
  pointer-events: none;
}
.vr-hud { position: absolute; z-index: 4; color: #a6ecff; font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; pointer-events: none; }
.vr-hud--tl { top: 18px; left: 20px; }
.vr-hud--tr { top: 18px; right: 20px; color: #7c86a8; }
.vr-hud--bl { bottom: 18px; left: 20px; }
.vr-hud--br { bottom: 18px; right: 20px; color: #7c86a8; }
.vr-hud--bl b { color: #ffffff; font-weight: 600; }
.vr-corner { position: absolute; z-index: 4; width: 20px; height: 20px; border: 1.5px solid rgba(160, 230, 255, .6); pointer-events: none; }
.vr-corner--tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.vr-corner--tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.vr-corner--bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.vr-corner--br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.vr-scan {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}

/* Default panel for projects without a custom scene */
.scene-default {
  --v-bg: var(--bg-sunk);
  background-image: linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------- Code ---------- */
.repo-list { border-top: 1px solid var(--line); counter-reset: repo; }
.repo { border-bottom: 1px solid var(--line); }
.repo-link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr) minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px clamp(18px, 3vw, 40px);
  padding: 22px clamp(4px, 1vw, 14px);
  text-decoration: none;
  transition: background-color .25s ease;
}
.repo-link:hover { background: var(--bg-raise); }
.repo-title { display: grid; gap: 4px; min-width: 0; }
.repo-name {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 750;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.repo-path { color: var(--faint); font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-path b { color: var(--muted); font-weight: 500; }
.repo-desc { color: var(--muted); font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.repo-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lang-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lang, var(--faint)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.repo-go {
  justify-self: end;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 18px;
  transition: transform .3s var(--ease), color .2s ease;
}
.repo-link:hover .repo-go { color: var(--accent); transform: translate(3px, -3px); }
.repo-source { margin-top: 14px; color: var(--faint); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); }
.about-head { display: block; align-self: start; }
.about-head .section-title { font-size: clamp(2.2rem, 3.8vw, 3.8rem); }
.about-head .eyebrow { margin-bottom: 18px; }
.about-body { display: grid; gap: clamp(28px, 4vw, 44px); min-width: 0; }
.about-lede {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.3vw, 2.05rem);
  line-height: 1.28;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
.record { border-top: 1px solid var(--line); }
.record > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.record dt { padding-top: 3px; color: var(--faint); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.record dd { font-size: 16px; line-height: 1.55; }
.toolbox { display: flex; flex-wrap: wrap; gap: 6px; }
.toolbox span { padding: 3px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-raise); font-family: var(--font-mono); font-size: 12px; }
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.focus-grid article { display: grid; align-content: start; gap: 8px; padding-top: 14px; border-top: 2px solid var(--ink); }
.focus-grid h3 { font-family: var(--font-display); font-stretch: 106%; font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em; }
.focus-grid p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ---------- Connect / footer ---------- */
.connect { margin-top: clamp(80px, 11vw, 150px); padding-block: clamp(56px, 7vw, 96px) calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg-raise); }
.connect-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.connect-layout .section-head { display: block; margin: 0; }
.connect-layout .eyebrow { margin-bottom: 18px; }
.connect-title { font-size: clamp(2.6rem, 6.6vw, 6.4rem); }
.connect-links { display: grid; }
.connect-group {
  margin: 22px 0 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.connect-group:first-child { margin-top: 0; }
.connect-link {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 16px;
  padding: 16px 10px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  overflow: hidden;
  transition: color .35s var(--ease);
}
.connect-group + .connect-link { border-top: 1px solid var(--line); }
.connect-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .45s var(--ease);
}
.connect-link:hover { color: var(--on-ink); }
.connect-link:hover::before { transform: scaleY(1); }
.connect-label { font-family: var(--font-display); font-stretch: 110%; font-weight: 750; font-size: clamp(1.3rem, 2.2vw, 1.8rem); letter-spacing: -.02em; }
.connect-handle { color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; transition: color .35s var(--ease); }
.connect-link:hover .connect-handle { color: inherit; opacity: .7; }
.connect-arrow { font-family: var(--font-mono); font-size: 18px; text-align: right; transition: transform .35s var(--ease); }
.connect-link:hover .connect-arrow { transform: translate(3px, -3px); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  margin-top: clamp(48px, 7vw, 88px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-stretch: 110%; font-weight: 750; text-decoration: none; }
.colophon { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }

/* ---------- Command palette ---------- */
.palette {
  width: min(640px, calc(100% - 32px));
  max-height: min(560px, calc(100dvh - 120px));
  margin: max(10vh, calc(env(safe-area-inset-top, 0px) + 24px)) auto auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-raise);
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgba(var(--shadow), .55);
  overflow: hidden;
}
.palette::backdrop { background: rgba(6, 8, 12, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.palette[open] { animation: palette-in .22s var(--ease); }
@keyframes palette-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
.palette-box { display: flex; flex-direction: column; max-height: inherit; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-search svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.palette-search input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.palette-search input::placeholder { color: var(--faint); }
.palette kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-sunk); color: var(--muted); font-size: 11px; }
.palette-list { flex: 1; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.palette-heading { padding: 12px 10px 6px; color: var(--faint); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.palette-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.palette-item[aria-selected="true"] { background: var(--accent-soft); }
.palette-item[aria-selected="true"] .palette-glyph { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.palette-glyph { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.palette-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.palette-hint { color: var(--faint); font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }
.palette-empty { padding: 28px 10px; color: var(--muted); text-align: center; }
.palette-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.palette-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Cursor chip over work panels ---------- */
.cursor-chip {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x, -100px), var(--y, -100px), 0) translate(14px, 14px) scale(.85);
  transition: opacity .2s ease, transform .12s linear;
}
.cursor-chip.is-on { opacity: 1; transform: translate3d(var(--x), var(--y), 0) translate(14px, 14px) scale(1); }

/* ---------- Scroll reveal (content stays visible at rest) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transition: transform 1s var(--ease), border-color .3s ease, box-shadow .4s ease, background-color .25s ease; }
  .js .reveal.is-pending { transform: translateY(36px); }
  .js .work-card.is-entering { animation: card-in .55s var(--ease) both; }
}
@keyframes card-in { from { opacity: .001; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .figure-tabs button span { display: none; }
}
@media (max-width: 1100px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .site-nav { justify-self: center; }
  .palette-trigger-text { display: none; }
  .title-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title-block > div:nth-child(3) { border-left: 0; }
  .title-block > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .work-card.is-feature { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .repo-link { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 28px; }
  .repo-meta { grid-column: 1 / 3; }
  .repo-go { grid-row: 1; grid-column: 3; }
}
@media (max-width: 860px) {
  :root { --header-h: 58px; }
  .site-nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .palette-kbd { display: none; }
  .palette-trigger { padding: 0 11px; }
  .palette-trigger .i-search, .palette-trigger .t-wide { display: none; }
  .palette-trigger .i-menu, .palette-trigger .t-narrow { display: inline; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 0; }
  .figure-stage { height: clamp(300px, 78vw, 440px); }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .work-card, .work-card.is-feature { grid-column: 1 / -1; }
  .work-card.is-feature { display: flex; }
  .work-card.is-feature .card-vignette { min-height: 0; height: clamp(280px, 60vw, 380px); }
  .work-card.is-feature .card-body { padding: 20px 10px 8px; }
  .about-layout, .connect-layout { grid-template-columns: minmax(0, 1fr); }
  .focus-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hero-kicker span + span::before { display: none; }
  .repo-link { grid-template-columns: minmax(0, 1fr) 24px; padding-inline: 2px; }
  .repo-title { grid-column: 1; }
  .repo-desc, .repo-meta { grid-column: 1 / -1; }
  .repo-go { grid-row: 1; grid-column: 2; align-self: start; }
  .card-specs { grid-template-columns: minmax(0, 1fr); }
  .card-specs > div, .card-specs > div + div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .card-specs dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
  .record > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .filter-bar { display: flex; }
  .filter { flex: 1 1 auto; justify-content: center; padding: 0 10px; }
  .ps-logo { top: 14px; left: 14px; width: 78px; }
  .ps-window { width: 62%; right: -12%; top: 22px; }
  .ps-body { grid-template-columns: 1fr; }
  .ps-photo { display: none; }
  .ps-request { left: 12px; bottom: 12px; width: 60%; padding: 10px 11px; }
  .sd-stamp { width: 70px; height: 70px; top: 12px; right: 12px; }
  .sd-dim--v { display: none; }
  .scene-saddle .vignette-logo { --logo-w: 78%; }
  .scene-voidrunner .vignette-logo { --logo-w: 52%; }
  .vr-hud--tr, .vr-hud--br { display: none; }
  .fb-logo { width: 62%; }
}
@media (max-width: 420px) {
  .header-inner { gap: 10px; }
  .brand-name { font-size: 14px; }
  .palette-trigger { padding: 0 9px; }
  .theme-control button { width: 28px; height: 28px; }
  .figure-tabs button { padding: 6px 9px; font-size: 10.5px; }
  .title-block { grid-template-columns: minmax(0, 1fr); }
  .title-block > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .card-body { padding-inline: 6px; }
  .ps-request p { font-size: 11.5px; }
}
@media (max-width: 360px) {
  .palette-trigger .t-narrow { display: none; }
  .palette-trigger { padding: 0 10px; }
}

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