/* Portfolio shell — one layout, three themes (light / dark / matrix).
   Themes only change tokens and effects, never structure.
   Light + dark are monochrome with one accent each (red / blue); matrix is green. Fonts are identical in every theme. */

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Logo wordmark only. Michroma (SIL Open Font License), self-hosted. */
@font-face {
  font-family: "Michroma";
  src: url("../fonts/michroma.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Shared tokens: identical in every theme (so the layout can't differ). */
:root {
  --font-logo: "Michroma", "Inter Tight", "Avenir Next", system-ui, sans-serif;
  --font-body: "Inter Tight", "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif-style: italic;
  --radius: 0;
  --pad: max(28px, calc((100vw - 1360px) / 2));
}

/* Themes below define colours and effects only. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf8;
  --bg-2: #f2f1ed;
  --surface: #ffffff;
  --ink: #111110;
  --dim: #6b6a65;
  --hair: #d8d6d0;
  --hair-soft: #e8e6e1;
  --hover: rgba(17, 17, 16, 0.035);
  --accent: #ee2a12;
  --accent-text: #cc200d;
  --accent-ink: #ffffff;
  --btn-bg: #111110;
  --btn-ink: #fafaf8;
  --glass-bg: rgba(255, 255, 255, 0.16);
  --glass-bg-scrolled: rgba(255, 255, 255, 0.28);
  --glass-sheen: rgba(255, 255, 255, 0.55);
  --glass-edge: transparent;
  --glass-ring: transparent;
  --glass-bevel: transparent;
  --glass-top: transparent;
  --glass-glow: inset 0 0 22px rgba(255, 255, 255, 0.55);
  --glass-shine: rgba(255, 255, 255, 1);
  --glass-shadow: 0 10px 30px rgba(17, 17, 16, 0.08);
  --aurora-1: rgba(238, 42, 18, 0.11);
  --aurora-2: rgba(17, 17, 16, 0.05);
  /* Background texture (light): a perforated dot grid, plus calm water ripples spreading from the top right. */
  --tex-1: radial-gradient(circle at 50% 50%, rgba(17, 17, 16, 0.22) 0 1.15px, transparent 1.8px),
           radial-gradient(circle at calc(50% + 0.9px) calc(50% + 0.9px), rgba(255, 255, 255, 0.95) 0 1.1px, transparent 1.8px);
  --tex-1-size: 14px 14px;
  --tex-1-mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.7) 55%, rgba(0, 0, 0, 0.35) 100%);
  --tex-2: repeating-radial-gradient(circle at 80% 14%, transparent 0 38px, rgba(17, 17, 16, 0.06) 38px 39px);
  --tex-2-size: auto;
  --tex-2-mask: radial-gradient(circle at 80% 14%, #000 0%, rgba(0, 0, 0, 0.5) 38%, transparent 68%);
  --tex-2-opacity: 1;
  --o-sil: #ffffff;
  --o-g1: #ececea;
  --o-g2: #dcdcda;
  --o-line: #111110;
  --glow: none;
  --glow-box: none;
  --scroll-track: #fafaf8;
  --scroll-thumb: #d0cec8;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0b;
  --bg-2: #131312;
  --surface: #131312;
  --ink: #f2f1ed;
  --dim: #9a9892;
  --hair: #2d2d2b;
  --hair-soft: #1f1f1d;
  --hover: rgba(255, 255, 255, 0.04);
  --accent: #5b8cff;
  --accent-text: #5b8cff;
  --accent-ink: #0c0c0b;
  --btn-bg: #f2f1ed;
  --btn-ink: #0c0c0b;
  --glass-bg: rgba(70, 70, 78, 0.14);
  --glass-bg-scrolled: rgba(60, 60, 68, 0.26);
  --glass-sheen: rgba(255, 255, 255, 0.14);
  --glass-edge: transparent;
  --glass-ring: transparent;
  --glass-bevel: transparent;
  --glass-top: transparent;
  --glass-glow: inset 0 0 0 transparent;
  --glass-shine: rgba(255, 255, 255, 0.34);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  --aurora-1: rgba(91, 140, 255, 0.17);
  --aurora-2: rgba(255, 255, 255, 0.04);
  /* Background texture (dark): a faint blueprint grid with fine film grain over it. */
  --tex-1: linear-gradient(rgba(140, 170, 255, 0.085) 1px, transparent 1px),
           linear-gradient(90deg, rgba(140, 170, 255, 0.085) 1px, transparent 1px);
  --tex-1-size: 56px 56px;
  --tex-1-mask: radial-gradient(ellipse at 72% 18%, #000 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.12) 100%);
  --tex-2: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --tex-2-size: 180px 180px;
  --tex-2-mask: none;
  --tex-2-opacity: 0.055;
  --m-sil: #fafaf8;
  --m-g1: #e8e8e6;
  --m-g2: #d6d6d4;
  --m-w: #fafaf8;
  --m-line: transparent;
  --scroll-track: #0c0c0b;
  --scroll-thumb: #2d2d2b;
}

:root[data-theme="matrix"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: rgba(0, 10, 3, 0.62);
  --surface: rgba(0, 12, 4, 0.78);
  --ink: #2bff63;
  --dim: #14c747;
  --hair: rgba(0, 255, 65, 0.34);
  --hair-soft: rgba(0, 255, 65, 0.16);
  --hover: rgba(0, 255, 65, 0.07);
  --accent: #00ff41;
  --accent-text: #00ff41;
  --accent-ink: #000000;
  --btn-bg: #00ff41;
  --btn-ink: #000000;
  --glass-bg: rgba(0, 60, 18, 0.14);
  --glass-bg-scrolled: rgba(0, 50, 14, 0.26);
  --glass-sheen: rgba(0, 255, 65, 0.16);
  --glass-edge: rgba(0, 255, 65, 0.55);
  --glass-ring: rgba(0, 0, 0, 0.6);
  --glass-bevel: rgba(0, 0, 0, 0.5);
  --glass-top: rgba(80, 255, 120, 0.5);
  --glass-glow: inset 0 0 0 transparent;
  --glass-shine: rgba(80, 255, 120, 0.5);
  --glass-shadow: 0 0 24px rgba(0, 255, 65, 0.18);
  --aurora-1: transparent;
  --aurora-2: transparent;
  --m-sil: transparent;
  --m-g1: transparent;
  --m-g2: transparent;
  --m-w: transparent;
  --m-line: #2bff63;
  --glow: 0 0 8px rgba(0, 255, 65, 0.75), 0 0 26px rgba(0, 255, 65, 0.42);
  --glow-box: 0 0 18px rgba(0, 255, 65, 0.5), 0 0 40px rgba(0, 255, 65, 0.2);
  --scroll-track: #000000;
  --scroll-thumb: #0d4a1c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { position: relative; z-index: 1; }
:root[data-theme="matrix"] body { text-shadow: 0 0 6px rgba(0, 255, 65, 0.32); }
:root[data-theme="matrix"] .hero-title,
:root[data-theme="matrix"] .foot-big,
:root[data-theme="matrix"] .lede,
:root[data-theme="matrix"] .worklist h4, :root[data-theme="matrix"] .worklist h3,
:root[data-theme="matrix"] .storecard h3 { text-shadow: var(--glow); }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Matrix-only effects: falling code (canvas) + scanlines. Hidden in light/dark. */
.matrix-rain {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
}
.fx {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 255, 65, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
:root[data-theme="matrix"] .matrix-rain,
:root[data-theme="matrix"] .fx { display: block; }

/* Ambient colour field fixed behind the page. Hidden in matrix (the rain is the backdrop). */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; will-change: transform; translate: 0 var(--py, 0px); }
.aurora i:nth-child(1) {
  width: 62vw; height: 62vw; left: 48%; top: -22%;
  background: radial-gradient(closest-side, var(--aurora-1), transparent);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  width: 52vw; height: 52vw; left: -14%; top: 38%;
  background: radial-gradient(closest-side, var(--aurora-2), transparent);
  animation: drift-b 32s ease-in-out infinite alternate;
}
/* Texture layers live on the aurora (fixed, behind content, hidden in matrix). Colours/patterns come from the --tex-* tokens. */
.aurora::before, .aurora::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.aurora::before {
  background-image: var(--tex-1);
  background-size: var(--tex-1-size);
  -webkit-mask-image: var(--tex-1-mask);
  mask-image: var(--tex-1-mask);
}
.aurora::after {
  background-image: var(--tex-2);
  background-size: var(--tex-2-size);
  opacity: var(--tex-2-opacity);
  -webkit-mask-image: var(--tex-2-mask);
  mask-image: var(--tex-2-mask);
}
:root[data-theme="matrix"] .aurora { display: none; }
@keyframes drift-a { to { transform: translate(-9vw, 12vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(10vw, -10vh) scale(1.08); } }

/* Nav: a floating frosted-glass capsule. Content scrolls underneath and shows through. */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px 12px 10px 16px;
  margin: 12px max(12px, calc(var(--pad) - 16px)) 0;
  position: sticky;
  top: 12px;
  z-index: 20;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), var(--glass-bg);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 0 0 1px var(--glass-ring), var(--glass-shadow), var(--glass-glow), inset 0 1px 0 var(--glass-top), inset 0 -1px 0 var(--glass-bevel);
  backdrop-filter: blur(16px) saturate(220%) brightness(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(220%) brightness(1.06);
  animation: nav-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.nav.is-scrolled { background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), var(--glass-bg-scrolled); box-shadow: 0 0 0 1px var(--glass-ring), var(--glass-shadow), 0 18px 44px rgba(0, 0, 0, 0.1), var(--glass-glow), inset 0 1px 0 var(--glass-top), inset 0 -1px 0 var(--glass-bevel); }
/* The sheen gradient must span the whole capsule, else it tiles into the 1px border and draws a hairline. */
.nav, .nav.is-scrolled { background-origin: border-box; }
/* Specular highlight that follows the pointer across the glass. */
.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(160px circle at var(--mx, 50%) 50%, var(--glass-shine), transparent 70%);
  transition: opacity 0.3s ease;
}
.nav:hover::after { opacity: 0.55; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav, .nav.is-scrolled { background: var(--bg); }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
}
/* The dove mark: an outlined white dove (light), a solid white dove (dark) and a neon line dove (matrix).
   All three share one box and exactly one shows per theme, so the layout is identical. */
.logo-mark { width: 36px; height: 36px; flex: none; display: none; overflow: visible; }
.m-outline { display: block; }
:root[data-theme="dark"] .m-outline, :root[data-theme="matrix"] .m-outline { display: none; }
:root[data-theme="dark"] .m-solid { display: block; }
:root[data-theme="matrix"] .m-neon { display: block; filter: drop-shadow(0 0 2px rgba(0, 255, 65, 0.9)) drop-shadow(0 0 8px rgba(0, 255, 65, 0.5)); }
.o-sil { fill: var(--o-sil); }
.o-g1 { fill: var(--o-g1); }
.o-g2 { fill: var(--o-g2); }
/* The traced lines are hairlines at 36px, so a thin 0.45px non-scaling stroke keeps them readable at any size. */
.o-line { fill: var(--o-line); stroke: var(--o-line); stroke-width: 0.45px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.m-sil { fill: var(--m-sil); }
.m-g1 { fill: var(--m-g1); }
.m-g2 { fill: var(--m-g2); }
.m-w { fill: var(--m-w); }
.m-acc { fill: var(--accent); }
.m-line { fill: var(--m-line); stroke: var(--m-line); stroke-width: 16px; stroke-linejoin: round; }
.nav-links { display: flex; gap: 26px; margin-right: auto; }
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.72;
  transition: opacity 0.2s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-links a { display: inline-flex; align-items: center; gap: 8px; }
.ni { width: 18px; height: 18px; flex: none; }
.nav-links a.active .ni, .nav-links a:hover .ni { color: var(--accent-text); }
.theme-switch { display: inline-flex; gap: 2px; font-family: var(--mono); font-size: 12px; }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; }
.theme-switch button .ni { width: 16px; height: 16px; }
.theme-switch button {
  background: transparent;
  color: var(--dim);
  border: 0;
  padding: 4px 8px;
  font: inherit;
  cursor: pointer;
}
.nav .theme-switch button { color: var(--ink); opacity: 0.62; }
.nav .theme-switch button:hover, .nav .theme-switch button[aria-pressed="true"] { opacity: 1; }
.theme-switch button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Buttons. */
.btn-solid {
  display: inline-block;
  padding: 13px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  color: var(--btn-ink);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
}
.btn-solid:hover { opacity: 0.86; box-shadow: var(--glow-box); }
.btn-solid.small { padding: 9px 16px; font-size: 14px; }
.btn-ghost {
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.btn-ghost:hover { color: var(--accent); }

/* Hero: one statement, one paragraph, two actions. */
.hero { padding: clamp(72px, 12vw, 160px) var(--pad) clamp(56px, 8vw, 104px); }
.hero-title, .page-title {
  margin: 0;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-shadow: var(--glow);
}
.hero-title { font-size: clamp(52px, 10.5vw, 160px); max-width: 14ch; }
.hero-title em, .page-title em {
  font-family: var(--font-serif);
  font-style: var(--serif-style);
  font-weight: 400;
  letter-spacing: -0.03em;
}
.hero-title .dot, .page-title .dot { color: var(--accent); }
/* Headline: each word slides up out of a mask. */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.1em 0.1em 0.16em 0; margin: -0.1em -0.1em -0.16em 0; }
.w > span {
  display: inline-block;
  transform: translateY(115%);
  animation: word-up 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(0.12s + var(--i, 0) * 0.09s);
}
@keyframes word-up { to { transform: none; } }
.hero-foot, .page-hero .hero-sub { animation: fade-up 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; }
.js .reveal.in { animation: reveal-up 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms) both; }
@keyframes reveal-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-foot {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  margin-top: clamp(40px, 6vw, 80px);
  align-items: start;
}
.hero-sub { margin: 0; max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--dim); }
.hero-sub em { font-style: normal; color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; flex-wrap: wrap; }

/* Sections: label column + content, like a printed index. */
.section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 36px var(--pad) 96px;
  border-top: 1px solid var(--hair);
}
.label, .section-label {
  margin: 0;
  font-weight: 400;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 6px;
}
.label b, .section-label b { color: var(--accent-text); font-weight: 500; text-shadow: var(--glow); }
.section-body { min-width: 0; }

/* Work index: ruled lists grouped by kind (Websites / Apps / Games). */
.work-group + .work-group { margin-top: 64px; }
.group-label {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim);
}
.group-label span { color: var(--accent-text); }
.worklist { list-style: none; margin: 0; padding: 0; }
.worklist li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) 112px 20px;
  gap: 20px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--hair-soft);
  position: relative;
  transition: padding 0.2s ease;
}
.worklist li:first-child { padding-top: 6px; }
.worklist li:hover { background: var(--hover); padding-left: 14px; padding-right: 14px; }
.worklist li:focus-within { background: var(--hover); outline: 2px solid var(--accent); outline-offset: -2px; }
.worklist li:focus-within::after { transform: scaleX(1); }
.worklist h4 a:focus-visible { outline: none; }
.worklist .idx { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.worklist h4, .worklist h3 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.worklist h4 a { text-decoration: none; }
.worklist h4 a::after { content: ""; position: absolute; inset: 0; }
.worklist li:hover h4 { text-shadow: var(--glow); }
.worklist li::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.worklist li:hover::after { transform: scaleX(1); }
/* Rows that are not links (the work showcase) get no hover state. */
.worklist li.static:hover { background: none; padding-left: 0; padding-right: 0; }
.worklist li.static:hover::after { transform: scaleX(0); }
.worklist li.static:hover :is(h3, h4) { text-shadow: none; }
.worklist .shots { grid-column: 2 / -1; max-width: 840px; display: grid; grid-template-columns: minmax(0, 1fr) clamp(96px, 16%, 150px); gap: 16px; align-items: end; margin-top: 14px; }
.worklist .shots img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--hover); box-shadow: var(--glass-shadow); }
.worklist .shots.phones { grid-template-columns: repeat(3, minmax(0, 150px)); justify-content: start; }
.worklist .shots .shot-d:only-child { grid-column: 1 / -1; }
.worklist .shots.gallery { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); align-items: start; }
.worklist .shots .shot-g { aspect-ratio: 7 / 5; object-fit: cover; }
.worklist .shots .shot-p { aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 16px; }
.worklist .shots .shot-m { aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 12px; }
.mkt-tag {
  display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--hover); color: var(--accent-text); font: 500 12.5px/1 var(--mono); letter-spacing: 0.02em;
}
.mkt-tag .ni { width: 16px; height: 16px; }
.worklist li.market:hover .mkt-tag { background: var(--accent); color: var(--accent-ink); }
/* Designs page: design language, palette swatches and type names under each name. */
.worklist .lang { margin: 10px 0 0; color: var(--dim); font-size: 15.5px; line-height: 1.55; max-width: 60ch; }
.worklist .spec { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 14px 0 0; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.swatches { display: inline-flex; gap: 6px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--hair); }
.worklist .desc { margin: 8px 0 0; color: var(--dim); font-size: 15px; max-width: 48ch; }
.worklist .meta { color: var(--dim); font-size: 14px; }
.worklist .arrow { color: var(--dim); transition: transform 0.2s ease, color 0.2s ease; }
.worklist li:hover .arrow { color: var(--accent); transform: translateX(4px); }

/* Home: three doors (Marketplace, Games, Portfolio), each opening its own page. Hairline grid like the marketplace. */
.doors {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--hair-soft); border: 1px solid var(--hair-soft);
}
.door {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 28px;
  background: var(--bg); color: var(--ink); text-decoration: none; transition: background-color 0.3s ease;
}
.door:hover { background: var(--surface); }
.door:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.door::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.door:hover::after, .door:focus-visible::after { transform: scaleX(1); }
.door-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.door-top .door-ico { width: 22px; height: 22px; color: var(--accent-text); }
.door h3 { margin: 0; font-size: clamp(28px, 2.6vw, 40px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
:root[data-theme="matrix"] .door h3 { text-shadow: var(--glow); }
.door p { margin: 0; color: var(--dim); font-size: 15px; max-width: 36ch; }
.door-art { display: block; margin-top: auto; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--hover); box-shadow: var(--glass-shadow); }
.door-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.door:hover .door-art img { transform: scale(1.03); }
.door-art.logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: center; gap: 14px; padding: 8% 10%; box-shadow: none; }
.door-art.logos img { aspect-ratio: 1; height: auto; object-fit: contain; border-radius: 22%; }
.door:hover .door-art.logos img { transform: none; }
.door-go { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); }
.door-arrow { font-size: 18px; transition: transform 0.2s ease; }
.door:hover .door-arrow { transform: translateX(4px); }
@media (max-width: 1099px) {
  .doors { grid-template-columns: 1fr; }
  .door { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42%); grid-template-rows: auto auto 1fr auto; column-gap: 28px; row-gap: 12px; }
  .door > :not(.door-art) { grid-column: 1; }
  .door-art { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; align-self: center; }
}
@media (max-width: 560px) {
  .door { display: flex; padding: 22px; }
  .door-art { margin-top: 6px; }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid var(--dim);
  border-radius: 50%;
}
.badge.offline::before { border-style: dashed; }
.badge.coming-soon::before { border-style: dotted; }
.badge.paused::before { border-radius: 1px; }
.badge.prototype::before { border-radius: 1px; border-style: dashed; transform: rotate(45deg); }
.badge.shipped { color: var(--ink); }
.badge.shipped::before { background: var(--accent); border-color: var(--accent); box-shadow: var(--glow-box); }

/* About. */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; }
.lede {
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 500;
  max-width: 24em;
}
.lede strong { font-family: var(--font-serif); font-style: var(--serif-style); font-weight: 400; color: var(--accent); text-shadow: var(--glow); }
.about ul, .guarantee ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; font-size: 15px; color: var(--dim); }
.about li, .guarantee li { padding: 14px 0; border-bottom: 1px solid var(--hair-soft); }
.about li:first-child, .guarantee li:first-child { padding-top: 0; }
.about li strong, .guarantee li strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }

/* Footer. */
.footer { padding: 36px var(--pad) 48px; border-top: 1px solid var(--hair); }
.foot-big {
  margin: 0 0 40px;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.foot-big a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; text-shadow: var(--glow); }
.foot-big a:hover { color: var(--accent); }
.foot-small { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0; color: var(--dim); font-size: 13px; font-family: var(--mono); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 2px solid var(--scroll-track); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Sub-pages: store + archive. */
.page-hero { padding: clamp(56px, 9vw, 120px) var(--pad) clamp(40px, 6vw, 72px); }
.page-title { font-size: clamp(44px, 8vw, 120px); max-width: 14ch; }
.page-hero .hero-sub { margin-top: 28px; }
.storegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1px;
  background: var(--hair-soft);
  border: 1px solid var(--hair-soft);
}
.storecard {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 340px;
}
.storecard { transition: background-color 0.3s ease; }
.storecard:hover { background: var(--surface); }
.storecard h3 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.storecard h3 a { text-decoration: none; }
.storecard h3 a:hover { color: var(--accent); }
.store-head { display: flex; align-items: center; gap: 16px; }
.store-logo { width: 56px; height: 56px; flex: none; border-radius: 14px; object-fit: contain; }
.store-kinds { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 0; }
.kindtag { font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; }
.plats { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.plat { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.plat-ico { flex: none; color: var(--ink); }
.plat.soon span { font-style: italic; }
.plat.soon .plat-ico { color: var(--dim); }
.worklist .meta .plat { text-transform: none; font-size: 14px; letter-spacing: 0; font-family: inherit; }
.store-note { margin: 0; font-size: 13px; color: var(--dim); font-family: var(--mono); }
.store-tag { margin: 0; color: var(--dim); font-size: 15px; }
.storecard .tags { display: flex; gap: 6px 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.sale-price { margin: auto 0 0; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sale-price span { font-size: 13px; font-weight: 400; color: var(--dim); letter-spacing: 0; }
.storecard .btn-solid { align-self: flex-start; }
.guarantee { background: transparent; }

/* Skip link: first thing keyboard users reach. */
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip:focus { top: 16px; }

/* Footer links + copy-email button. */
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 28px; }
.foot-links a { font-size: 14px; color: var(--dim); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.copy-mail {
  display: inline-block;
  margin: -20px 0 32px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hair);
  cursor: pointer;
}
.copy-mail:hover { border-color: var(--accent); }
.copy-mail.done { color: var(--accent-text); border-color: var(--accent); }

/* Long-form pages (terms, refunds, privacy). */
.prose { max-width: 68ch; color: var(--dim); font-size: 16px; }
.prose h2 { margin: 2.2em 0 0.55em; font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); }
.prose h2:first-of-type { margin-top: 1.2em; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; display: grid; gap: 0.7em; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.prose a:hover { color: var(--accent); }
.updated { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* FAQ: native <details>, no JS. */
.faq details { border-top: 1px solid var(--hair-soft); }
.faq details:last-child { border-bottom: 1px solid var(--hair-soft); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 24px 44px 24px 0;
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 44px 26px 0; max-width: 62ch; color: var(--dim); }
.faq .answer p { margin: 0; }
.faq .answer a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.faq details[open] .answer { animation: fade-up 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Release notes. */
.releases { display: grid; gap: 0; }
.release { padding: 26px 0; border-top: 1px solid var(--hair-soft); }
.release:last-child { border-bottom: 1px solid var(--hair-soft); }
.release-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.release-ver { color: var(--ink); font-size: 14px; }
.release ul { margin: 0; padding-left: 1.2em; display: grid; gap: 0.5em; color: var(--dim); }

/* Brief cross-fade while switching themes (class set by theme.js). */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, text-shadow 0.4s ease !important;
}

/* Mobile / tablet dock: the main navigation moves to a floating glass pill at the bottom; the top capsule keeps only the logo. */
.dock { display: none; }
.dock-theme { position: relative; display: flex; }
.dock-theme-btn .ni { display: none; }
:root[data-theme="light"] .dock-theme-btn .tt-light, :root[data-theme="dark"] .dock-theme-btn .tt-dark, :root[data-theme="matrix"] .dock-theme-btn .tt-matrix { display: block; }
.theme-menu {
  position: absolute; right: 0; bottom: calc(100% + 14px); min-width: 176px; padding: 6px; display: grid; gap: 2px; z-index: 5;
  border-radius: 24px; background: color-mix(in srgb, var(--bg) 97%, transparent); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), 0 18px 44px rgba(0, 0, 0, 0.22);
}
.theme-menu[hidden] { display: none; }
.theme-menu button {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 18px; background: transparent;
  color: var(--ink); font: 500 15px/1 var(--font-body); text-align: left; cursor: pointer; opacity: 0.8;
}
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--hover); opacity: 1; }
.theme-menu button[aria-checked="true"] { color: var(--accent-text); opacity: 1; background: var(--hover); }
.theme-menu .ni { width: 20px; height: 20px; }
@keyframes dock-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .nav { gap: 24px; }
  .nav-links { gap: 20px; }
  .theme-switch button span { display: none; }
  .theme-switch button { padding: 6px 8px; }
}
@media (max-width: 899px) {
  .nav { width: fit-content; margin: 10px auto 0; padding: 7px 18px 7px 12px; gap: 0; }
  .nav-links, .theme-switch { display: none; }
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .dock {
    display: flex; position: fixed; z-index: 40; left: 0; right: 0; margin-inline: auto; width: fit-content; max-width: calc(100vw - 20px);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); align-items: center; gap: 2px; padding: 7px; border-radius: 999px;
    background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), var(--glass-bg-scrolled); background-origin: border-box;
    border: 1px solid var(--glass-edge);
    box-shadow: 0 0 0 1px var(--glass-ring), var(--glass-shadow), 0 18px 44px rgba(0, 0, 0, 0.14), var(--glass-glow), inset 0 1px 0 var(--glass-top), inset 0 -1px 0 var(--glass-bevel);
    -webkit-backdrop-filter: blur(16px) saturate(220%) brightness(1.06); backdrop-filter: blur(16px) saturate(220%) brightness(1.06);
    animation: dock-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .dock a, .dock-theme-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; height: 48px; padding: 0 14px; border: 0; border-radius: 999px;
    background: transparent; color: var(--ink); opacity: 0.72; font: 500 13px/1 var(--font-body); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, opacity 0.2s ease;
  }
  .dock .ni { width: 22px; height: 22px; }
  .dock a span { display: none; }
  .dock a:hover, .dock a:focus-visible, .dock-theme-btn:hover, .dock-theme-btn:focus-visible, .dock-theme-btn[aria-expanded="true"] { opacity: 1; background: var(--hover); }
  .dock a[aria-current], .dock a.active { opacity: 1; background: var(--hover); }
  .dock a[aria-current] .ni, .dock a.active .ni { color: var(--accent-text); }
  .dock a:focus-visible, .dock-theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .dock a span { display: inline; }
  .dock a, .dock-theme-btn { padding: 0 16px; }
}
@media (max-width: 520px) {
  .worklist li { grid-template-columns: 32px minmax(0, 1fr); }
  .worklist li > div { min-width: 0; }
  .worklist :is(h3, h4) { overflow-wrap: anywhere; }
  .worklist .badge { grid-column: 2; grid-row: auto; justify-self: start; }
  .worklist .meta { grid-column: 2; }
}
@media (max-width: 380px) {
  .dock a, .dock-theme-btn { min-width: 44px; padding: 0 11px; }
}

@media (max-width: 860px) {
  :root { --pad: 20px; }
  .hero-foot, .section { grid-template-columns: 1fr; gap: 14px; }
  .section { padding-bottom: 64px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .worklist li { grid-template-columns: 32px 1fr auto; gap: 6px 14px; }
  .worklist li:hover { padding-left: 0; padding-right: 0; }
  .worklist .meta { grid-column: 2; }
  .worklist .badge { grid-column: 3; grid-row: 1; }
  .worklist .arrow { display: none; }
  .worklist .shots { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 28%; gap: 10px; }
  .worklist .shots.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .door, .door::after, .door-art img, .door-arrow { transition: none; }
  html { scroll-behavior: auto; }
  .worklist li, .worklist .arrow, .worklist li::after { transition: none; }
  .dock, .nav, .w > span, .hero-foot, .page-hero .hero-sub, .aurora i, .js .reveal.in, .faq details[open] .answer { animation: none; }
  .skip { transition: none; }
  .w > span { transform: none; }
  .js .reveal { opacity: 1; }
}
