/* j4tz.com — site styles. Self-contained: no framework, fonts served locally. */

@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #F3F0E8;
  --bg-2: #EBE7DC;
  --surface: #FBFAF6;
  --ink: #1A1915;
  --ink-2: #3A3832;
  --muted: #6B675E;
  --line: #D9D4C7;
  --line-2: #E6E1D5;
  --accent: #C2471F;
  --accent-ink: #FBFAF6;
  --ok: #3E7D55;
  --shadow: 0 1px 0 rgba(26, 25, 21, .04), 0 12px 32px -12px rgba(26, 25, 21, .18);
  --band: #1A1915;
  --band-ink: #ECE8DE;
  --band-muted: #9A958A;
  --band-line: #34322C;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121210; --bg-2: #17171A; --surface: #1A1A17; --ink: #ECE8DE; --ink-2: #CFCABE; --muted: #9A958A;
    --line: #2F2E29; --line-2: #262521; --accent: #EE7A50; --accent-ink: #121210; --ok: #6DBE8A;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
    --band: #0B0B0A; --band-ink: #ECE8DE; --band-muted: #8E897E; --band-line: #2A2925;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121210; --bg-2: #17171A; --surface: #1A1A17; --ink: #ECE8DE; --ink-2: #CFCABE; --muted: #9A958A;
  --line: #2F2E29; --line-2: #262521; --accent: #EE7A50; --accent-ink: #121210; --ok: #6DBE8A;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
  --band: #0B0B0A; --band-ink: #ECE8DE; --band-muted: #8E897E; --band-line: #2A2925;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }
code { font: 500 .86em var(--mono); background: var(--bg-2); padding: .12em .38em; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- small type ---------- */
.label { font: 500 11.5px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.logo { height: 27px; width: auto; color: var(--ink); }
.logo-dot { fill: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 6px 9px; border: 1px solid var(--line); border-radius: 99px; white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a { color: var(--ink-2); position: relative; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; cursor: pointer; font: 600 12px var(--mono); letter-spacing: .04em; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-dark { display: none; }
:root[data-theme="dark"] .theme-light { display: none; }
:root[data-theme="dark"] .theme-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light { display: none; }
  :root:not([data-theme="light"]) .theme-dark { display: block; }
}
.menu-btn { display: none; }

@media (max-width: 900px) {
  .status { display: none; }
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s var(--ease);
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line-2); font-size: 18px; }
  .nav a::after { display: none; }
  .site-header.is-open .nav { transform: none; opacity: 1; visibility: visible; }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px;
  border-radius: 99px; font: 500 15.5px var(--sans); border: 1px solid var(--ink);
  transition: transform .25s var(--ease), background .25s, color .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14.5px; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color .25s, gap .3s var(--ease); }
.arrow-link:hover { border-color: var(--ink); gap: 12px; }
.arrow-link svg { width: 15px; height: 15px; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 11vw, 140px) 0 clamp(48px, 8vw, 96px); }
.hero .label { display: block; margin-bottom: 28px; }
.hero h1 {
  font: 380 clamp(2.5rem, 6.6vw, 5.9rem)/0.98 var(--serif); letter-spacing: -0.032em;
  max-width: 15.5ch; font-variation-settings: "opsz" 72; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 360; }
.hero-lede { max-width: 56ch; margin: 34px 0 36px; font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-2); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.proof div { padding: 22px 24px 0 0; }
.proof div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.proof b { display: block; font: 400 clamp(1.9rem, 3.6vw, 2.8rem)/1 var(--serif); letter-spacing: -0.02em; margin-bottom: 8px; font-variation-settings: "opsz" 48; }
.proof span { font-size: 14.5px; color: var(--muted); }
@media (max-width: 640px) {
  .proof { grid-template-columns: 1fr; }
  .proof div, .proof div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 14px; }
  .proof b { margin: 0; min-width: 4.2ch; }
}

.hero-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 40px 72px; align-items: end; }
.now { border-left: 1px solid var(--line); padding-left: 28px; margin-bottom: 4px; }
.now .label { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.now .label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.now ul { display: grid; gap: 14px; }
.now li { display: grid; gap: 2px; font-size: 15px; line-height: 1.45; }
.now b { font-weight: 600; }
.now span { color: var(--muted); }
@media (max-width: 900px) { .hero-row { grid-template-columns: 1fr; } .now { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; } }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font: 400 clamp(2rem, 4.4vw, 3.5rem)/1.02 var(--serif); letter-spacing: -0.028em; font-variation-settings: "opsz" 60; }
.section-head h2 .label { display: block; margin-bottom: 18px; letter-spacing: .09em; }
.section-head p { color: var(--muted); max-width: 46ch; margin: 0; justify-self: end; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } .section-head p { justify-self: start; } }

/* ---------- case rows (selected work) ---------- */
.cases { display: grid; gap: clamp(72px, 10vw, 128px); }
.case { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; }
.case-media { grid-column: 1 / span 7; }
.case-body { grid-column: 9 / span 4; }
.case:nth-child(even) .case-media { grid-column: 6 / span 7; order: 2; }
.case:nth-child(even) .case-body { grid-column: 1 / span 4; }
.case-num { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .08em; display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.case-num::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.case h3 { font: 400 clamp(2rem, 3.6vw, 2.9rem)/1.02 var(--serif); letter-spacing: -0.025em; margin-bottom: 14px; font-variation-settings: "opsz" 60; }
.case h3 a:hover { color: var(--accent); }
.case-tagline { color: var(--ink-2); font-size: 17.5px; margin-bottom: 22px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; gap: 28px; }
  .case-media, .case-body, .case:nth-child(even) .case-media, .case:nth-child(even) .case-body { grid-column: 1; order: 0; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 11.5px/1 var(--mono); padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 20px; font-size: 14.5px; color: var(--muted); }
.mini-stats b { color: var(--ink); font: 500 15.5px var(--sans); margin-right: 5px; }

/* framed screenshot ("window") */
.frame {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; transition: transform .9s var(--ease); }
.frame.is-game img { aspect-ratio: 16 / 9; object-position: center; }
a.frame:hover img { transform: scale(1.025); }
.frame-bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }

/* illustrated voice/chat transcript */
.transcript { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.transcript-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.transcript-head .label { font-size: 10.5px; }
.wave { display: flex; align-items: center; gap: 3px; height: 14px; }
.wave i { width: 3px; border-radius: 2px; background: var(--accent); animation: wave 1.2s var(--ease) infinite; }
.wave i:nth-child(1) { height: 40%; } .wave i:nth-child(2) { height: 90%; animation-delay: .1s; } .wave i:nth-child(3) { height: 60%; animation-delay: .2s; } .wave i:nth-child(4) { height: 100%; animation-delay: .3s; } .wave i:nth-child(5) { height: 45%; animation-delay: .4s; }
@keyframes wave { 50% { transform: scaleY(.35); } }
.turns { padding: 20px 18px 22px; display: grid; gap: 14px; }
.turn { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: baseline; }
.turn .who { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.turn .say { font-size: 15.5px; color: var(--ink); line-height: 1.5; }
.turn.is-you .say { font-family: var(--serif); font-size: 18px; font-style: italic; }
.turn.is-code .say { font: 500 12.5px/1.6 var(--mono); color: var(--ink-2); background: var(--bg-2); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; }
.turn.is-code .who { color: var(--accent); }

/* ---------- Roblox band ---------- */
.band { background: var(--band); color: var(--band-ink); }
.band .label, .band .section-head p, .band .muted { color: var(--band-muted); }
.band .section-head h2 .label { color: var(--band-muted); }
.band .chip { border-color: var(--band-line); color: var(--band-ink); background: transparent; }
.band .arrow-link { border-color: var(--band-line); }
.band .arrow-link:hover { border-color: var(--band-ink); }
.band.section, .section + .band.section { padding: clamp(72px, 10vw, 136px) 0; }
.band + .section { padding-top: clamp(72px, 10vw, 136px); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
.game-media { display: block; border-radius: var(--radius); overflow: hidden; position: relative; background: #000; }
.game-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .9s var(--ease), opacity .4s; }
.game-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-media:hover img { transform: scale(1.03); }
.game-media .genre { position: absolute; left: 14px; bottom: 14px; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: rgba(10, 10, 9, .62); color: #ECE8DE; padding: 7px 9px; border-radius: 6px; backdrop-filter: blur(6px); }
.game-body { padding-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: start; }
.game-body h3 { font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1.05 var(--serif); letter-spacing: -0.02em; }
.game-body h3 a:hover { color: var(--accent); }
.game-body p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--band-muted); font-size: 15.5px; max-width: 54ch; }
.game-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--band-muted); margin-top: 6px; }
.game-stats b { color: var(--band-ink); font-weight: 500; margin-right: 4px; }
.play { display: inline-flex; align-items: center; gap: 7px; font: 500 14px var(--sans); padding: 8px 14px; border: 1px solid var(--band-line); border-radius: 99px; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.play:hover { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.play svg { width: 13px; height: 13px; }
.band-foot { margin-top: clamp(40px, 6vw, 64px); padding-top: 24px; border-top: 1px solid var(--band-line); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; font-size: 15px; color: var(--band-muted); }

/* ---------- open source ---------- */
.repos { border-top: 1px solid var(--line); }
.repo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) auto; gap: 8px 40px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); transition: background .3s; }
.repo:hover { background: linear-gradient(90deg, transparent, var(--bg-2) 20%, var(--bg-2) 80%, transparent); }
.repo-name { font: 500 17px var(--mono); letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.repo-name svg { width: 18px; height: 18px; flex: none; }
.repo p { margin: 0; color: var(--ink-2); }
.repo .chips { margin-top: 12px; }
.repo .arrow-link { white-space: nowrap; }
.gh-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 36px; }
.gh-cta .handle { font: 500 15px var(--mono); color: var(--muted); }
@media (max-width: 760px) { .repo { grid-template-columns: 1fr; } }

/* ---------- icons ---------- */
.icon { width: 1em; height: 1em; flex: none; }
.tile { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); margin-bottom: 22px; }
.tile .icon { width: 21px; height: 21px; }
.cs-meta dt { display: flex; align-items: center; gap: 8px; }
.cs-meta dt .icon { width: 14px; height: 14px; color: var(--accent); }
.contact-links .cl { display: inline-flex; align-items: center; gap: 12px; }
.contact-links .cl .icon { width: 18px; height: 18px; color: var(--muted); transition: color .25s; }
.contact-links a:hover .cl .icon { color: var(--accent); }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.service { padding: 30px 32px 8px 0; }
.service + .service { padding-left: 32px; border-left: 1px solid var(--line); }
.service .tile { margin-bottom: 24px; }
.service h3 { font: 400 1.85rem/1.08 var(--serif); letter-spacing: -0.02em; margin-bottom: 14px; }
.service > p { color: var(--ink-2); min-height: 4.8em; }
.service li { padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 15.5px; display: flex; gap: 12px; }
.service li::before { content: "—"; color: var(--muted); }
@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0 8px; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
  .service > p { min-height: 0; }
}

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { padding-top: 20px; border-top: 1px solid var(--line); counter-increment: step; }
.step .tile { margin-bottom: 20px; }
.step h3 { font: 400 1.45rem/1.15 var(--serif); margin-bottom: 10px; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- also built ---------- */
.also { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.also div { padding: 22px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.also h3 { font: 500 16.5px var(--sans); margin-bottom: 8px; letter-spacing: -0.01em; }
.also p { color: var(--muted); font-size: 15px; margin: 0; }
@media (max-width: 900px) { .also { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { padding: clamp(80px, 12vw, 160px) 0; border-top: 1px solid var(--line); }
.contact h2 { font: 380 clamp(2.6rem, 7vw, 6rem)/0.98 var(--serif); letter-spacing: -0.035em; max-width: 12ch; font-variation-settings: "opsz" 72; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px 72px; align-items: end; }
.contact-grid > p { color: var(--ink-2); margin: 28px 0 0; max-width: 46ch; }
.mail { display: inline-block; font: 400 clamp(1.5rem, 3.4vw, 2.6rem)/1.1 var(--serif); letter-spacing: -0.02em; margin-top: 44px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 6px; transition: color .25s, background-size .4s var(--ease); overflow-wrap: anywhere; }
.mail:hover { color: var(--accent); background-size: 0 1px; background-position: 100% 100%; }
.contact-links { display: grid; border-top: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding .3s var(--ease), color .25s; }
.contact-links a:hover { padding-left: 8px; color: var(--accent); }
.contact-links span:last-child { font: 500 14px var(--mono); color: var(--muted); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14.5px; color: var(--muted); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: flex-start; }
.footer-top .logo { height: 24px; margin-bottom: 10px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footer-nav a:hover, .footer-bottom a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-2); font-size: 13px; }
.footer-bottom .fine { max-width: 70ch; }

/* ---------- work index ---------- */
.page-head { padding: clamp(48px, 9vw, 112px) 0 clamp(32px, 5vw, 56px); }
.page-head h1 { font: 380 clamp(2.6rem, 7vw, 5.6rem)/0.98 var(--serif); letter-spacing: -0.034em; font-variation-settings: "opsz" 72; }
.page-head p { color: var(--muted); max-width: 52ch; margin: 22px 0 0; font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter { font: 500 14px var(--sans); padding: 8px 15px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--ink-2); cursor: pointer; transition: .2s; }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter sup { font: 500 10px var(--mono); margin-left: 4px; opacity: .7; }
.index { border-top: 1px solid var(--ink); }
.index-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 160px 70px; gap: 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.index-row[hidden] { display: none; }
.index-thumb { border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); aspect-ratio: 16 / 10; }
.index-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .7s var(--ease); }
.index-thumb.is-game img { object-position: center; }
.index-thumb.is-text { display: grid; place-items: center; font: 400 italic 26px var(--serif); color: var(--muted); }
.index-row:hover .index-thumb img { transform: scale(1.04); }
.index-row h2 { font: 400 1.75rem/1.1 var(--serif); letter-spacing: -0.02em; margin-bottom: 6px; transition: color .2s; }
.index-row:hover h2 { color: var(--accent); }
.index-row p { margin: 0; color: var(--muted); font-size: 15.5px; }
.index-row .yr { font: 500 13px var(--mono); color: var(--muted); text-align: right; }
@media (max-width: 760px) {
  .index-row { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .index-row .label, .index-row .yr { display: none; }
  .index-row h2 { font-size: 1.35rem; }
  .index-row p { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- case study ---------- */
.cs-head { padding: clamp(36px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); }
.back { display: flex; width: fit-content; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); margin-bottom: clamp(36px, 6vw, 64px); }
.back:hover { color: var(--ink); }
.back svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.back:hover svg { transform: translateX(-3px); }
.cs-head h1 { font: 380 clamp(3rem, 9vw, 7.4rem)/0.92 var(--serif); letter-spacing: -0.04em; margin: 18px 0 26px; font-variation-settings: "opsz" 72; }
.cs-tagline { font: 400 clamp(1.25rem, 2.4vw, 1.75rem)/1.3 var(--serif); letter-spacing: -0.01em; color: var(--ink-2); max-width: 34ch; margin: 0; }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 6vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); }
.cs-meta dt { margin-bottom: 8px; }
.cs-meta dd { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.cs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 760px) { .cs-meta { grid-template-columns: 1fr 1fr; } }
.cs-hero { margin-bottom: clamp(48px, 7vw, 88px); }
.cs-hero .frame img { aspect-ratio: auto; }
.cs-hero .transcript { max-width: 820px; margin: 0 auto; }
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(56px, 8vw, 96px); }
.cs-stats div { padding: 26px 24px 24px 0; }
.cs-stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.cs-stats b { display: block; font: 400 clamp(2rem, 4vw, 3rem)/1 var(--serif); letter-spacing: -0.02em; margin-bottom: 8px; }
.cs-stats span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 560px) { .cs-stats div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }
.cs-sections { display: grid; gap: clamp(48px, 7vw, 80px); }
.cs-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; }
.cs-section h2 { font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1.1 var(--serif); letter-spacing: -0.02em; position: sticky; top: 96px; align-self: start; }
@media (max-width: 860px) { .cs-section { grid-template-columns: 1fr; } .cs-section h2 { position: static; } }
.prose { max-width: 66ch; font-size: 17.5px; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { display: grid; gap: 12px; margin: 0 0 1em; }
.prose li { position: relative; padding-left: 22px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 8px; height: 1px; background: var(--accent); }
.prose a { border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--ink); }
.private-note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 15px; margin-top: 20px; max-width: 820px; margin-left: auto; margin-right: auto; }
.private-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }

/* gallery */
.gallery { margin-top: clamp(72px, 10vw, 128px); }
.gallery-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.gallery-head h2 { font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1.1 var(--serif); letter-spacing: -0.02em; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.shot { margin: 0; }
.shot.is-wide { grid-column: 1 / -1; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.shot .frame img { aspect-ratio: auto; }
.shot.is-tall .frame { max-width: 340px; margin: 0 auto; }
.shot figcaption { margin-top: 12px; font-size: 14.5px; color: var(--muted); display: flex; gap: 12px; }
.shot figcaption .label { flex: none; padding-top: 2px; }
@media (max-width: 700px) { .shots { grid-template-columns: 1fr; } }

/* next project */
.next { display: block; margin-top: clamp(80px, 12vw, 160px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--ink); }
.next .label { display: block; margin-bottom: 18px; }
.next strong { display: flex; align-items: center; gap: 24px; font: 380 clamp(2.6rem, 7vw, 5.6rem)/1 var(--serif); letter-spacing: -0.035em; transition: color .25s, gap .4s var(--ease); }
.next strong svg { width: .6em; height: .6em; flex: none; }
.next:hover strong { color: var(--accent); gap: 36px; }
.next p { color: var(--muted); margin: 14px 0 0; max-width: 56ch; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 10, 9, .9); backdrop-filter: blur(4px); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 56px 72px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox p { color: #CFCABE; font-size: 15px; margin: 16px 0 0; text-align: center; max-width: 70ch; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #ECE8DE; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox-inner { padding: 64px 12px 20px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

/* legal */
.legal { padding: clamp(40px, 7vw, 88px) 0 clamp(72px, 10vw, 120px); }
.legal h1 { font: 380 clamp(2.4rem, 6vw, 4.4rem)/1 var(--serif); letter-spacing: -0.03em; margin-bottom: 14px; }
.legal .updated { margin-bottom: 48px; display: block; }
.legal .prose h2 { font: 400 1.5rem/1.2 var(--serif); color: var(--ink); margin: 2.2em 0 .6em; letter-spacing: -0.01em; }

/* theme switch: circular reveal (View Transitions) or a short fade as fallback */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), fill .4s var(--ease) !important;
}

/* reveal on scroll (only when JS runs and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

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