/* ══════════════════════════════════════════════════════════
   Blurred Momentum: "quiet ink, one ember" (design system v1, Art Maxxx)
   One stylesheet for every page: tokens, base, layout, components.
   Fonts are declared in _Layout.cshtml so their URLs are fingerprinted.
   ══════════════════════════════════════════════════════════ */

/* ── 1. Tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #0B0C10;
  --surface: #13151B;
  --surface-2: #1A1D25;
  --line: #252933;
  --line-strong: #353A46;
  --text: #EDEFF3;
  --text-2: #A9B0BD;
  --muted: #848C9A;
  --accent: #FF8A5B;          /* "ember", the one signature colour */
  --accent-ink: #0B0C10;      /* text on accent */
  --accent-soft: rgb(255 138 91 / .12);
  --c-finance: #5BD6A2;
  --c-gaming: #B9A2FF;
  --c-apps: #72B8FF;
  --focus: #FFB089;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;
  --fs-xs: 0.75rem;                                   /* 12, the minimum */
  --fs-sm: 0.875rem;                                  /* 14 */
  --fs-base: 1rem;                                    /* 16 */
  --fs-md: 1.125rem;                                  /* 18 */
  --fs-lg: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);     /* 20→24 */
  --fs-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2.25rem);    /* 24→36 */
  --fs-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);      /* 32→56 */
  --fs-hero: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);  /* 44→88 */

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(72px, 6vw + 40px, 128px);

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 64px;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px; --radius-pill: 999px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 140ms; --dur: 220ms; --dur-slow: 480ms;
  --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 12px 32px -12px rgb(0 0 0 / .6);
}
/* Light: follows the OS by default; the toggle writes data-theme to override. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F7F7F4; --surface: #FFFFFF; --surface-2: #EFEFEA;
    --line: #E2E2DC; --line-strong: #CFCFC7;
    --text: #14161B; --text-2: #474D58; --muted: #5F6672;
    --accent: #B4390A; --accent-ink: #FFFFFF; --accent-soft: rgb(180 57 10 / .08);
    --c-finance: #0F7A55; --c-gaming: #6D4FD8; --c-apps: #1D64C8;
    --focus: #B4390A;
    --shadow: 0 1px 2px rgb(20 22 27 / .06), 0 12px 32px -16px rgb(20 22 27 / .18);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F7F4; --surface: #FFFFFF; --surface-2: #EFEFEA;
  --line: #E2E2DC; --line-strong: #CFCFC7;
  --text: #14161B; --text-2: #474D58; --muted: #5F6672;
  --accent: #B4390A; --accent-ink: #FFFFFF; --accent-soft: rgb(180 57 10 / .08);
  --c-finance: #0F7A55; --c-gaming: #6D4FD8; --c-apps: #1D64C8;
  --focus: #B4390A;
  --shadow: 0 1px 2px rgb(20 22 27 / .06), 0 12px 32px -16px rgb(20 22 27 / .18);
}

/* ── 2. Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-base)/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
img { max-width: 100%; display: block; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, figure { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; padding: var(--s-2) var(--s-4); background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius-sm); font-weight: 500; z-index: 100; }
.skip-link:focus { top: var(--s-4); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.eyebrow { font: 500 var(--fs-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
  display: inline-flex; align-items: center; gap: var(--s-2); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }

/* ── 3. Nav ────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; gap: var(--s-6); height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand .ball { fill: #FF8A5B; }
.nav-links { display: flex; gap: var(--s-1); margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--text-2);
  transition: color var(--dur-fast), background var(--dur-fast); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-tools { display: flex; align-items: center; gap: var(--s-2); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: transparent; color: var(--text-2); cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast); }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }
/* theme toggle shows the theme you'd switch to */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── 4. Buttons & chips ────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: var(--radius-sm); font-weight: 500;
  font-size: var(--fs-sm); border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast); }
.btn svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--c-apps); }
.dot.finance { background: var(--c-finance); } .dot.gaming { background: var(--c-gaming); } .dot.applications { background: var(--c-apps); }

/* ── 5. Hero ───────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(56px, 7vw, 112px) 0 var(--section-y); overflow: hidden; }
.hero::before { /* faint motion streaks, the brand motif */ content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, color-mix(in srgb, var(--accent) 22%, transparent) 40%, transparent 70%) 0 22% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 20%, color-mix(in srgb, var(--text) 10%, transparent) 55%, transparent 85%) 0 58% / 100% 1px no-repeat,
    radial-gradient(60% 50% at 85% 20%, var(--accent-soft), transparent 70%); }
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: center; }
.hero h1 { font-size: var(--fs-hero); letter-spacing: -0.045em; line-height: 0.98; margin: var(--s-5) 0; }
/* solid accent (no gradient text): 8.4:1 dark, 4.8:1 light, AA for large text and body text */
.hero h1 .serif { color: var(--accent); letter-spacing: -0.02em; }
.hero-lede { font-size: var(--fs-md); color: var(--text-2); max-width: 54ch; }
.hero-lede strong { color: var(--text); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-6); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.hero-meta div { display: flex; flex-direction: column-reverse; gap: 2px; }
.hero-meta dd { margin: 0; font: 600 var(--fs-lg) var(--font-sans); letter-spacing: -0.02em; }
.hero-meta dt { font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* hero visual: three real screenshots, offset like frames of motion */
.stack { position: relative; aspect-ratio: 5 / 4.4; }
.frame { position: absolute; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); }
.frame .bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--line);
  font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); }
.frame .bar i, .shot .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.frame .bar span { margin-left: 6px; }
.frame img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.frame.f1 { width: 74%; left: 0; top: 0; opacity: .55; filter: saturate(.6); }
.frame.f2 { width: 78%; left: 12%; top: 18%; opacity: .8; }
.frame.f3 { width: 80%; right: 0; top: 38%; }
.frame.f3 img { object-position: center; }
.streaks { position: absolute; left: -14%; top: 58%; width: 30%; display: grid; gap: 10px; }
.streaks i { height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent)); }
.streaks i:nth-child(1) { width: 70%; margin-left: 30%; opacity: .5; }
.streaks i:nth-child(2) { width: 100%; }
.streaks i:nth-child(3) { width: 55%; margin-left: 45%; opacity: .7; }

/* ── 6. Sections ───────────────────────────────────────────── */
.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-6); margin-bottom: var(--s-7); }
.section-head h2 { font-size: var(--fs-2xl); margin-top: var(--s-4); }
.section-head p { color: var(--text-2); max-width: 46ch; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.link-arrow:hover { color: var(--accent); }
.link-arrow svg { width: 14px; height: 14px; }

/* ── 7. Project cards ──────────────────────────────────────── */
.grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card:focus-within { border-color: var(--accent); }
.card:has(h3 a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.card h3 a:focus-visible { outline: none; }
.card .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform var(--dur-slow) var(--ease-out); }
.card:hover .thumb img { transform: scale(1.025); }
.card .body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.card .kicker { display: flex; align-items: center; gap: 8px; font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card h3 { font-size: var(--fs-lg); }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is one link, one tab stop */
.card p { color: var(--text-2); font-size: var(--fs-sm); }
.card .tags { margin-top: auto; padding-top: var(--s-2); }
.card .foot { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s-5) var(--s-5); font-size: var(--fs-sm); color: var(--text-2); }
.card .foot svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.card:hover .foot { color: var(--accent); }
.card:hover .foot svg { transform: translateX(3px); }
.card .foot .repo { position: relative; z-index: 2; } /* only rendered when a repo is public */
.card.std { grid-column: span 4; }

/* featured: rows alternate 7/5 then 5/7 */
.card.feature { grid-column: span 6; }
.card.feature:nth-child(4n+1), .card.feature:nth-child(4n) { grid-column: span 7; }
.card.feature:nth-child(4n+2), .card.feature:nth-child(4n+3) { grid-column: span 5; }
.card.feature .thumb { aspect-ratio: auto; height: 340px; }
.card.feature h3 { font-size: var(--fs-xl); }

/* Now building: projects with Status "building". Smaller cards, dashed outline and an
   "In progress" badge so they never read as finished. Their covers are framed, so centre them. */
.card.mini { grid-column: span 4; }
.card.mini .body { padding: var(--s-4) var(--s-5); gap: var(--s-2); }
.card.mini h3 { font-size: var(--fs-md); }
.card.mini .foot { padding: 0 var(--s-5) var(--s-4); }
.card.is-building { border-style: dashed; border-color: var(--line-strong); }
/* Art's building covers frame the screenshot right of centre (x 150–920 of 960, y 92–570 of 600),
   so aim at the frame's centre rather than the image's to keep crops even on every card. */
.card.is-building .thumb img { object-position: 56% 55%; }
.wip-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--c-gaming) 45%, var(--line));
  background: color-mix(in srgb, var(--bg) 88%, transparent); font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--text); white-space: nowrap; }
.wip-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-gaming); }
.wip-badge.static { position: static; }

/* fallback thumbnail for projects without a screenshot: deliberate, not "image missing" */
.thumb-fallback { --hue: var(--c-apps); position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 20px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--hue) 26%, transparent), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--surface)); }
.thumb-fallback::after { /* speed streaks */ content: ""; position: absolute; right: -10%; bottom: 22%; width: 70%; height: 34px; opacity: .55;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--hue) 55%, transparent)) 0 0 / 70% 3px no-repeat,
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--hue) 80%, transparent)) 0 15px / 100% 3px no-repeat,
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--hue) 40%, transparent)) 30% 30px / 55% 3px no-repeat; }
.thumb-fallback .ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--hue);
  background: color-mix(in srgb, var(--hue) 14%, transparent); border: 1px solid color-mix(in srgb, var(--hue) 30%, transparent); }
.thumb-fallback .ico svg { width: 18px; height: 18px; }
.thumb-fallback .nm { position: relative; z-index: 1; font: 600 clamp(1.5rem, 1rem + 1.6vw, 2.25rem)/1 var(--font-sans); letter-spacing: -0.04em; color: var(--text); max-width: 80%; }
.thumb-fallback.finance, .thumb.phone.finance { --hue: var(--c-finance); }
.thumb-fallback.gaming, .thumb.phone.gaming { --hue: var(--c-gaming); }
.thumb-fallback.applications, .thumb.phone.applications { --hue: var(--c-apps); }

/* portrait (phone) screenshot on a tinted stage, bottom-anchored instead of cropped */
.thumb.phone { --hue: var(--c-gaming);
  background: radial-gradient(80% 90% at 50% 100%, color-mix(in srgb, var(--hue) 30%, transparent), transparent 70%), var(--surface-2); }
.card .thumb.phone img, .shot-stage img { position: absolute; left: 50%; bottom: 0; height: 88%; width: auto; aspect-ratio: 786 / 1704; object-fit: cover; object-position: top;
  transform: translateX(-50%); border-radius: 14px 14px 0 0; border: 1px solid var(--line-strong); border-bottom: 0; box-shadow: 0 -10px 40px -10px rgb(0 0 0 / .5); }
.card:hover .thumb.phone img { transform: translate(-50%, -4px); }

/* ── 8. Filters, tabs, breadcrumbs ─────────────────────────── */
.filters { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-4) 0; margin-bottom: var(--s-6);
  border-block: 1px solid var(--line); flex-wrap: wrap; }
.filters .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filters .chip { height: 32px; padding: 0 12px; gap: 7px; cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.filters .chip:hover { border-color: var(--line-strong); color: var(--text); }
.filters .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.filters .chip .n { font-variant-numeric: tabular-nums; }
.filters .count { font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; }
.tabs a { height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; transition: border-color var(--dur-fast), color var(--dur-fast); }
.tabs a:hover { border-color: var(--line-strong); color: var(--text); }
.tabs a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs a .n { font-family: var(--font-mono); font-size: var(--fs-xs); }
.browse { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.browse .label { font: 500 var(--fs-xs) var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text-2); }

/* ── 9. Page heads (category, status pages) ────────────────── */
.page-head { padding: var(--s-8) 0 var(--s-7); }
.page-head .crumbs { margin-bottom: var(--s-6); }
.page-head .row { display: flex; justify-content: space-between; align-items: end; gap: var(--s-6); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-hero); letter-spacing: -0.045em; line-height: 1; display: flex; align-items: center; gap: 18px; margin-top: var(--s-4); }
.page-head h1 .dot { width: 14px; height: 14px; }
.page-head p:not(.eyebrow, .meta) { color: var(--text-2); font-size: var(--fs-md); margin-top: var(--s-4); max-width: 56ch; }
.page-head .meta { font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: var(--s-3); }
.page-body { padding-bottom: var(--section-y); }
.next-cat { margin-top: var(--s-9); display: flex; justify-content: space-between; align-items: center; gap: var(--s-5); padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.next-cat small { display: block; font: 500 var(--fs-xs) var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.next-cat b { font-size: var(--fs-xl); letter-spacing: -0.03em; font-weight: 600; }
.next-cat:hover b { color: var(--accent); }
.next-cat svg { width: 24px; height: 24px; color: var(--muted); }
.status-page { padding: var(--section-y) 0; min-height: 56vh; }
.status-page h1 { font-size: var(--fs-hero); letter-spacing: -0.045em; line-height: 1; margin: var(--s-5) 0 var(--s-4); }
.status-page p:not(.eyebrow) { color: var(--text-2); font-size: var(--fs-md); max-width: 56ch; }
.status-page code { font-family: var(--font-mono); font-size: var(--fs-sm); }

/* ── 10. About + stack ─────────────────────────────────────── */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); }
.studio-tile { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(90% 70% at 85% 15%, var(--accent-soft), transparent 70%), linear-gradient(160deg, var(--surface-2), var(--surface));
  display: grid; place-items: center; }
.studio-tile svg { width: 46%; height: auto; color: var(--text); }
.studio-tile .ball { fill: var(--accent); }
.studio-tile::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 14%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.about-copy { display: grid; gap: var(--s-5); align-content: start; }
.about-copy .big { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: -0.02em; color: var(--text); font-weight: 450; }
.about-copy p:not(.eyebrow, .big) { color: var(--text-2); }
.about-copy p strong { color: var(--text); font-weight: 500; }
.stack-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--s-6); margin-top: var(--s-4); padding: 0; list-style: none; border-top: 1px solid var(--line); }
.stack-list li { display: flex; justify-content: space-between; gap: var(--s-4); padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.stack-list li span { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-xs); text-align: right; }

/* ── 11. Contact & footer ──────────────────────────────────── */
.contact { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.contact h2 { font-size: var(--fs-hero); letter-spacing: -0.045em; line-height: 1; margin-top: var(--s-5); }
.contact h2 .serif { display: block; color: var(--text-2); }
/* deliberate "not open yet" state: no mail button, placeholders are plain text */
.contact-soon { margin-top: var(--s-7); padding: var(--s-6); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface);
  display: grid; gap: var(--s-4); max-width: 760px; color: var(--muted); }
.contact-soon p { color: var(--text-2); max-width: 56ch; }
.soon-pill { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); font: 500 var(--fs-xs) var(--font-mono); color: var(--text-2); }
.soon-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.contact-soon dl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.contact-soon dt { font: 500 var(--fs-xs) var(--font-mono); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.contact-soon dd { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.contact-soon .ph { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }
.contact-soon .ph-note { color: var(--muted); font-size: var(--fs-xs); font-family: var(--font-mono); }
.footer { padding: var(--s-6) 0 var(--s-7); color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--line); }
.footer .container { display: flex; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; align-items: center; }
.footer nav { display: flex; gap: var(--s-5); }
.footer a:hover { color: var(--text); }

/* ── 12. Project detail ────────────────────────────────────── */
.detail-head { padding: var(--s-7) 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: end; }
.detail-head .crumbs { margin-bottom: var(--s-6); }
.detail-head h1 { font-size: var(--fs-hero); letter-spacing: -0.045em; line-height: 1; margin: var(--s-5) 0 var(--s-4); }
.detail-head .lede { font-size: var(--fs-lg); color: var(--text-2); max-width: 40ch; }
.facts { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.facts dt { color: var(--muted); font: 500 var(--fs-xs)/1.9 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.facts dd .dot { margin-right: 4px; }
.shot { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.shot .bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); }
.shot .bar i { width: 9px; height: 9px; }
.shot .bar span { margin-left: 8px; }
.shot img { width: 100%; height: auto; }
.shot-art { position: relative; aspect-ratio: 16 / 7; }
.shot-art .thumb-fallback .nm { font-size: var(--fs-2xl); }
.shot-stage { position: relative; height: clamp(360px, 52vw, 620px); }
.shot .shot-stage img { width: auto; height: 90%; }
.detail-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-8); padding: var(--s-9) 0 var(--s-8); }
.detail-body .prose { font-size: var(--fs-md); color: var(--text-2); display: grid; gap: var(--s-5); max-width: 62ch; }
.detail-body .prose p:first-child { font-size: var(--fs-lg); color: var(--text); line-height: 1.5; letter-spacing: -0.01em; }
.detail-links { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.more-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.more-head h2 { font: 500 var(--fs-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: inline-flex; align-items: center; gap: var(--s-2); }
.more-head h2::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.pager { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--s-9); border-block: 1px solid var(--line); }
.pager a { padding: var(--s-6) 0; display: grid; gap: 6px; align-content: start; }
.pager a.next { grid-column: 2; text-align: right; border-left: 1px solid var(--line); padding-left: var(--s-5); }
.pager a.prev { padding-right: var(--s-5); }
.pager small { font: 500 var(--fs-xs) var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.pager b { font-size: var(--fs-xl); letter-spacing: -0.03em; font-weight: 600; }
.pager a:hover b { color: var(--accent); }

/* ── 13. Motion (opt-in; content is always visible without JS) ─ */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal:not(.in) { opacity: 0; translate: 0 12px; }
  .js-reveal .reveal { transition: opacity var(--dur-slow) var(--ease-out), translate var(--dur-slow) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
}
@media (prefers-reduced-motion: no-preference) {
  .wip-badge i { animation: wip-pulse 2.4s ease-in-out infinite; }
}
@keyframes wip-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover, .card:hover .thumb img { transform: none; }
  .card:hover .thumb.phone img { transform: translateX(-50%); }
}

/* ── 14. Responsive ────────────────────────────────────────── */
@media (min-width: 1081px) {
  .studio-tile { aspect-ratio: 1 / 1; }
}
@media (max-width: 1080px) {
  .hero .container { grid-template-columns: 1fr; }
  .stack { max-width: 640px; width: 100%; }
  .card.feature, .card.feature:nth-child(n) { grid-column: span 12; }
  .card.feature .thumb { height: auto; aspect-ratio: 16 / 9; }
  .card.std { grid-column: span 6; }
}
@media (max-width: 760px) {
  .nav .container { gap: var(--s-3); }
  .nav-tools { margin-left: auto; }
  .menu-btn { display: grid; }
  /* mobile menu: a panel under the bar, opened by the menu button (links stay in the DOM) */
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 2px;
    padding: var(--s-3) var(--gutter) var(--s-4); background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: var(--fs-base); }
  .no-js .nav-links { display: flex; position: static; flex-direction: row; flex-wrap: wrap; padding: 0; border: 0; box-shadow: none; background: none; }

  .hero { padding-top: var(--s-7); }
  .hero .container { gap: var(--s-7); }
  .hero-meta { gap: var(--s-4) 18px; justify-content: space-between; }
  .streaks { display: none; }
  .section-head { flex-direction: column; align-items: start; gap: var(--s-4); margin-bottom: var(--s-6); }

  /* long project list: compact one-line rows (about 90px each instead of about 420px) */
  .grid.all { gap: var(--s-3); }
  .card.std { grid-column: span 12; flex-direction: row; align-items: stretch; border-radius: var(--radius); min-height: 84px; }
  .card.std .thumb { width: 112px; flex: none; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .card.std .thumb-fallback { padding: 10px; justify-content: center; align-items: center; }
  .card.std .thumb-fallback .nm, .card.std .thumb-fallback::after { display: none; }
  .card.std .thumb.phone img { border-radius: 8px 8px 0 0; height: 86%; }
  .card.std .body { padding: 14px 16px; gap: 4px; justify-content: center; }
  .card.std h3 { font-size: var(--fs-base); }
  .card.std p { font-size: 13.5px; line-height: 1.45; }
  .card.std .kicker, .card.std .tags, .card.std .foot { display: none; }
  /* Now building strip: the same compact rows. The kicker shows only the category (the cover badge carries the status) */
  .grid.building { gap: var(--s-3); }
  .card.mini { grid-column: span 12; flex-direction: row; align-items: stretch; border-radius: var(--radius); min-height: 84px; }
  /* 144px (not 112px) so the narrow crop takes in nearly the whole framed screenshot; at 112px Tidepop's wide
     layout lost its logo on one side and its score panel on the other, so it read as cropped from the left */
  .card.mini .thumb { width: 144px; flex: none; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .card.mini .body { padding: 14px 16px; gap: 4px; justify-content: center; }
  .card.mini h3 { font-size: var(--fs-base); }
  .card.mini p { font-size: 13.5px; line-height: 1.45; }
  .card.mini .tags, .card.mini .foot, .card.mini .kicker-status { display: none; }
  /* compact "In progress" badge that fits the 112px cover */
  .card.std .wip-badge, .card.mini .wip-badge { top: 6px; left: 6px; height: 20px; padding: 0 7px; gap: 5px; font: 500 var(--fs-xs)/1 var(--font-sans); }
  .card.std .wip-badge i, .card.mini .wip-badge i { width: 6px; height: 6px; }
  /* filter chips stay reachable while scrolling the list */
  .filters { position: sticky; top: var(--nav-h); z-index: 5; background: var(--bg); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); margin-bottom: var(--s-4); }
  .filters .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }

  .about { grid-template-columns: 1fr; gap: var(--s-6); }
  .studio-tile { aspect-ratio: 16 / 7; }
  .studio-tile svg { width: 26%; }
  .stack-list { grid-template-columns: 1fr; }
  .contact-soon { padding: var(--s-5); }
  .contact-soon dl { grid-template-columns: 1fr; }

  .page-head { padding-top: var(--s-6); }
  .detail-head, .detail-body { grid-template-columns: 1fr; gap: var(--s-6); }
  .detail-body { padding: var(--s-7) 0; }
  .shot-art { aspect-ratio: 16 / 9; }
  .pager { margin-top: var(--s-7); }
  .pager b { font-size: var(--fs-lg); }
  .next-cat { margin-top: var(--s-7); }
}
