/* ---------- Fonts (self-hosted, latin + latin-ext; SIL Open Font License) ---------- */
/* Bricolage Grotesque · latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Bricolage Grotesque · latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Instrument Serif · latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/instrument-serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Instrument Serif · latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/instrument-serif-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono · latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono · latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono · latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono · latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Pixelify Sans · latin-ext */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/pixelify-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Pixelify Sans · latin */
@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/pixelify-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens: change --accent to re-theme everything ---------- */
:root {
  --bg: #0a0d13;
  --bg-2: #10151d;
  --bg-3: #18202b;
  --line: #222b38;
  --line-2: #313d4e;
  --text: #eef3f8;
  --muted: #9ba8b9;
  --dim: #77849a;
  --accent: #2f6bff;
  --accent-2: #7ea6ff;
  --pop: #ffd23f;
  --console-bg: #0c1119;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --pixel: "Pixelify Sans", var(--mono);
  --ease: cubic-bezier(0.16, 1, 0.3, 1); /* expo-out: fast start, soft landing */
  --pad: clamp(16px, 4vw, 48px);
  --page-top: clamp(48px, 9vh, 96px); /* nav to the first line of every page */
  --title-gap: 20px;                  /* small label to big title */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* full page loads between the site and the desktop crossfade instead of flashing (browsers without it just load) */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* ---------- Scrollbar ----------
   Native scrollbar (keeps smooth scrolling, accessibility and touchpads working), just restyled.
   - scrollbar-gutter: stable reserves its space, so the page doesn't jump when the gate
     locks scrolling and then unlocks it.
   - Chrome/Edge/Firefox use the standard properties. Once those are set, Chrome ignores
     ::-webkit-scrollbar, so the webkit rules only go to browsers without
     scrollbar-color (Safari).
   - While you scroll, the thumb turns accent blue (html.is-scrolling, set in main.js). */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) var(--bg);
  scrollbar-gutter: stable;
}
html.is-scrolling { scrollbar-color: var(--accent) var(--bg); }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--bg); border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover, html.is-scrolling ::-webkit-scrollbar-thumb { background: var(--accent); }
}
/* Background, in three layers:
   - body: a blue glow over the hero that scrolls away with it (on the page canvas, so it costs nothing on scroll);
   - body::before: a fine blueprint grid fixed to the screen, fading out toward the bottom, so every section keeps some depth;
   - body::after: film grain on top. */
body {
  margin: 0; color: var(--text);
  background:
    radial-gradient(60% 820px at 78% -160px, rgba(47, 107, 255, .22), transparent 72%) no-repeat,
    radial-gradient(45% 640px at 8% 260px, rgba(126, 166, 255, .07), transparent 70%) no-repeat,
    var(--bg);
  font: 400 16px/1.6 var(--display);
  -webkit-font-smoothing: antialiased; font-optical-sizing: auto; font-kerning: normal; overflow-x: hidden; overflow-x: clip;
}
/* film grain */
body::after {
  /* plain low-opacity layer: no blend mode, so scrolling doesn't re-composite the page */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .035; contain: strict;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.locked { overflow: hidden; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; contain: strict;
  background:
    linear-gradient(rgba(126, 166, 255, .075) 1px, transparent 1px) 50% 0 / 56px 56px,
    linear-gradient(90deg, rgba(126, 166, 255, .075) 1px, transparent 1px) 50% 0 / 56px 56px,
    radial-gradient(70% 60% at 50% 115%, rgba(47, 107, 255, .07), transparent 70%);
  -webkit-mask-image: radial-gradient(130% 85% at 50% 0%, #000 15%, rgba(0, 0, 0, .5) 60%, rgba(0, 0, 0, .2) 100%);
  mask-image: radial-gradient(130% 85% at 50% 0%, #000 15%, rgba(0, 0, 0, .5) 60%, rgba(0, 0, 0, .2) 100%);
}
/* pointer spotlight (added by main.js on desktop): the same grid, brighter, plus a soft glow, shown only in a circle around the pointer */
.bg-spot {
  position: fixed; inset: 0; pointer-events: none; z-index: -1; contain: strict;
  opacity: 0; transition: opacity .6s;
  background:
    linear-gradient(rgba(126, 166, 255, .22) 1px, transparent 1px) 50% 0 / 56px 56px,
    linear-gradient(90deg, rgba(126, 166, 255, .22) 1px, transparent 1px) 50% 0 / 56px 56px,
    radial-gradient(circle at var(--mx, -999px) var(--my, -999px), rgba(47, 107, 255, .12), transparent 60%);
  -webkit-mask-image: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), #000, transparent 70%);
  mask-image: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), #000, transparent 70%);
}
.bg-spot.on { opacity: 1; }
/* typesetting: headings break into even lines, paragraphs avoid a lone last word, numbers keep their width */
h1, h2, h3, h4, blockquote { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
.live, [data-views], .post-date, .case-facts dd { font-variant-numeric: tabular-nums; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); }
.u { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: background-size .25s var(--ease), color .15s; }
.u:hover { color: var(--accent); }
.kicker { font: 500 13px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.kicker i { font-style: normal; color: var(--accent); margin: 0 4px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(60% 40% at 50% 62%, rgba(110, 150, 255, .14), transparent 70%),
    radial-gradient(70% 55% at 50% 30%, rgba(47, 107, 255, .16), transparent 70%),
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.2px) 0 0 / 4px 4px,
    var(--bg);
  transition: opacity .45s var(--ease), visibility .45s, transform .55s var(--ease);
}
.gate.out { opacity: 0; visibility: hidden; transform: scale(1.08); }
.gate[hidden] { display: none; }
.gate-inner { position: relative; z-index: 2; text-align: center; padding: 0 16px; pointer-events: none; }
.gate-inner .gate-btn { pointer-events: auto; }
/* particle wordmark: the canvas draws VISTAL; the real text stays for layout + screen readers */
.gate-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.gate.particles .gate-word { color: transparent; -webkit-text-fill-color: transparent; background: none; filter: none; animation: none; }
.gate.particles .gate-word sup { -webkit-text-fill-color: var(--accent); }
.mark span { color: var(--accent); }

.gate-orbit { position: absolute; left: 50%; top: 45%; border: 1px solid rgba(238, 243, 248, .08); border-radius: 50%; transform: translate(-50%, -50%); animation: spin 60s linear infinite; }
.gate-orbit.o1 { width: min(78vmin, 720px); aspect-ratio: 1; }
.gate-orbit.o2 { width: min(60vmin, 560px); aspect-ratio: 1; animation-duration: 40s; animation-direction: reverse; border-style: dashed; border-color: rgba(47, 107, 255, .22); }
.gate-orbit i { position: absolute; top: 50%; left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.gate-corner { position: absolute; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.gate-corner.tl { top: 28px; left: 32px; text-transform: none; letter-spacing: 0; }
.gate-corner.tl .mark { font-size: 20px; color: var(--text); }
.gate-corner.tr { top: 32px; right: 32px; }
.gate-corner.bl { bottom: 28px; left: 32px; }
.gate-corner.br { bottom: 28px; right: 32px; }

.gate-eyebrow { display: flex; align-items: center; justify-content: center; gap: 14px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
.gate-eyebrow span { width: 44px; height: 1px; background: var(--line-2); }
.gate-eyebrow i { color: var(--accent); font-style: normal; margin-right: 14px; }
.gate-eyebrow em { font-style: normal; white-space: nowrap; }

/* 3D extruded wordmark */
.gate-word {
  position: relative; margin: 22px 0 34px;
  font: 800 clamp(64px, 15vw, 210px)/.9 var(--display); letter-spacing: -.02em; font-variation-settings: "opsz" 96;
  color: #dfe8ff;
  background: linear-gradient(180deg, #eef3ff 0%, #a9c2ff 45%, #2f6bff 52%, #1f4fd6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 1px 0 #1c45a8) drop-shadow(1px 1px 0 #183b93) drop-shadow(1px 1px 0 #14327e)
    drop-shadow(1px 1px 0 #102869) drop-shadow(1px 1px 0 #0c1f54) drop-shadow(1px 1px 0 #091740)
    drop-shadow(0 18px 30px rgba(0, 0, 0, .7));
  animation: float 6s ease-in-out infinite;
  will-change: transform; /* keep the filtered text on its own layer so floating it is cheap */
}
.gate-word sup { position: absolute; top: -.05em; right: -.45em; font-size: .28em; -webkit-text-fill-color: var(--accent); color: var(--accent); filter: none; }
@keyframes float { 50% { transform: translateY(-8px); } }

.gate-btn {
  position: relative; display: inline-flex; align-items: center; gap: 14px; min-width: 210px; justify-content: center;
  padding: 16px 28px; background: transparent; border: 0; cursor: pointer;
  font: 700 13px var(--mono); text-transform: uppercase; letter-spacing: .28em; color: var(--text);
}
.gate-btn::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -8px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.gate-btn b { position: absolute; width: 10px; height: 10px; border-color: var(--muted); border-style: solid; border-width: 0; transition: all .3s var(--ease); }
.gate-btn .c1 { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.gate-btn .c2 { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.gate-btn .c3 { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.gate-btn .c4 { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.gate-btn:hover b { width: 16px; height: 16px; border-color: var(--accent); }
.gate-btn:hover { color: var(--accent); }
.gate-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.gate-arrow { color: var(--accent); }
.gate-hint { margin-top: 26px; font: 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .14em; }
.gate-hint kbd { font: inherit; color: var(--accent); border: 1px solid var(--line-2); border-radius: 3px; padding: 2px 6px; }

/* HUD brackets around the viewport (desktop) */
.hud { position: fixed; inset: 12px; pointer-events: none; z-index: 70; }
.hud i { position: absolute; width: 18px; height: 18px; border: 0 solid var(--line-2); }
.hud .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- Top bar ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); z-index: 60; }
.top {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  /* full-width bar, but its contents line up with the 1320px content column */
  padding: 14px max(var(--pad), calc((100% - 1320px) / 2 + var(--pad)));
  background: rgba(10, 13, 19, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.mark { font: 700 22px/1 var(--pixel); letter-spacing: -.01em; }
.brand { display: flex; align-items: center; gap: 16px; }
/* small two-line name the big hero name docks into */
.nav-name {
  display: flex; flex-direction: column; padding-left: 16px; border-left: 1px solid var(--line-2);
  font: 700 13px/.86 var(--display); letter-spacing: -.055em; font-variation-settings: "opsz" 96;
  opacity: 0; transition: opacity .15s;
}
.nav-name.show { opacity: 1; }
.name { position: relative; z-index: 55; transform-origin: 0 0; will-change: transform; }
.name.docked { visibility: hidden; }
.links { display: flex; gap: 4px; font: 13px var(--mono); }
.links a { padding: 6px 10px; color: var(--muted); border-radius: 6px; }
.links a:hover, .links a.on { color: var(--text); background: var(--bg-3); }
.links a.on::before { content: "› "; color: var(--accent); }
.live { justify-self: end; display: flex; align-items: center; gap: 8px; font: 13px var(--mono); color: var(--muted); }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px;
  font: 500 14px var(--mono); background: var(--accent); color: #ffffff; border-radius: 4px;
  box-shadow: 4px 4px 0 var(--text); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--text); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--text); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--text); transform: none; }
.chip { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 13px; font: 12px var(--mono); color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.chip:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: end; padding-top: var(--page-top); padding-bottom: 72px; }
.name { font-weight: 700; font-size: clamp(56px, 10.5vw, 168px); line-height: .86; letter-spacing: -.055em; margin: var(--title-gap) 0 14px; font-variation-settings: "opsz" 96; }
.name .line { display: block; overflow: hidden; padding-bottom: .04em; }
.name .line > span { display: inline-block; transform: translateY(105%); transition: transform .75s var(--ease); }
.name .line:nth-child(2) > span { transition-delay: .05s; }
.ready .name .line > span { transform: none; }
.aka { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 18px); font: italic 400 clamp(28px, 3.4vw, 48px)/1 var(--serif); color: var(--accent); }
.aka em { color: var(--dim); margin-right: 6px; }
.aka-avatar {
  flex: none; width: clamp(46px, 4.6vw, 64px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent), 0 0 26px rgba(47, 107, 255, .45);
  transition: transform .4s var(--ease);
}
.aka-avatar:hover { transform: rotate(-6deg) scale(1.06); }
.intro { max-width: 540px; margin-top: 28px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.intro .u { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- Console ---------- */
.console {
  background: var(--console-bg); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden;
  box-shadow: -30px 30px 90px -40px rgba(47, 107, 255, .35), 30px 30px 80px -40px rgba(110, 150, 255, .3), 0 0 0 1px rgba(0,0,0,.6);
  font: 13px/1.65 var(--mono);
}
.console-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.lights i:first-child { background: #ff5f57; } .lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.console-title { color: var(--dim); font-size: 13px; flex: 1; text-align: center; }
.console-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #4ade80; border: 1px solid rgba(74, 222, 128, .3); padding: 1px 6px; border-radius: 3px; }
.console-body { height: 300px; overflow-y: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.console-body .ln { white-space: pre-wrap; word-break: break-word; color: var(--muted); }
.console-body .ln.cmd { color: var(--text); }
.console-body .t { color: var(--accent); }
.console-body .g { color: #4ade80; }
.console-body .y { color: var(--accent-2); }
.console-body .d { color: var(--dim); }
.console-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.console-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
.prompt { color: var(--accent); }
.console-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; caret-color: var(--accent); }
.console-input input::placeholder { color: var(--dim); }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; gap: 28px; padding: 16px 0; font: 500 15px var(--mono); color: var(--muted); animation: slide 40s linear infinite; white-space: nowrap; }
.marquee-track b { color: var(--accent); font-weight: 400; }
.marquee-track b:nth-of-type(even) { color: var(--pop); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.sec { padding-top: clamp(96px, 14vh, 160px); scroll-margin-top: 40px; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.sec-head h2 { font-size: clamp(44px, 6.5vw, 96px); font-weight: 600; line-height: .9; letter-spacing: -.045em; }
.sec-head .num { font: 500 14px var(--mono); color: var(--accent); vertical-align: top; letter-spacing: 0; margin-right: 6px; }
.sec-head p { color: var(--muted); max-width: 420px; justify-self: end; }

/* Project cards */
.projects { display: grid; gap: 28px; }
.project {
  --p: var(--accent);
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(22px, 3.2vw, 44px); border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--p) 9%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 60%, var(--bg)));
  transition: border-color .4s;
}
.project:hover { border-color: color-mix(in srgb, var(--p) 45%, var(--line-2)); }
.project:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.project:nth-child(even) .project-media { order: 2; }
.project-media { position: relative; }
.browser {
  display: block; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--console-bg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project:hover .browser { transform: translateY(-4px); box-shadow: 0 40px 70px -20px rgba(0,0,0,.85), 0 0 50px -20px var(--p); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.browser-bar .lights { display: flex; gap: 6px; }
.browser-bar .lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.browser-url { flex: 1; text-align: center; font: 13px var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; margin-right: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-shot { position: relative; display: block; }
.browser-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .7s var(--ease); }
.project:hover .browser-shot img { transform: scale(1.025); }
.browser-visit {
  position: absolute; right: 14px; bottom: 14px; padding: 7px 12px; border-radius: 999px;
  background: rgba(10, 13, 19, .85); border: 1px solid var(--line-2); font: 12px var(--mono); color: var(--text);
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease);
}
.browser:hover .browser-visit, .browser:focus-visible .browser-visit { opacity: 1; transform: none; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font: 13px var(--mono); color: var(--dim); }
.project-meta span + span::before { content: "·"; margin-right: 10px; color: var(--line-2); }
.project-index { color: var(--p); font-weight: 700; }
.project h3 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; letter-spacing: -.04em; line-height: 1; margin-top: 14px; }
.project-type { margin-top: 8px; color: var(--muted); font-size: 14px; }
.project-summary { margin-top: 18px; color: var(--muted); font-size: 16px; }
.project .srv { margin-top: 20px; }
.project-highlights { margin-top: 20px; display: grid; gap: 8px; }
.project-highlights li { position: relative; padding-left: 24px; font-size: 15px; color: var(--text); }
.project-highlights li::before { content: "✓"; position: absolute; left: 0; color: var(--p); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { font: 13px var(--mono); color: var(--muted); padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; }
.project-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn.small { padding: 10px 16px; font-size: 13px; }
.project-next {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin-top: 28px;
  padding: 22px clamp(22px, 3.2vw, 44px); border: 1px dashed var(--line-2); border-radius: 18px;
}
.project-next-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--accent); font: 300 26px/1 var(--sans); }
.project-next h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.project-next p { color: var(--muted); font-size: 14px; }
.is-jm .sticker { top: 52px; z-index: 2; }
.is-jm .feature-logo { width: 32%; right: -5%; bottom: -14%; z-index: 2; }

.sticker {
  position: absolute; right: -6px; top: 18px; transform: rotate(4deg);
  background: var(--accent-2); color: #1a1205; font: 700 13px var(--pixel); padding: 6px 12px; border-radius: 3px;
  box-shadow: 3px 3px 0 #000;
}
.srv { display: flex; gap: 14px; padding: 12px; background: rgba(0,0,0,.45); border: 2px solid #000; outline: 1px solid var(--line-2); font: 15px/1.35 var(--pixel); }
.srv-icon { flex: none; width: 64px; height: 64px; object-fit: contain; background: rgba(255,255,255,.04); }

/* JailMine logo floating in front of the screenshot */
.feature-logo {
  position: absolute; right: -5%; bottom: -16%; width: 44%; height: auto; pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(224, 40, 40, .45)) drop-shadow(0 24px 30px rgba(0,0,0,.7));
  animation: logo-float 7s ease-in-out infinite;
}
@keyframes logo-float { 50% { transform: translateY(-10px) rotate(1.5deg); } }

/* Scorpio mark in the project list + profile */
.i-mark { display: inline-block; width: .8em; height: .8em; object-fit: contain; vertical-align: -.06em; margin-right: .3em; }
.studio-badge { display: flex; align-items: center; gap: 12px; }
.studio-badge img { width: 40px; height: 40px; object-fit: contain; padding: 6px; background: linear-gradient(180deg, #0a0d13, #121c3d); border: 1px solid var(--line-2); border-radius: 8px; }
.studio-badge strong { display: block; font-size: 14px; }
.studio-badge span { font: 13px var(--mono); color: var(--dim); }

/* view counter pill in the hero */
.hero-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 22px; }
.hero-status .avail { margin-top: 0; }
.hero-status .views { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--pop) 8%, transparent); font: 13px/1 var(--mono); color: var(--muted); animation: views-in .5s var(--ease) both; }
.views[hidden] { display: none !important; }
.hero-status .views svg { width: 14px; height: 14px; color: var(--pop); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--pop) 60%, transparent)); }
.views b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes views-in { from { opacity: 0; transform: translateY(4px); } }
.gate-corner.bc { bottom: 28px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.gate-corner.bc i { color: var(--accent); font-style: normal; }
.gate-corner .eye { color: var(--pop); text-shadow: 0 0 10px var(--pop); }
.srv-main { flex: 1; min-width: 0; }
.srv-top { display: flex; justify-content: space-between; align-items: center; }
.srv-top strong { font-weight: 700; color: #fff; }
.srv-ping { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.srv-ping i { width: 3px; background: #4ade80; }
.srv-ping i:nth-child(1) { height: 4px; } .srv-ping i:nth-child(2) { height: 6px; } .srv-ping i:nth-child(3) { height: 8px; } .srv-ping i:nth-child(4) { height: 11px; } .srv-ping i:nth-child(5) { height: 14px; }
.srv-motd { color: #aaa; }
.c-red { color: #ff5555; } .c-gold { color: #ffaa00; } .c-dim { color: #777; }
.srv-ip { color: #555; font-size: 13px; }


/* Services */
.svc { counter-reset: s; }
.svc li {
  counter-increment: s; position: relative;
  display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 24px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.svc li::before { content: "0" counter(s); position: absolute; left: 0; top: 14px; font: 12px var(--mono); color: var(--dim); }
.svc h3 { font-size: clamp(40px, 5.6vw, 80px); font-weight: 600; letter-spacing: -.05em; line-height: .95; transition: color .2s, transform .3s var(--ease); }
.svc li:hover h3 { color: var(--accent); transform: translateX(12px); }
.svc p { color: var(--muted); }
.svc-tags { font: 13px var(--mono); color: var(--dim); justify-self: end; text-align: right; }

/* How it works */
.steps-head { margin-top: 72px; margin-bottom: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 26px 24px 8px 0; position: relative; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.step-n { font: 500 13px var(--mono); color: var(--accent); }
.steps h3 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.04em; margin: 10px 0 8px; }
.steps p { color: var(--muted); font-size: 15px; }
.steps li:nth-child(even) .step-n { color: var(--pop); }

/* Availability */
.avail { margin-top: 22px; font: 13px/1.9 var(--mono); color: var(--muted); }
.avail .dot { vertical-align: 1px; margin-right: 6px; }
.avail i { margin: 0 4px; font-style: normal; color: var(--dim); }
.contact .avail { margin-top: 18px; }
.avail b { color: var(--text); font-weight: 600; }
.avail-avatar { display: inline-block; vertical-align: middle; margin: -4px 8px 0 1px; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }

/* Testimonials (hidden until real quotes are added) */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.quotes[hidden] { display: none; }
.quote { border: 1px solid var(--line-2); border-radius: 10px; padding: 28px; background: var(--bg-2); }
.quote blockquote { font: italic 400 clamp(22px, 2.2vw, 28px)/1.25 var(--serif); color: var(--text); }
.quote figcaption { margin-top: 18px; font: 13px var(--mono); color: var(--muted); }
.quote strong { color: var(--accent-2); font-weight: 700; }

/* Stack terminal */
.term { background: var(--console-bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 24px; font: 14px/1.9 var(--mono); }
.term-line { color: var(--text); margin-bottom: 14px; }
.term-line .p { color: var(--accent); margin-right: 8px; }
.term-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 32px; }
.term-grid div { display: flex; flex-direction: column; }
.term-grid .dir { color: var(--accent-2); font-weight: 700; margin-bottom: 4px; }
.term-grid span:not(.dir) { color: var(--muted); padding-left: 16px; position: relative; }
.term-grid span:not(.dir)::before { content: "├"; position: absolute; left: 0; color: var(--line-2); }
.term-grid span:not(.dir):last-child::before { content: "└"; }
.term-grid span:not(.dir):hover { color: var(--text); }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.story p { color: var(--muted); font-size: 18px; max-width: 620px; }
.story p + p { margin-top: 18px; }
.story .big { color: var(--text); font-size: clamp(26px, 3vw, 40px); line-height: 1.15; letter-spacing: -.03em; font-weight: 500; margin-bottom: 30px; }
.story .big em { font: italic 400 1.1em var(--serif); color: var(--accent); }

.profile { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; transform: rotate(1.5deg); transition: transform .35s var(--ease); }
.profile:hover { transform: rotate(0); }
.profile-banner {
  height: 110px;
  background:
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(0,0,0,.18) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(0,0,0,.18) 11px 12px),
    linear-gradient(120deg, var(--accent-2) 0%, var(--accent) 30%, #1c45a8 62%, #0f2a57);
}
.profile-avatar {
  width: 84px; height: 84px; margin: -44px 0 0 20px; border-radius: 50%; border: 6px solid var(--bg-2);
  display: grid; place-items: center; background: var(--bg-3); font: 700 34px var(--pixel); color: var(--accent); overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-body { padding: 10px 20px 22px; }
.profile-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.badge { font: 700 11px var(--mono); text-transform: uppercase; background: var(--accent); color: #ffffff; padding: 2px 6px; border-radius: 3px; }
.profile-handle { font: 13px var(--mono); color: var(--dim); }
.profile-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.profile-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-block h4 { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 6px; }
.profile-block p { font-size: 14px; color: var(--muted); }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.roles span { font-size: 13px; padding: 3px 9px; border-radius: 4px; background: var(--bg-3); border: 1px solid var(--line-2); }
.roles span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--accent); }
.roles span:nth-child(2)::before { background: var(--accent-2); }
.roles span:nth-child(3)::before { background: #4ade80; }
.roles span:nth-child(4)::before { background: var(--pop); }

/* Contact */
.contact-title { font-size: clamp(56px, 11vw, 176px); font-weight: 700; line-height: .86; letter-spacing: -.055em; margin-top: var(--title-gap); }
.contact-title em { font: italic 400 1em var(--serif); color: var(--accent); letter-spacing: -.02em; }
.contact-sub { color: var(--muted); max-width: 480px; margin-top: 28px; font-size: 18px; }
.contact-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.mail { font-size: clamp(28px, 4.4vw, 60px); font-weight: 500; letter-spacing: -.035em; border-bottom: 2px solid var(--accent); line-height: 1.1; transition: color .2s; }
.mail span { color: var(--accent); }
.mail:hover { color: var(--accent); }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 30px; font: 13px var(--mono); }
.contact-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); transition: color .2s, border-color .2s, background-color .2s, transform .2s; }
.contact-links .ico { width: 16px; height: 16px; flex: none; fill: var(--b, currentColor); }
/* Brand colours. The black marks (GitHub, X, TikTok, Steam) and PayPal's navy use each brand's light variant so they show on the dark background. */
.contact-links a[href*="github"]   { --b: #e6edf3; }
.contact-links a[href*="discord"]  { --b: #5865f2; }
.contact-links a[href*="x.com"]    { --b: #e7e9ea; }
.contact-links a[href*="youtube"]  { --b: #ff3b3b; }
.contact-links a[href*="twitch"]   { --b: #a970ff; }
.contact-links a[href*="tiktok"]   { --b: #25f4ee; }
.contact-links a[href*="t.me"]     { --b: #26a5e4; }
.contact-links a[href*="steam"]    { --b: #66c0f4; }
.contact-links a[href*="paypal"]   { --b: #009cde; }
.contact-links a:hover { color: var(--b, var(--accent)); border-color: var(--b, var(--accent)); background: color-mix(in srgb, var(--b, var(--accent)) 8%, transparent); transform: translateY(-2px); }

/* Footer + giant wordmark */
.foot { border-top: 1px solid var(--line); overflow: hidden; }
.foot-row { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px; font: 13px var(--mono); color: var(--dim); }
.foot-row a:hover { color: var(--text); }
.giant { pointer-events: none;
  font: 700 27vw/0.78 var(--pixel); letter-spacing: -.04em; text-align: center; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px var(--line-2);
  margin-bottom: -4vw; user-select: none; transition: color .6s;
}
.foot:hover .giant { color: var(--bg-3); }

/* ---------- Custom cursor + trail (desktop, fine pointer only) ----------
   The ember dot IS the system cursor (an SVG cursor image), so the OS draws it with zero lag.
   The ring and trail are drawn by JS and follow it. */
.trail, .cursor-ring { display: none; }
html.has-cursor, html.has-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%232f6bff' fill-opacity='.2'/%3E%3Ccircle cx='8' cy='8' r='3.2' fill='%232f6bff'/%3E%3C/svg%3E") 8 8, auto !important;
}
html.has-cursor input:not([type="range"]), html.has-cursor textarea { cursor: text !important; }
html.has-cursor.cursor-label-on, html.has-cursor.cursor-label-on * { cursor: none !important; }
html.has-cursor .trail { display: block; position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 180; }
html.has-cursor .cursor-ring { display: grid; position: fixed; left: 0; top: 0; pointer-events: none; z-index: 200; will-change: transform; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1px solid rgba(47, 107, 255, .7);
  place-items: center;
  transition: width .18s var(--ease), height .18s var(--ease), margin .18s var(--ease), background .15s, border-color .15s, opacity .15s;
}
.cursor-label { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--bg); opacity: 0; transition: opacity .12s; white-space: nowrap; }
html.cursor-hover .cursor-ring { width: 54px; height: 54px; margin: -27px 0 0 -27px; border-color: var(--accent); background: rgba(47, 107, 255, .12); }
html.cursor-label-on .cursor-ring { width: 78px; height: 78px; margin: -39px 0 0 -39px; background: var(--accent); border-color: var(--accent); }
html.cursor-label-on .cursor-label { opacity: 1; }
html.cursor-text .cursor-ring, html.cursor-out .cursor-ring { opacity: 0; }
html.cursor-down .cursor-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

/* Reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .name .line > span { transform: none; transition: none; }
  .marquee-track { animation: none; }
  .dot, .gate-orbit, .gate-word, .feature-logo { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .about { grid-template-columns: 1fr; }
  .profile { max-width: 420px; }
  .project, .project:nth-child(even) { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-media { order: 0; }
  .is-jm .feature-logo { width: 22%; right: -2%; bottom: -8%; }
  .svc li { grid-template-columns: 1fr; gap: 10px; }
  .svc-tags { justify-self: start; text-align: left; }
  .term-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .quotes { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 20px 0 6px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .hud { display: none; }
  .gate-corner.tl { top: 20px; left: 20px; } .gate-corner.tr { top: 24px; right: 20px; }
  .gate-corner.bl { bottom: 20px; left: 20px; } .gate-corner.br { bottom: 20px; right: 20px; }
  .gate-eyebrow { white-space: nowrap; }
  .gate-eyebrow .eb2 { display: none; }
  .gate-eyebrow span { width: 24px; }
  .gate-word sup { right: -.3em; }
  .gate-corner.bc { bottom: 52px; }
  .is-jm .feature-logo { width: 28%; right: -2%; bottom: -8%; }
  .top { grid-template-columns: auto 1fr; }
  .links { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .project { border-radius: 14px; }
  .project-next { grid-template-columns: auto 1fr; }
  .project-next .btn { grid-column: 1 / -1; justify-self: start; }
  .browser-url { margin-right: 0; }
  .sec-head p { justify-self: start; }
  .console { font-size: 12px; }
  .console-body { height: 240px; padding: 12px; }
  .term-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .term { padding: 18px; font-size: 13px; }
  .profile { transform: none; }
}

/* ---------- Radio (now-playing card) ---------- */
.radio {
  position: fixed; left: 24px; bottom: 24px; z-index: 60;
  width: 300px; max-width: calc(100vw - 24px);
  padding: 14px;
  font-family: var(--mono); color: var(--text);
  background: rgba(16, 21, 29, .9); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,.75);
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .4s;
}
body.ready .radio { opacity: 1; transform: none; }
.radio.playing { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); }
.radio button {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.radio button:hover { color: var(--text); background: var(--bg-3); }
.radio button svg { width: 14px; height: 14px; }
.radio button:focus-visible, .radio input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* top row: eq · title · count · fold */
.radio-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.radio-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; }
.radio-eq i { width: 3px; border-radius: 1px; background: var(--dim); transition: background .3s; }
.radio-eq i:nth-child(1) { height: 6px; }
.radio-eq i:nth-child(2) { height: 11px; }
.radio-eq i:nth-child(3) { height: 4px; }
.radio-eq i:nth-child(4) { height: 8px; }
.radio.playing .radio-eq i { background: var(--accent); animation: eq .9s ease-in-out infinite; }
.radio.playing .radio-eq i:nth-child(2) { animation-delay: -.3s; background: var(--accent-2); }
.radio.playing .radio-eq i:nth-child(3) { animation-delay: -.6s; }
.radio.playing .radio-eq i:nth-child(4) { animation-delay: -.15s; background: var(--pop); }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.radio-name {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.radio-title { font-weight: 700; }
.radio-artist { color: var(--dim); }
.radio-artist:not(:empty)::before { content: " · "; }
.radio-count { flex: none; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.radio .radio-fold { width: 28px; height: 28px; margin: -7px -7px -7px -4px; }
.radio-fold svg { transition: transform .3s var(--ease); }
.radio.folded .radio-fold svg { transform: rotate(180deg); }

/* collapsible body (animates height via grid rows) */
.radio-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s var(--ease); }
.radio.folded .radio-body { grid-template-rows: 0fr; }
.radio-inner { min-height: 0; overflow: hidden; transition: opacity .25s, visibility .25s; }
.radio.folded .radio-inner { opacity: 0; visibility: hidden; }

/* sliders (seek + volume) */
.radio input[type="range"] {
  --fill: 0%; display: block; height: 16px; margin: 0; padding: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; background: transparent;
}
.radio input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--line-2) var(--fill));
}
.radio input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line-2); }
.radio input[type="range"]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--accent); }
.radio input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border: 0; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(16, 21, 29, .9); transition: transform .15s;
}
.radio input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; border: 0; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(16, 21, 29, .9); transition: transform .15s;
}
.radio input[type="range"]:hover::-webkit-slider-thumb, .radio input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }
.radio input[type="range"]:hover::-moz-range-thumb, .radio input[type="range"]:active::-moz-range-thumb { transform: scale(1.25); }
.radio input.radio-seek::-webkit-slider-thumb { border-radius: 2px; }
.radio input.radio-seek::-moz-range-thumb { border-radius: 2px; }

.radio-seek { width: 100%; margin-top: 10px !important; }
.radio-times { display: flex; justify-content: space-between; margin-top: 2px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* controls row */
.radio-ctrl { display: flex; align-items: center; gap: 2px; margin: 8px 0 0 -7px; }
.radio .radio-play { width: 34px; height: 34px; border: 1px solid var(--line-2); color: var(--text); margin: 0 2px; }
.radio .radio-play:hover { border-color: var(--accent); color: var(--accent); background: none; }
.radio.playing .radio-play { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.radio-play .ic-pause, .radio.playing .radio-play .ic-play { display: none; }
.radio.playing .radio-play .ic-pause { display: block; }
.radio-sep { width: 1px; height: 18px; margin: 0 6px; background: var(--line-2); flex: none; }
.radio-mute .ic-mute, .radio.muted .radio-mute .ic-vol { display: none; }
.radio.muted .radio-mute .ic-mute { display: block; }
.radio.muted .radio-mute { color: var(--accent); }
.radio-vol { flex: 1; min-width: 40px; margin-left: 4px !important; }
.radio-pct { flex: none; width: 4.5ch; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* empty (localhost only, before songs are added) */
.radio.empty .radio-ctrl, .radio.empty .radio-seek, .radio.empty .radio-times { opacity: .35; pointer-events: none; }

@media (max-width: 720px) {
  .radio { left: 12px; bottom: 12px; width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .radio.playing .radio-eq i { animation: none; }
  .radio-body, .radio-fold svg { transition: none; }
}

/* =====================================================================
   Multi-page: page titles, page transitions, mobile menu, case studies
   ===================================================================== */
.sec-head h1 { font-size: clamp(44px, 6.5vw, 96px); font-weight: 600; line-height: .9; letter-spacing: -.045em; }
.sec.page-top { padding-top: var(--page-top); }
.contact.page-top { min-height: calc(100vh - 220px); }

/* page swap: quick fade + lift (main.js adds .nav-leave while the next page loads) */
/* one breathing gap above the footer on every page, instead of each page's last section deciding */
main { padding-bottom: clamp(72px, 11vh, 128px); outline: none; transition: opacity .16s var(--ease), transform .16s var(--ease); }
body.nav-leave main { opacity: 0; transform: translateY(8px); transition-duration: .12s; }

.more-link { display: flex; justify-content: center; margin-top: 32px; }
.teaser { display: grid; justify-items: start; max-width: 900px; }
.teaser .big { margin-bottom: 30px; }
.story-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.contact-more { margin-top: 28px; font: 13px var(--mono); color: var(--muted); }
.contact-more .u { color: var(--text); }
.project h3 a { transition: color .2s; }
.project h3 a:hover { color: var(--p); }
.foot-nav { display: flex; gap: 18px; }

/* nav: clock + menu button on the right */
.top-end { justify-self: end; display: flex; align-items: center; gap: 14px; }
.menu-btn {
  display: none; align-items: center; gap: 9px; height: 34px; padding: 0 12px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 6px; font: 12px var(--mono); color: var(--text);
}
.menu-ic { position: relative; width: 14px; height: 9px; }
.menu-ic i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .2s var(--ease), top .2s var(--ease); }
.menu-ic i:first-child { top: 0; } .menu-ic i:last-child { top: 7.5px; }
.top.open .menu-ic i:first-child { top: 3.75px; transform: rotate(45deg); }
.top.open .menu-ic i:last-child { top: 3.75px; transform: rotate(-45deg); }

/* ---------- Case study (/work/<project>/) ---------- */
.case { --p: var(--accent); padding-top: var(--page-top); }
.case-back { display: flex; width: fit-content; gap: 8px; font: 13px var(--mono); color: var(--muted); transition: color .15s; }
.case-back:hover { color: var(--text); }
.case-head {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: end;
  margin-top: 28px; padding-bottom: 36px; border-bottom: 1px solid var(--line);
}
.case-head .kicker i { color: var(--p); }
.case-title { margin-top: var(--title-gap); font-size: clamp(56px, 10vw, 150px); font-weight: 700; line-height: .86; letter-spacing: -.055em; font-variation-settings: "opsz" 96; }
.case-lead { margin-top: 24px; max-width: 640px; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; }
.case-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin: 0; font-size: 15px; }
.case-facts dt { margin-bottom: 4px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.case-facts dd { margin: 0; }
.case-facts a { color: var(--text); border-bottom: 1px solid var(--p); transition: color .15s; }
.case-facts a:hover { color: var(--p); }
.case-shot { margin-top: 44px; }
.case-shot .browser-shot img { aspect-ratio: auto; }
.case-shot:hover { transform: translateY(-3px); box-shadow: 0 40px 70px -20px rgba(0,0,0,.85), 0 0 60px -24px var(--p); }
.case-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(48px, 8vh, 80px); }
.case-body h2 { margin-bottom: 16px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--p); }
.case-body p { color: var(--muted); }
.case-body .srv { margin-top: 20px; }
.case-body .project-highlights, .case-body .tags { margin-top: 0; }
.case-body .project-links { margin-top: 22px; }
.case-next { margin-top: clamp(80px, 12vh, 140px); border-top: 1px solid var(--line); }
.case-next a { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 20px; padding: 34px 0 10px; }
.case-next strong { font-size: clamp(40px, 7vw, 104px); font-weight: 600; line-height: .9; letter-spacing: -.045em; transition: color .2s; }
.case-next-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: clamp(36px, 5vw, 72px); color: var(--accent); transition: transform .3s var(--ease); }
.case-next a:hover strong { color: var(--accent); }
.case-next a:hover .case-next-arrow { transform: translateX(10px); }

@media (max-width: 1000px) {
  .case-head { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .top .links {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; gap: 2px;
    padding: 10px var(--pad) 16px; background: var(--bg); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .top.open .links { display: flex; }
  .top .links a { padding: 12px 10px; font-size: 15px; }
  .live span:nth-child(2) { display: none; }
  .foot-nav { order: 3; width: 100%; }
}

/* =====================================================================
   Contact: project brief form
   ===================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: 44px; }
.contact-side .contact-row { margin-top: 14px; }
.contact-side .mail { font-size: clamp(28px, 3.2vw, 46px); }
.brief { display: grid; gap: 24px; padding: clamp(20px, 3vw, 34px); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.brief-title { font: 13px var(--mono); color: var(--muted); }
.brief-title i { font-style: normal; color: var(--accent); margin: 0 4px; }
.brief fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.brief legend, .field > span { display: block; margin-bottom: 10px; font: 13px var(--mono); color: var(--dim); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; cursor: pointer; }
.opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opts span {
  display: inline-block; padding: 8px 13px; font: 13px var(--mono); color: var(--muted); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 4px; transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.opts label:hover span { color: var(--text); border-color: var(--accent-2); }
.opts input:checked + span { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 3px 3px 0 var(--text); }
.opts input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.brief-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: 16px/1.5 var(--display); color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 4px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.brief-send { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.brief .btn { border: 0; cursor: pointer; }
.brief-status { font: 13px var(--mono); color: var(--muted); }
.brief-status.ok { color: #4ade80; }

/* =====================================================================
   Blog: list (/blog) and posts (/blog/<slug>)
   ===================================================================== */
.post-list { border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px 32px; align-items: start; padding: 30px 0; transition: background .2s; }
.post-date { display: grid; gap: 4px; font: 13px var(--mono); color: var(--muted); padding-top: 8px; }
.post-date span { color: var(--dim); }
.post-main { display: grid; gap: 10px; }
.post-main strong { font-size: clamp(26px, 3vw, 40px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; transition: color .2s; }
.post-desc { max-width: 640px; color: var(--muted); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags span { padding: 3px 9px; font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; }
.post-arrow { padding-top: 4px; font-size: 32px; color: var(--accent); transition: transform .3s var(--ease); }
.post-row:hover strong { color: var(--accent-2); }
.post-row:hover .post-arrow { transform: translateX(8px); }
.post-empty { padding: 40px 0; font: 14px var(--mono); color: var(--muted); }

.post-head { max-width: 860px; margin-top: 28px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.post-head:first-child { margin-top: 0; }
.post-title { margin-top: var(--title-gap); font-size: clamp(44px, 7vw, 104px); font-weight: 700; line-height: .9; letter-spacing: -.05em; font-variation-settings: "opsz" 96; }
.post-lead { margin-top: 22px; max-width: 680px; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; }
.post-by { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; font: 13px var(--mono); color: var(--muted); }
.post-by img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-by i { font-style: normal; color: var(--accent); margin: 0 4px; }
.post-by .post-tags { margin-left: auto; }

.prose { max-width: 700px; margin-top: 44px; font-size: 18px; line-height: 1.75; color: #d5dde7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; color: var(--text); }
.prose h3 { margin-top: 1.7em; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.prose a { color: var(--text); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color .15s; }
.prose a:hover { color: var(--accent-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.4em; }
.prose ul li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.prose ol { list-style: decimal; }
.prose ol li::marker { font: 14px var(--mono); color: var(--accent); }
.prose li + li { margin-top: .4em; }
.prose code { padding: 2px 6px; font: .82em var(--mono); color: var(--accent-2); background: var(--bg-3); border-radius: 4px; }
.prose pre { overflow-x: auto; padding: 18px 20px; background: var(--console-bg); border: 1px solid var(--line); border-radius: 8px; }
.prose pre code { padding: 0; background: none; color: var(--text); font-size: 14px; line-height: 1.6; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); color: var(--text); font: italic 400 1.25em/1.45 var(--serif); }
.prose img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.post-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 28px; max-width: 700px; margin-top: 56px; padding: 26px 28px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.post-cta p { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

@media (max-width: 1000px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .brief-row { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .post-date { display: flex; gap: 13px; padding-top: 0; }
  .post-arrow { display: none; }
  .post-by .post-tags { margin-left: 0; width: 100%; }
  .prose { font-size: 17px; }
}

/* spam trap: hidden from people, bots fill it in */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* About: the studio badge links to scorpio.ltd */
a.studio-badge { margin: -6px; padding: 6px; border-radius: 8px; transition: background .2s; }
a.studio-badge:hover { background: var(--bg-3); }
a.studio-badge:hover strong { color: var(--accent-2); }
.brief-note { font: 13px var(--mono); color: var(--dim); }
.brief-note a { color: var(--muted); border-bottom: 1px solid var(--line-2); }
.brief-note a:hover { color: var(--text); }
/* entry screen skipped (not the home page, or already entered): hidden before first paint, no flash */
.no-gate .gate { display: none; }

/* desktop link in the nav */
.links a.nav-os { color: var(--pop); }
.links a.nav-os:hover { color: var(--text); }
