:root {
  /* Hermes Agent (Nous Research) — light brutalist.
     Off-white paper, electric blue dominant, acid yellow pop, black ink, sharp corners. */
  --paper: #f5f5f5;
  --paper-pure: #ffffff;
  --ink: #000000;
  --ink-dim: #2b2b2b;
  --ink-faint: #6a6a6a;
  --brand: #0000f2;        /* electric blue */
  --brand-deep: #0000c4;
  --pop: #edff45;          /* acid yellow */
  --inv-ink: #f5f5f5;      /* text on blue bands — constant across light/dark */
  --brand-text: #0000f2;   /* blue used as TEXT on a surface; brightens in dark for contrast */

  /* legacy token aliases so existing markup keeps working */
  --bg: var(--paper);
  --bg-raise: var(--paper-pure);
  --accent: var(--brand);  /* interaction/text color = blue (high contrast on paper) */

  --line: rgba(0, 0, 0, 0.16);
  --line-strong: #000000;

  /* Hermes signature diagonal gradient */
  --grad: linear-gradient(160deg,
    rgba(0,0,0,0) 0%, #f5f5f5 15%, #edff45 20%, #0000f2 25%,
    rgba(0,0,0,0) 35%, rgba(0,0,0,0) 40%, #f5f5f5 55%, #edff45 60%, #0000f2 65%,
    rgba(0,0,0,0) 75%, rgba(0,0,0,0) 80%, #f5f5f5 95%, #edff45 100%);
  --grad-text: linear-gradient(100deg, #0000f2 0%, #6a00f2 100%);

  --display: "Space Grotesk", system-ui, sans-serif;
  --serif: "Space Grotesk", system-ui, sans-serif; /* legacy alias */
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1320px;

  /* motion */
  --dur-xs: 150ms;
  --dur-sm: 200ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* Dark mode: flip only the paper surfaces. Blue bands + --inv-ink stay put. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a0a0a;
    --paper-pure: #161616;
    --ink: #f5f5f5;
    --ink-dim: #c8c8c8;
    --ink-faint: #8a8a8a;
    --line: rgba(245, 245, 245, 0.16);
    --line-strong: #f5f5f5;
    --brand-text: #6a8bff;
    --grad-text: linear-gradient(100deg, #5b8cff 0%, #edff45 100%); /* legible on dark sheet */
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* Focus ring. --brand-text is already theme-aware (blue on paper, periwinkle on
   dark), so it clears 3:1 in both modes; on the blue bands it would be blue on
   blue, so those switch to the acid yellow. */
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.hero-band :focus-visible,
.about-band :focus-visible,
.contact-band :focus-visible { outline-color: var(--pop); }
img { display: block; max-width: 100%; }
::selection { background: var(--pop); color: #000; }

/* ── display + utility type ─────────────────────────────── */
.serif { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.035em; line-height: 0.95; }

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* yellow marker highlight, very Hermes */
.mark-hi { background: var(--pop); color: #000; padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.rule { height: 1px; background: var(--line-strong); border: 0; }

/* ── the "arc" illustration: moving signature gradient ──── */
.arc {
  background-image: var(--grad);
  background-size: 320% 320%;
  background-position: 15% 15%;
  animation: arc-stroke 14s var(--ease) infinite alternate;
}
@keyframes arc-stroke {
  0%   { background-position: 15% 15%; }
  100% { background-position: 85% 85%; }
}

/* ── scroll reveal ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-3deg); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pop-in { 0% { transform: scale(.9); opacity: 0; } 60% { transform: scale(1.03); } 100% { transform: scale(1); opacity: 1; } }

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

/* ── App layout (from App.svelte) ───────────────────── */
  /* ── NAV — sharp, light, hairline ─────────────────────── */
  .nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    padding: clamp(.6rem, 1.6vw, 1rem) clamp(.7rem, 3vw, 1.4rem);
    pointer-events: none; /* gutter doesn't block content clicks */
  }
  .nav-inner {
    pointer-events: auto;
    max-width: var(--maxw); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 54px; padding-inline: 1.2rem;
    background: color-mix(in srgb, var(--paper) 80%, transparent);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line-strong);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
  }
  .mark { display: flex; align-items: center; min-height: 44px; gap: .55rem; font-family: var(--mono); font-weight: 700; font-size: .82rem; letter-spacing: .12em; }
  .mark svg { color: var(--brand); }
  .links-inline { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
  .links-inline a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim); transition: color var(--dur-sm) var(--ease); }
  .links-inline a:hover { color: var(--brand-text); }
  .links-inline a.cta, .panel a.cta {
    color: #000; background: var(--pop); font-weight: 700;
    padding: .5rem 1rem; transition: background var(--dur-sm) var(--ease), color var(--dur-sm) var(--ease);
  }
  .cta:hover { background: var(--brand) !important; color: #fff !important; }

  /* hamburger (mobile) */
  .menu { display: none; position: relative; }
  .menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; align-content: center; justify-items: center; gap: 5px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary span { width: 20px; height: 2px; background: var(--ink); transition: transform var(--dur-sm), opacity var(--dur-sm); }
  .menu[open] summary span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu[open] summary span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .panel {
    position: absolute; right: 0; top: calc(100% + .6rem); min-width: 200px;
    display: flex; flex-direction: column; padding: .4rem;
    background: var(--paper-pure); border: 1px solid var(--line-strong);
  }
  .panel a { display: flex; align-items: center; min-height: 44px; padding: .7rem .8rem; font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); transition: background var(--dur-sm), color var(--dur-sm); }
  .panel a:hover { background: var(--brand); color: #fff; }
  @media (max-width: 680px) { .links-inline { display: none; } .menu { display: block; } }

  /* ── HERO BAND ────────────────────────────────────────── */
  .hero-band {
    position: relative; overflow: hidden;
    background: var(--brand); color: var(--inv-ink);
    padding-top: 58px;
  }
  .hero {
    position: relative; z-index: 2; padding: clamp(5rem, 14vh, 9rem) var(--gutter) clamp(4rem, 9vh, 7rem);
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  }
  .hero-copy { min-width: 0; }
  .hero-eyebrow { color: rgba(245,245,245,.82); margin-bottom: 2.2rem; }
  .hero-title {
    font-size: clamp(2.4rem, 6vw, 6rem);
    color: var(--inv-ink); font-weight: 400;
  }
  .hero-tag { margin-top: 2rem; font-size: clamp(1rem, 1.7vw, 1.35rem); color: rgba(245,245,245,.82); max-width: 48ch; font-family: var(--mono); letter-spacing: .01em; }

  .hero-actions { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1rem; }
  .btn { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: .85rem 1.5rem; transition: transform var(--dur-sm) var(--ease), background var(--dur-sm) var(--ease), color var(--dur-sm) var(--ease); }
  .btn-pop { background: var(--pop); color: #000; font-weight: 700; }
  .btn-pop:hover { transform: translateY(-2px); }
  .btn-ghost { border: 1px solid rgba(245,245,245,.65); color: var(--inv-ink); }
  .btn-ghost:hover { background: var(--paper); color: var(--brand); }

  /* hero illustrations */
  .hero-arc { position: absolute; z-index: 1; right: -12%; top: -20%; width: 70vw; height: 140%; opacity: .5; filter: blur(2px); border-radius: 50%; pointer-events: none; }
  .hero-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 3; }

  /* ── HERMES PORTRAIT ──────────────────────────────────── */
  .hero-portrait {
    position: relative; justify-self: center; width: 100%; max-width: 360px; aspect-ratio: 1;
    margin: 0; opacity: 0; transform: scale(.92);
    animation: portrait-in .9s var(--ease-out) .15s forwards, float 8s var(--ease) 1.1s infinite;
  }
  /* acid-yellow brutalist offset frame */
  .hp-frame { position: absolute; inset: 0; border: 2px solid var(--pop); transform: translate(14px, 14px); transition: transform var(--dur-sm) var(--ease); z-index: 0; pointer-events: none; }
  /* glowing halo */
  .hp-glow { position: absolute; inset: -8%; background: radial-gradient(circle at 50% 45%, var(--pop) 0%, transparent 62%); opacity: .25; filter: blur(26px); animation: glow-pulse 5s var(--ease) infinite; z-index: 0; pointer-events: none; }
  .hp-img {
    position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block;
    border: 2px solid var(--pop);
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
    transition: transform var(--dur-sm) var(--ease);
  }
  /* diagonal shine sweep */
  .hp-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
  /* ponytail: translateX sweep stays on the compositor; background-position animation repainted every frame */
  .hp-shine::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: -80%; width: 55%;
    background: linear-gradient(115deg, transparent, rgba(245,245,245,.5), transparent);
    mix-blend-mode: screen; will-change: transform;
    animation: shine 6.5s var(--ease) 1.4s infinite;
  }
  .hero-portrait:hover .hp-img { transform: scale(1.015); }
  .hero-portrait:hover .hp-frame { transform: translate(20px, 20px); }

  @keyframes portrait-in { to { opacity: 1; transform: scale(1); } }
  @keyframes glow-pulse { 0%,100% { opacity: .18; } 50% { opacity: .4; } }
  @keyframes shine { 0%, 65% { transform: translateX(0); } 100% { transform: translateX(390%); } }

  @media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; }
    .hero-portrait { grid-row: 1; max-width: 260px; margin-bottom: 1rem; }
    .hero-title { font-size: clamp(3rem, 13vw, 5.5rem); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-portrait, .hp-glow, .hp-shine { animation: none; opacity: 1; transform: none; }
    .hp-shine { display: none; }
  }

  /* ── STATS ────────────────────────────────────────────── */
  .stats-wrap { margin-top: 0; }
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); border-top: 0; }
  .stats > div { padding: 1.8rem 1.5rem; border-left: 1px solid var(--line-strong); }
  .stats > div:first-child { border-left: 0; }
  .stats dd { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: .9; font-weight: 400; }
  .stats dd span { font-size: .35em; color: var(--brand-text); vertical-align: super; margin-left: .1em; }
  .stats dt { margin-top: .7rem; }
  @media (max-width: 720px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats > div:nth-child(3) { border-left: 0; }
    .stats > div:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
  }

  /* ── SECTIONS ─────────────────────────────────────────── */
  .section { padding: clamp(4.5rem, 12vh, 9rem) var(--gutter); }
  .section-head { margin-bottom: 3.4rem; }
  .section-title { font-size: clamp(2rem, 6vw, 4.4rem); margin-top: 1rem; }
  .inv { color: var(--inv-ink); }
  .section-head .label { color: var(--brand-text); }
  .about-band .section-head .label { color: var(--pop); }

  /* ── PROJECTS — invert to blue on hover ───────────────── */
  .projects { list-style: none; border-top: 1px solid var(--line-strong); }
  .projects.no-hover { pointer-events: none; } /* until cursor moves, see noHover */
  .projects li { border-bottom: 1px solid var(--line-strong); }
  .project {
    width: 100%; background: var(--paper); border: 0; color: var(--ink); cursor: pointer;
    display: grid; grid-template-columns: 4rem 1fr minmax(9rem, 15rem); gap: 2rem; align-items: start;
    text-align: left; padding: 2.4rem 1.2rem; font: inherit;
    transition: background var(--dur-sm) var(--ease), color var(--dur-sm) var(--ease), padding var(--dur-sm) var(--ease);
  }
  .project:hover { background: var(--brand); color: var(--inv-ink); padding-left: 1.8rem; }
  .p-code { display: flex; flex-direction: column; gap: .9rem; }
  .p-num { color: var(--ink-faint); }
  .project:hover .p-num { color: rgba(245,245,245,.82); }
  .p-logo { width: 46px; height: 46px; object-fit: cover; border: 1px solid var(--line-strong); }
  .project:hover .p-logo { border-color: var(--pop); }
  .p-title { display: block; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1; }
  .p-desc { display: block; margin-top: .9rem; color: var(--ink-dim); max-width: 54ch; font-size: .98rem; line-height: 1.5; }
  .project:hover .p-desc { color: rgba(245,245,245,.85); }
  .p-stack { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
  .chip { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-faint); border: 1px solid var(--line); padding: .22rem .6rem; }
  .project:hover .chip { color: var(--inv-ink); border-color: rgba(245,245,245,.4); }
  .p-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; text-align: right; }
  .project:hover .p-meta .label { color: rgba(245,245,245,.82); }
  .p-metric { font-size: 2.2rem; display: block; color: var(--brand-text); line-height: 1; }
  .project:hover .p-metric { color: var(--pop); }
  .p-metric-l { display: block; color: var(--ink-faint); font-style: normal; }
  .p-open { transition: transform var(--dur-sm); }
  .project:hover .p-open { transform: translateX(5px); color: var(--pop); }
  @media (max-width: 820px) {
    .project { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.8rem 0; }
    .project:hover { padding-left: 0; }
    .p-meta { align-items: baseline; text-align: left; flex-direction: row; flex-wrap: wrap; gap: .4rem .9rem; }
    .p-meta .label:first-child { flex-basis: 100%; }
    .p-metric { font-size: 1.5rem; }
    .p-open { margin-left: auto; }
  }

  /* ── ABOUT BAND (blue) ────────────────────────────────── */
  .about-band { background: var(--brand); color: var(--inv-ink); overflow: hidden; }
  .about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
  .about-copy { min-width: 0; }
  .about-bio { font-size: clamp(1.05rem, 4.4vw, 2.4rem); line-height: 1.4; max-width: 30ch; color: var(--inv-ink); font-weight: 400; letter-spacing: -.02em; }

  .about-portrait { position: relative; margin: 0; justify-self: center; width: 100%; max-width: 400px; aspect-ratio: 1; }
  .about-portrait img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border: 2px solid var(--pop); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
  .ap-frame { position: absolute; inset: 0; border: 2px solid rgba(245,245,245,.5); transform: translate(-14px, -14px); z-index: 0; pointer-events: none; transition: transform var(--dur-sm) var(--ease); }
  .about-portrait:hover .ap-frame { transform: translate(-20px, -20px); }
  @media (max-width: 880px) {
    .about { grid-template-columns: 1fr; }
    .about-portrait { max-width: 300px; margin-top: 1rem; }
  }

  .marquee { border-top: 1px solid rgba(245,245,245,.25); border-bottom: 1px solid rgba(245,245,245,.25); overflow: hidden; padding: 1.4rem 0; }
  .marquee-track { display: flex; align-items: center; gap: 2rem; width: max-content; animation: marquee 28s linear infinite; }
  .marquee-item { font-size: clamp(1.6rem, 3.5vw, 2.8rem); color: rgba(245,245,245,.62); letter-spacing: -.02em; white-space: nowrap; }
  .marquee-dot { width: 10px; height: 10px; background: var(--pop); flex-shrink: 0; }

  /* ── SKILLS — brutalist grid ──────────────────────────── */
  .skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border: 1px solid var(--line-strong); }
  .skill-group { padding: clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 4vw, 1.7rem); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
  .skill-group h3 { color: var(--brand-text); margin-bottom: 1.2rem; }
  .skill-group ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
  .skill-group li { color: var(--ink-dim); font-size: .96rem; }
  .skill-group li::before { content: '→ '; color: var(--pop); }

  /* ── CONTACT BAND (blue) ──────────────────────────────── */
  .contact-band { position: relative; overflow: hidden; background: var(--brand); color: var(--inv-ink); }
  .contact-arc { position: absolute; inset: 0; opacity: .35; pointer-events: none; }
  .contact { position: relative; z-index: 2; text-align: center; }
  .contact .label.inv { color: var(--pop); }
  .contact-mail { display: inline-block; font-size: clamp(1.8rem, 6.5vw, 5rem); margin: 1.6rem 0 2.4rem; color: var(--inv-ink); word-break: break-word; transition: color var(--dur-sm) var(--ease); }
  .contact-mail:hover { color: var(--pop); }
  .contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.6rem; }
  .contact-links a { display: inline-flex; align-items: center; min-height: 44px; color: rgba(245,245,245,.75); transition: color var(--dur-sm); }
  .contact-links a:hover { color: var(--pop); }

  /* align-items keeps the 44px-tall credit link on the same line as the shorter
     spans either side of it. */
  .foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; padding: 2.4rem var(--gutter); border-top: 1px solid var(--line-strong); }
  /* Credit + copyright travel together, so the row wraps as two blocks, not three. */
  .foot-end { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.8rem; }

  .built-with { display: inline-flex; align-items: center; min-height: 44px; gap: .5rem; color: var(--ink-faint); transition: color var(--dur-sm) var(--ease); }
  .built-with:hover { color: var(--brand-text); }
  /* The Jaspr mark is navy with black outlines, so it disappears on the dark
     paper. It gets a light plate there rather than being recoloured — sized so
     it reads as a deliberate badge instead of a stray favicon. */
  .built-with img { width: auto; height: 20px; }
  @media (prefers-color-scheme: dark) {
    .built-with img { height: 18px; background: var(--inv-ink); padding: 3px 5px; }
  }

/* ── Project page (from ProjectModal.svelte) ────────── */
  .backdrop {
    position: fixed; inset: 0; z-index: 100; overflow-y: auto;
    background: color-mix(in srgb, #000 78%, transparent);
    backdrop-filter: blur(6px); padding: clamp(1rem, 5vh, 4rem) 1rem;
    animation: fade .25s ease;
  }
  @keyframes fade { from { opacity: 0; } }
  .sheet {
    max-width: 960px; margin: 0 auto; background: var(--bg-raise);
    border: 1px solid var(--line-strong); padding: clamp(1.6rem, 4vw, 3.4rem);
    animation: rise .3s cubic-bezier(.2,.7,.2,1);
  }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }

  .top { display: flex; justify-content: space-between; gap: 1.5rem; align-items: start; }
  .top-id { display: flex; gap: 1.1rem; align-items: start; }
  .hlogo { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line-strong); flex-shrink: 0; }
  .sheet .title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .5rem 0; letter-spacing: -0.01em; }
  .role { color: var(--brand-text); }
  .close { background: none; border: 1px solid var(--line); color: var(--ink-dim); min-height: 44px; padding: .5rem .9rem; cursor: pointer; transition: all .2s; white-space: nowrap; }
  .close:hover { color: var(--ink); border-color: var(--line-strong); }

  .lede { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.5; color: var(--ink); margin: 2rem 0; max-width: 60ch; }

  .tabs { display: flex; gap: .4rem; margin-bottom: 1.8rem; }
  .tabs button { background: none; border: 1px solid var(--line); color: var(--ink-dim); min-height: 44px; padding: .5rem 1rem; cursor: pointer; font: inherit; transition: all .2s; }
  .tabs button.active { color: var(--inv-ink); background: var(--accent); border-color: var(--accent); }

  .appdesc { color: var(--ink-dim); max-width: 60ch; }

  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2.4rem 0; }
  @media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }
  .metrics { display: flex; flex-direction: column; gap: 1.2rem; }
  .metrics > div { display: flex; flex-direction: column; }
  .mv { font-size: 2.4rem; color: var(--brand-text); line-height: 1; }
  .metrics .label { margin-top: .4rem; }
  .meta { display: flex; flex-direction: column; gap: 1.2rem; }
  .meta p { margin-top: .5rem; color: var(--ink-dim); }
  .stack { display: flex; flex-wrap: wrap; gap: .4rem; }
  .sheet .chip { font-family: var(--mono); font-size: .72rem; color: var(--ink-faint); border: 1px solid var(--line); padding: .2rem .6rem; }
  .links { display: flex; flex-wrap: wrap; gap: 1rem; }
  .links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-text); }

  /* ponytail: native horizontal scroll-snap row, images keep native ratio */
  .shots {
    display: flex; gap: .8rem; margin-top: 1rem; overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* ponytail: full-bleed to sheet edges; scroll-padding keeps the inline padding at both scroll ends */
    margin-inline: calc(-1 * clamp(1.6rem, 4vw, 3.4rem));
    padding: 0 clamp(1.6rem, 4vw, 3.4rem) .8rem;
    scroll-padding-inline: clamp(1.6rem, 4vw, 3.4rem);
    scrollbar-width: none; /* Firefox */
  }
  .shots::-webkit-scrollbar { display: none; } /* WebKit/Safari/Chrome */
  .shot { flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; }
  .shots-head { display: block; margin-top: 2.4rem; margin-bottom: .2rem; }
  .shot img { height: 320px; width: auto; display: block; border: 1px solid var(--line); transition: transform .4s; }
  @media (min-width: 720px) { .shot img { height: 480px; } }
  .shot:hover img { transform: scale(1.04); }

  .lb { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 2rem; cursor: zoom-out; animation: fade .2s ease; }
  .lb img { max-width: 100%; max-height: 92vh; object-fit: contain; }
