/* ════════════════════════════════════════════════════════════════
   BUILTBYBOWAS — "PLAYER ONE" HUD THEME  (v3)
   Display: Bricolage Grotesque + Instrument Serif · Body: Inter · HUD: JetBrains Mono
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg: #07080d;
  --bg-2: #0c0e16;
  --panel: #10131d;
  --panel-2: #161a27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #eef1f8;
  --text-dim: #a3a9bd;
  --text-mute: #6b7189;

  --acc: #c3ff2e;        /* acid lime — primary */
  --acc-rgb: 195, 255, 46;
  --acc2: #8b6cff;       /* violet — secondary */
  --acc2-rgb: 139, 108, 255;
  --hot: #ff3d71;        /* hot pink — alerts/boss */
  --gold: #ffc93d;       /* legendary */

  --f-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', Consolas, monospace;

  --radius: 4px;
  --cut: 14px;
  --max: 1200px;
  --nav-h: 68px;
}

[data-theme="light"] {
  --bg: #f3f4f8;
  --bg-2: #e9ebf2;
  --panel: #ffffff;
  --panel-2: #f4f5fa;
  --line: rgba(10, 12, 25, 0.09);
  --line-strong: rgba(10, 12, 25, 0.18);
  --text: #0d0f19;
  --text-dim: #444a60;
  --text-mute: #7a8098;
  --acc: #5a8f00;
  --acc-rgb: 90, 143, 0;
  --acc2: #5b3df5;
  --acc2-rgb: 91, 61, 245;
  --hot: #e0144c;
  --gold: #b37a00;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--acc); color: #07080d; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--acc); }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* ════════════ CUSTOM CURSOR ════════════ */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10000;
  opacity: 0; transition: opacity .2s;
}
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { opacity: 1; }
.cursor-dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc), 0 0 2px #fff;
}
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  transition: width .18s ease, height .18s ease, margin .18s ease, opacity .2s;
}
.cursor-ring i {
  position: absolute; width: 10px; height: 10px;
  border: 2px solid var(--acc);
  transition: border-color .18s, transform .18s;
}
.cursor-ring i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.cursor-ring i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.cursor-ring i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.cursor-ring i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.cursor-ring .cr-label {
  position: absolute; left: 100%; top: 100%; margin: 4px 0 0 4px;
  font: 600 10px/1 var(--f-mono); letter-spacing: .12em;
  color: var(--acc); white-space: nowrap; opacity: 0; transition: opacity .15s;
}
.cursor-ring.spin { animation: ringSpin 6s linear infinite; }
.cursor-ring.lock { width: 54px; height: 54px; margin: -27px 0 0 -27px; animation: none; }
.cursor-ring.lock i { border-color: var(--acc2); }
.cursor-ring.lock .cr-label { opacity: 1; color: var(--acc2); }
.cursor-ring.click { transform: scale(.75); }
.cursor-dot.lock { background: var(--acc2); box-shadow: 0 0 12px var(--acc2); }
@keyframes ringSpin { to { rotate: 360deg; } }

/* ════════════ LOADER ════════════ */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-inner { width: min(420px, 82vw); text-align: center; }
.loader-mark {
  font: 700 clamp(28px, 6vw, 44px)/1 var(--f-display);
  letter-spacing: .04em; text-transform: uppercase;
}
.loader-mark span { color: var(--acc); }
.loader-bar {
  margin: 26px 0 12px; height: 10px; padding: 2px;
  border: 1px solid var(--line-strong);
}
.loader-bar span {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--acc) 0 10px, transparent 10px 13px);
  transition: width .2s linear;
}
.loader-row { display: flex; justify-content: space-between; font: 500 12px var(--f-mono); color: var(--text-dim); letter-spacing: .1em; }
.loader-skip { margin-top: 30px; font: 600 13px var(--f-mono); color: var(--acc); letter-spacing: .3em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ════════════ BACKGROUND ════════════ */
#bgCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  opacity: .35; mix-blend-mode: multiply;
}
[data-theme="light"] .scanlines { opacity: .08; }
main, footer, nav { position: relative; z-index: 2; }

/* ════════════ NAV (HUD bar) ════════════ */
#siteNav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font: 700 22px/1 var(--f-display); letter-spacing: .06em;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .logo-box {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--acc); color: #07080d; font-size: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.nav-logo .dot { color: var(--acc); animation: blink 1.1s steps(2) infinite; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px;
  font: 600 14px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); position: relative; transition: color .2s;
}
.nav-links a::before {
  content: '▸'; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  color: var(--acc); opacity: 0; transition: opacity .2s, left .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; left: 2px; }
.nav-links a.active { color: var(--acc); }
.nav-cta {
  font: 700 14px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 20px; background: var(--acc); color: #07080d;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: filter .2s, transform .2s;
}
.nav-cta:hover { filter: brightness(1.12); transform: translateY(-1px); }
.theme-toggle, .nav-toggle, .sound-toggle {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--text-dim); transition: color .2s, border-color .2s;
}
.theme-toggle:hover, .nav-toggle:hover, .sound-toggle:hover { color: var(--acc); border-color: var(--acc); }
.theme-toggle .fa-sun { display: none; }
[data-theme="light"] .theme-toggle .fa-sun { display: block; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }
.nav-toggle { display: none; }

#xpBar {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--acc2), var(--acc));
  transform-origin: left; transform: scaleX(0);
  box-shadow: 0 0 12px var(--acc);
}

/* ════════════ LAYOUT ════════════ */
section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section-inner { width: min(var(--max), 100% - 2 * clamp(18px, 4vw, 40px)); margin: 0 auto; }
.sec-head { margin-bottom: clamp(36px, 5vw, 56px); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 600 13px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--acc);
}
.eyebrow .lvl { padding: 4px 8px; background: rgba(var(--acc-rgb), .12); border: 1px solid rgba(var(--acc-rgb), .35); }
.sec-title {
  margin: 0; font: 700 clamp(36px, 5.6vw, 64px)/1.02 var(--f-display);
  letter-spacing: -.01em; text-transform: uppercase;
}
.sec-title em { font-style: normal; color: var(--acc); }
.sec-title .outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.sec-sub { max-width: 520px; margin: 0; color: var(--text-dim); font-size: 17px; }

/* ════════════ BUTTONS ════════════ */
.btn {
  --c: var(--acc);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  font: 700 15px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform .2s, filter .2s, background .2s, color .2s;
  position: relative;
}
.btn-primary { background: var(--c); color: #07080d; }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-secondary:hover { color: var(--acc); box-shadow: inset 0 0 0 1.5px var(--acc); transform: translateY(-2px); }
.btn .key {
  font: 600 11px/1 var(--f-mono); padding: 3px 6px; border: 1px solid currentColor; opacity: .7;
}

/* ════════════ HERO ════════════ */
#home { min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--nav-h) + 40px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.status-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; margin-bottom: 26px;
  font: 600 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid rgba(var(--acc-rgb), .35); background: rgba(var(--acc-rgb), .07); color: var(--acc);
}
.ping { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(var(--acc-rgb), .7); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(var(--acc-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--acc-rgb), 0); } }
.hero-kicker { font: 600 15px/1 var(--f-mono); color: var(--text-mute); letter-spacing: .2em; margin: 0 0 10px; }
#matrixName {
  margin: 0; font: 700 clamp(48px, 9vw, 116px)/.92 var(--f-display);
  letter-spacing: -.02em; text-transform: uppercase; position: relative;
}
#matrixName .hl { color: var(--acc); text-shadow: 0 0 40px rgba(var(--acc-rgb), .35); }
.hero-role {
  margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px;
  font: 600 15px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase;
}
.hero-role span {
  padding: 9px 14px; border: 1px solid var(--line-strong); background: var(--panel);
}
.hero-role span:nth-child(1) { border-color: rgba(var(--acc-rgb), .5); color: var(--acc); }
.hero-role span:nth-child(2) { border-color: rgba(var(--acc2-rgb), .5); color: var(--acc2); }
.hero-sub { margin: 24px 0 0; max-width: 560px; font-size: 18px; color: var(--text-dim); }
.hero-sub b { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Player card */
.player-card {
  position: relative; padding: 26px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}
.player-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 0%, rgba(var(--acc2-rgb), .22), transparent 55%),
              radial-gradient(circle at 0% 100%, rgba(var(--acc-rgb), .14), transparent 50%);
}
.pc-top { position: relative; display: flex; justify-content: space-between; align-items: center; font: 600 12px var(--f-mono); letter-spacing: .14em; color: var(--text-mute); }
.pc-top b { color: var(--acc); }
.pc-avatar {
  position: relative; margin: 20px 0; display: flex; align-items: center; gap: 18px;
}
.pc-avatar .av {
  width: 84px; height: 84px; flex: none; display: grid; place-items: center;
  font: 700 34px var(--f-display); color: #07080d; background: var(--acc);
  clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%);
}
.pc-avatar h3 { margin: 0; font: 700 24px/1.1 var(--f-display); text-transform: uppercase; }
.pc-avatar p { margin: 4px 0 0; font: 500 13px var(--f-mono); color: var(--text-dim); }
.pc-stats { position: relative; display: grid; gap: 14px; }
.pc-stat .row { display: flex; justify-content: space-between; font: 600 12px var(--f-mono); letter-spacing: .12em; color: var(--text-dim); margin-bottom: 6px; }
.pc-stat .row b { color: var(--text); }
.bar { height: 8px; background: rgba(255,255,255,.06); position: relative; overflow: hidden; }
[data-theme="light"] .bar { background: rgba(0,0,0,.07); }
.bar span {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: repeating-linear-gradient(90deg, var(--c, var(--acc)) 0 12px, transparent 12px 14px);
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
}
.pc-meta { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); }
.pc-meta div { background: var(--panel); padding: 14px 10px; text-align: center; }
.pc-meta b { display: block; font: 700 26px/1 var(--f-display); color: var(--text); }
.pc-meta span { font: 500 11px var(--f-mono); letter-spacing: .12em; color: var(--text-mute); text-transform: uppercase; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  font: 600 11px var(--f-mono); letter-spacing: .3em; color: var(--text-mute);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint::after { content: ''; width: 1px; height: 40px; background: linear-gradient(var(--acc), transparent); animation: drop 1.8s infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ════════════ TICKER ════════════ */
.ticker {
  position: relative; z-index: 2; overflow: hidden;
  border-block: 1px solid var(--line); background: var(--acc); color: #07080d;
  transform: rotate(-1.2deg); margin: 0 -20px;
}
.ticker-track { display: flex; gap: 40px; width: max-content; padding: 14px 0; animation: tick 40s linear infinite; }
.ticker-track span { font: 700 18px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; display: flex; align-items: center; gap: 40px; }
.ticker-track span::after { content: '✦'; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ════════════ PROJECTS ════════════ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  padding: 10px 16px; border: 1px solid var(--line-strong); background: var(--panel);
  font: 600 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
  transition: all .2s;
}
.filter-btn .n { margin-left: 6px; font-family: var(--f-mono); opacity: .6; }
.filter-btn:hover { color: var(--text); border-color: var(--text-dim); }
.filter-btn.active { background: var(--acc); border-color: var(--acc); color: #07080d; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.proj-card {
  --rc: var(--acc);
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
  text-align: left; padding: 0; width: 100%;
}
.proj-card[data-rarity="legendary"] { --rc: var(--gold); }
.proj-card[data-rarity="epic"] { --rc: var(--acc2); }
.proj-card:hover { transform: translateY(-6px); border-color: var(--rc); box-shadow: 0 18px 50px -20px var(--rc); }
.proj-card.hidden { display: none; }
.proj-card::after {
  content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--rc); transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.proj-card:hover::after { transform: scaleX(1); }
.proj-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.proj-media img, .proj-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease, opacity .4s;
}
.proj-media video { opacity: 0; }
.proj-card.playing .proj-media video { opacity: 1; }
.proj-card:hover .proj-media img { transform: scale(1.06); }
.proj-media .gen-cover, .sp-proj-media .gen-cover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    linear-gradient(rgba(var(--acc2-rgb), .1) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(var(--acc2-rgb), .1) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(circle at 30% 30%, rgba(var(--acc2-rgb), .35), transparent 60%),
    var(--bg-2);
}
.gen-cover i { font-size: 54px; color: var(--acc); filter: drop-shadow(0 0 20px rgba(var(--acc-rgb), .5)); }
.gen-cover span { position: absolute; bottom: 14px; left: 16px; font: 700 18px var(--f-display); text-transform: uppercase; letter-spacing: .08em; }
.proj-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--panel) 0%, transparent 45%); pointer-events: none; }
.rarity {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 6px 10px; font: 700 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  background: var(--rc); color: #07080d;
}
.media-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 6px 10px; font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  background: rgba(7, 8, 13, .75); color: #fff; backdrop-filter: blur(6px);
  display: inline-flex; gap: 6px; align-items: center;
}
.proj-body { padding: 4px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.proj-index { font: 600 12px var(--f-mono); letter-spacing: .16em; color: var(--rc); }
.proj-title { margin: 6px 0 10px; font: 700 23px/1.15 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.proj-desc { margin: 0 0 18px; color: var(--text-dim); font-size: 15.5px; line-height: 1.6; flex: 1; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; font: 500 12.5px/1 var(--f-mono);
  border: 1px solid var(--line-strong); color: var(--text-dim); background: var(--bg-2);
}
.pill-logo { width: 14px; height: 14px; }
.proj-open {
  margin-top: 18px; display: flex; justify-content: space-between; align-items: center;
  font: 700 13px var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--text);
  border-top: 1px dashed var(--line-strong); padding-top: 14px;
}
.proj-open i { color: var(--rc); transition: transform .2s; }
.proj-card:hover .proj-open i { transform: translateX(4px); }

.proj-card-cta {
  display: grid; place-items: center; text-align: center; min-height: 360px;
  border: 1.5px dashed var(--line-strong); background: transparent;
}
.proj-card-cta:hover { border-color: var(--acc); }
.proj-cta-inner i { font-size: 36px; color: var(--acc); }
.proj-cta-inner p { margin: 16px 0 8px; font: 700 22px var(--f-display); text-transform: uppercase; }
.proj-cta-inner span { font: 600 14px var(--f-mono); color: var(--acc); letter-spacing: .1em; }

/* ════════════ MODAL ════════════ */
.modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 9, .82); backdrop-filter: blur(6px); }
.modal-box {
  position: relative; width: min(980px, 100%); max-height: 90vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-strong);
  transform: translateY(20px) scale(.98); transition: transform .3s;
}
.modal.open .modal-box { transform: none; }
.modal-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 3;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line-strong); font-size: 18px;
}
.modal-close:hover { color: var(--hot); border-color: var(--hot); }
.modal-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.modal-stage img, .modal-stage video { width: 100%; height: 100%; object-fit: contain; }
.modal-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--bg-2); }
.modal-thumbs button { flex: none; width: 92px; height: 58px; border: 2px solid transparent; opacity: .6; padding: 0; overflow: hidden; }
.modal-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumbs button.active, .modal-thumbs button:hover { border-color: var(--acc); opacity: 1; }
.modal-thumbs .vid-thumb { display: grid; place-items: center; background: var(--panel-2); color: var(--acc); font-size: 20px; }
.modal-body { padding: 28px clamp(20px, 4vw, 40px) 36px; }
.modal-body h3 { margin: 6px 0 14px; font: 700 clamp(26px, 4vw, 38px)/1.1 var(--f-display); text-transform: uppercase; }
.modal-body p { color: var(--text-dim); margin: 0 0 20px; font-size: 17px; }
.modal-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ════════════ ATTRIBUTES (skill bars) ════════════ */
.attr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 26px; }
.attr-panel { background: var(--panel); border: 1px solid var(--line); padding: 26px; }
.attr-panel h3 { margin: 0 0 20px; display: flex; align-items: center; gap: 12px; font: 700 18px var(--f-display); text-transform: uppercase; letter-spacing: .08em; }
.attr-panel h3 i { width: 36px; height: 36px; display: grid; place-items: center; background: rgba(var(--c-rgb, var(--acc-rgb)), .14); color: var(--c, var(--acc)); font-size: 15px; }
.attr { margin-bottom: 14px; }
.attr:last-child { margin-bottom: 0; }
.attr .row { display: flex; justify-content: space-between; font: 500 14px var(--f-mono); margin-bottom: 6px; }
.attr .row em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--acc)); }

/* Inventory */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill-block {
  position: relative; overflow: hidden; min-height: 210px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: border-color .3s, transform .3s;
}
.skill-block:hover { border-color: var(--acc); transform: translateY(-4px); }
.skill-bg-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; transition: opacity .4s, transform .6s; filter: saturate(.6); }
.skill-block:hover .skill-bg-image { opacity: .38; transform: scale(1.06); }
.skill-block::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--panel) 30%, transparent); }
.slot-no { position: absolute; top: 12px; right: 14px; z-index: 1; font: 600 11px var(--f-mono); color: var(--text-mute); letter-spacing: .14em; }
.skill-content { position: relative; padding: 20px; }
.skill-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 700 17px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .04em; }
.skill-head i { color: var(--acc); }
.skill-block .pill { font-size: 11.5px; padding: 5px 8px; background: color-mix(in srgb, var(--bg-2) 80%, transparent); }

/* ════════════ TIMELINE ════════════ */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--acc), var(--acc2), transparent); }
.tl-row { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 28px; padding: 26px 28px; background: var(--panel); border: 1px solid var(--line); }
.tl-row::before {
  content: ''; position: absolute; left: -31px; top: 32px; width: 14px; height: 14px;
  background: var(--bg); border: 2px solid var(--acc); rotate: 45deg;
}
.tl-row.done::before { background: var(--acc); }
.tl-year { font: 700 15px var(--f-mono); color: var(--acc); letter-spacing: .06em; }
.tl-state { display: block; margin-top: 6px; font: 600 11px var(--f-mono); letter-spacing: .16em; color: var(--text-mute); }
.tl-role { margin: 0 0 8px; font: 700 22px/1.25 var(--f-display); text-transform: uppercase; }
.tl-badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 4px 8px; font: 600 11px var(--f-mono); letter-spacing: .1em; color: var(--acc2); border: 1px solid rgba(var(--acc2-rgb), .45); text-transform: uppercase; }
.tl-desc { margin: 0 0 14px; color: var(--text-dim); }

/* ════════════ ACHIEVEMENTS ════════════ */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.cert-card { position: relative; display: flex; gap: 18px; align-items: center; padding: 22px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .3s; }
.cert-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.cert-icon { width: 58px; height: 58px; flex: none; display: grid; place-items: center; font-size: 22px; color: #07080d; background: var(--gold); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.cert-unlocked { font: 600 11px var(--f-mono); letter-spacing: .16em; color: var(--gold); text-transform: uppercase; }
.cert-title { margin: 4px 0 2px; font: 700 17px/1.25 var(--f-display); text-transform: uppercase; }
.cert-sub { font-size: 14px; color: var(--text-dim); }

/* ════════════ ARCADE ════════════ */
.arcade-cabinet { border: 1px solid var(--line-strong); background: var(--panel); }
.arcade-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-strong); }
.arcade-tab {
  padding: 18px 12px; text-align: center;
  font: 700 15px/1.2 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
  border-right: 1px solid var(--line); transition: background .2s, color .2s;
}
.arcade-tab:last-child { border-right: 0; }
.arcade-tab .tab-hint { display: block; margin-top: 4px; font: 500 11px var(--f-mono); letter-spacing: .1em; opacity: .7; text-transform: none; }
.arcade-tab:hover { color: var(--text); background: var(--panel-2); }
.arcade-tab.active { background: var(--acc); color: #07080d; }
.arcade-stage { padding: clamp(16px, 3vw, 30px); }
.game-panel { display: none; }
.game-panel.active { display: block; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.game-hud { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; font: 600 14px var(--f-mono); letter-spacing: .12em; color: var(--text-dim); }
.game-hud b { color: var(--acc); font-size: 18px; margin-left: 6px; }
.game-btn {
  margin-left: auto; padding: 11px 22px; background: var(--acc); color: #07080d;
  font: 700 14px/1 var(--f-display); letter-spacing: .16em;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.game-btn:hover { filter: brightness(1.1); }
.arcade-canvas { width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 4 / 3; height: auto; background: #06070c; border: 1px solid var(--line-strong); touch-action: manipulation; }
.game-hint { margin: 14px 0 0; text-align: center; font: 500 13px var(--f-mono); color: var(--text-mute); }


.reflex-field {
  position: relative; height: 380px; overflow: hidden;
  background:
    linear-gradient(rgba(var(--acc-rgb), .06) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, rgba(var(--acc-rgb), .06) 1px, transparent 1px) 0 0 / 30px 30px,
    #06070c;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
}
.reflex-idle { margin: 0; padding: 20px; text-align: center; font: 600 14px var(--f-mono); color: #a3a9bd; }
.reflex-target {
  position: absolute; width: 46px; height: 46px;
  border: 2px solid var(--hot); border-radius: 50%;
  background: radial-gradient(circle, var(--hot) 0 6px, transparent 7px), rgba(255, 61, 113, .12);
  box-shadow: 0 0 20px rgba(255, 61, 113, .6);
  animation: pop .18s ease-out;
}
.reflex-target::before, .reflex-target::after { content: ''; position: absolute; background: var(--hot); }
.reflex-target::before { left: 50%; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; }
.reflex-target::after { top: 50%; left: -8px; right: -8px; height: 2px; margin-top: -1px; }
@keyframes pop { from { transform: scale(0); } }

/* ════════════ CONTACT ════════════ */
.contact-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.boss-panel {
  position: relative; padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(150deg, rgba(var(--acc2-rgb), .16), transparent 60%), var(--panel);
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
}
.boss-hp { margin-bottom: 26px; }
.boss-hp .row { display: flex; justify-content: space-between; font: 700 12px var(--f-mono); letter-spacing: .16em; color: var(--hot); margin-bottom: 8px; }
.boss-hp .bar span { --c: var(--hot); }
.cta-title { margin: 0; font: 700 clamp(36px, 5.4vw, 60px)/1.02 var(--f-display); text-transform: uppercase; }
.cta-title em { font-style: normal; color: var(--acc); }
.cta-sub { margin: 18px 0 30px; color: var(--text-dim); font-size: 18px; max-width: 480px; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta-actions .btn { text-transform: none; letter-spacing: .02em; font-size: 16px; }
.social-list-v { display: grid; gap: 12px; }
.social-card-v {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--panel); border: 1px solid var(--line); transition: border-color .25s, transform .25s;
}
.social-card-v:hover { border-color: var(--acc); transform: translateX(6px); }
.social-card-v::after { content: '\f061'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-left: auto; color: var(--text-mute); transition: color .2s, transform .2s; }
.social-card-v:hover::after { color: var(--acc); transform: rotate(-45deg); }
.soc-icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; font-size: 22px; background: var(--bg-2); border: 1px solid var(--line-strong); }
.gh .soc-icon { color: var(--text); } .li .soc-icon { color: #3b9cff; } .ig .soc-icon { color: #ff5fa2; }
.soc-info { display: flex; flex-direction: column; }
.soc-platform { font: 700 17px var(--f-display); text-transform: uppercase; letter-spacing: .06em; }
.soc-handle { font: 500 13px var(--f-mono); color: var(--text-dim); }
.soc-badge { position: absolute; top: 8px; right: 44px; font: 600 10px var(--f-mono); letter-spacing: .14em; color: var(--acc2); }

/* ════════════ FOOTER ════════════ */
footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 26px clamp(18px, 4vw, 40px);
  border-top: 1px solid var(--line);
  font: 500 13px var(--f-mono); letter-spacing: .1em; color: var(--text-mute); text-transform: uppercase;
}
footer b { color: var(--acc); font-weight: 600; }

/* ════════════ TOAST (achievement popup) ════════════ */
.achv-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 600;
  display: flex; align-items: center; gap: 14px; padding: 14px 20px 14px 14px;
  background: var(--panel); border: 1px solid var(--gold);
  box-shadow: 0 10px 40px -10px rgba(255, 201, 61, .5);
  translate: -50% 140%; transition: translate .45s cubic-bezier(.2,.9,.3,1.3);
}
.achv-toast.show { translate: -50% 0; }
.achv-toast .ic { width: 42px; height: 42px; display: grid; place-items: center; background: var(--gold); color: #07080d; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.achv-toast small { display: block; font: 600 10px var(--f-mono); letter-spacing: .18em; color: var(--gold); }
.achv-toast b { font: 700 15px var(--f-display); text-transform: uppercase; letter-spacing: .04em; }

/* ════════════ REVEAL ════════════ */
.fade-up { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.fade-up.visible { opacity: 1; transform: none; }

/* ════════════ RESPONSIVE ════════════ */
/* never allow sideways page scroll (tilted ticker, glows, cut corners) */
html, body { overflow-x: clip; max-width: 100%; }
main { overflow-x: clip; }
img, video, canvas { max-width: 100%; }

/* hero name scales with its own column, not the whole screen */
.hero-copy { container-type: inline-size; min-width: 0; }
#matrixName { font-size: clamp(34px, 7vw, 116px); }
@supports (font-size: 1cqi) { #matrixName { font-size: min(12.6cqi, 116px); } }
#matrixName { overflow-wrap: anywhere; }

.project-grid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.cert-grid { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.game-hud { flex-wrap: wrap; row-gap: 10px; }
.boss-hp .row { flex-wrap: wrap; gap: 6px; }
.achv-toast { max-width: calc(100vw - 28px); }
.achv-toast b { display: block; white-space: normal; }

/* large tablets / small laptops: nav collapses earlier so it never overflows */
@media (max-width: 1100px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0;
    flex-direction: column; padding: 10px clamp(16px, 4vw, 40px) 22px; gap: 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    display: none; max-height: calc(100svh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.open { display: flex; animation: fadeIn .2s; }
  .nav-links a { padding: 15px 18px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-logo { margin-right: auto; }
  #siteNav { gap: 12px; }
}
@media (max-width: 1080px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .attr-grid { grid-template-columns: repeat(2, 1fr); }
  .attr-grid .attr-panel:last-child { grid-column: 1 / -1; }
}

/* tablets (portrait) */
@media (max-width: 960px) {
  .hero-grid, .contact-split { grid-template-columns: 1fr; }
  #home { min-height: auto; padding-bottom: 60px; }
  .player-card { max-width: 560px; width: 100%; }
  .scroll-hint { display: none; }
  .sec-head { align-items: flex-start; }
  .tl-row { grid-template-columns: 150px 1fr; gap: 20px; }
  .ticker { transform: rotate(-1deg); margin: 0 -10px; }
  .ticker-track span { font-size: 15px; }
}

/* large phones / small tablets */
@media (max-width: 760px) {
  .attr-grid { grid-template-columns: 1fr; }
  .attr-grid .attr-panel:last-child { grid-column: auto; }
  .arcade-tab { font-size: 13px; padding: 14px 6px; }
  .modal { padding: 0; align-items: end; }
  .modal-box { max-height: 92svh; width: 100%; }
}

/* phones */
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  body { font-size: 16px; }
  section { padding: 72px 0; }
  #siteNav { gap: 8px; padding: 0 14px; }
  .nav-logo { font-size: 19px; gap: 8px; }
  .logo-mark { width: 28px; height: 28px; }
  .nav-cta { padding: 10px 12px; font-size: 11.5px; letter-spacing: .1em; }
  .theme-toggle, .nav-toggle { width: 38px; height: 38px; }

  .status-chip { font-size: 10.5px; letter-spacing: .12em; }
  .hero-kicker { font-size: 12px; letter-spacing: .14em; }
  .hero-role span { font-size: 12.5px; padding: 8px 11px; }
  .hero-sub { font-size: 16.5px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .player-card { padding: 20px; }
  .pc-avatar .av { width: 64px; height: 64px; font-size: 26px; }
  .pc-meta b { font-size: 21px; }

  .sec-title { font-size: clamp(32px, 10vw, 44px); }
  .filter-bar { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-btn { flex: none; }
  .project-grid { grid-template-columns: 1fr; gap: 16px; }
  .proj-body { padding: 4px 18px 18px; }
  .proj-title { font-size: 21px; }

  .skills-grid { grid-template-columns: 1fr; }
  .skill-block { min-height: 170px; }
  .attr-panel { padding: 20px; }
  .timeline { padding-left: 26px; }
  .timeline::before { left: 6px; }
  .tl-row { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .tl-row::before { left: -26px; }
  .tl-role { font-size: 19px; }
  .tl-badge { margin: 6px 0 0; }
  .cert-card { padding: 18px; }

  .arcade-tab { font-size: 11.5px; letter-spacing: .06em; padding: 13px 4px; }
  .arcade-tab .tab-hint { display: none; }
  .arcade-stage { padding: 14px; }
  .game-hud { gap: 8px 14px; font-size: 11.5px; }
  .game-hud b { font-size: 15px; }
  .game-btn { padding: 10px 16px; font-size: 12.5px; }
  .reflex-field { height: 300px; }

  .boss-panel { padding: 24px 20px; }
  .cta-actions { align-items: stretch; }
  .cta-actions .btn { justify-content: center; font-size: 14.5px; padding: 15px 16px; overflow-wrap: anywhere; }
  .social-card-v { padding: 14px 16px; }
  .soc-badge { top: 6px; right: 40px; font-size: 9px; }

  footer { flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 11.5px; }
  .modal-body { padding: 22px 18px 28px; }
  .modal-links .btn { flex: 1 1 100%; justify-content: center; }
}

/* very small phones (≤350px, e.g. older Android) */
@media (max-width: 350px) {
  .nav-cta { display: none; }
  .hero-role span { font-size: 11.5px; }
  .pc-meta span { font-size: 9.5px; }
  .q-types span { font-size: 11.5px; padding: 9px 10px; }
}

/* landscape phones: don't force a full-height hero */
@media (max-height: 500px) and (orientation: landscape) {
  #home { min-height: auto; padding-top: calc(var(--nav-h) + 24px); }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}

/* ════════════ LOGO ════════════ */
.logo-mark { width: 32px; height: 32px; display: block; transition: transform .3s; }
.nav-logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.loader-logo { width: 72px; height: 72px; margin: 0 auto 18px; animation: logoPulse 1.2s ease-in-out infinite; }
@keyframes logoPulse { 50% { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(var(--acc-rgb), .6)); } }

/* ════════════ SERVICES ════════════ */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc {
  --sc: var(--acc);
  position: relative; display: flex; flex-direction: column; padding: 26px;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
}
.svc::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--sc); transform: scaleX(.18); transform-origin: left; transition: transform .4s; }
.svc:hover { transform: translateY(-6px); border-color: var(--sc); box-shadow: 0 18px 50px -24px var(--sc); }
.svc:hover::before { transform: scaleX(1); }
.svc-ic { width: 52px; height: 52px; display: grid; place-items: center; font-size: 22px; color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); margin-bottom: 18px; }
.svc h3 { margin: 0 0 10px; font: 700 21px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.svc p { margin: 0 0 16px; color: var(--text-dim); font-size: 15.5px; line-height: 1.6; }
.svc ul { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.svc ul li { padding: 5px 9px; font: 500 12px var(--f-mono); color: var(--text-dim); border: 1px solid var(--line-strong); background: var(--bg-2); }
.svc-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font: 700 14px var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--sc); }
.svc-cta i { transition: transform .2s; }
.svc-cta:hover i { transform: translateX(5px); }
.svc-steps { background: linear-gradient(160deg, rgba(var(--acc-rgb), .1), transparent 60%), var(--panel); border-color: rgba(var(--acc-rgb), .3); }
.svc-steps ol { margin: 4px 0 22px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.svc-steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; color: var(--text-dim); font-size: 15px; }
.svc-steps li::before { content: '0' counter(s); font: 700 14px var(--f-mono); color: var(--acc); }
.svc-steps li b { color: var(--text); }
.svc-steps .btn { margin-top: auto; align-self: flex-start; }

/* ════════════ FAQ ════════════ */
.faq-list { display: grid; gap: 12px; max-width: 900px; }
.faq { background: var(--panel); border: 1px solid var(--line); transition: border-color .25s; }
.faq[open] { border-color: rgba(var(--acc-rgb), .45); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 22px; font: 700 18px/1.35 var(--f-display); letter-spacing: .01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 30px; height: 30px; display: grid; place-items: center; font: 700 20px/1 var(--f-mono); color: var(--acc); border: 1px solid var(--line-strong); transition: transform .25s; }
.faq[open] summary::after { content: '−'; transform: rotate(180deg); }
.faq summary:hover { color: var(--acc); }
.faq p { margin: 0; padding: 0 22px 22px; color: var(--text-dim); font-size: 16px; line-height: 1.7; }
.faq p a { color: var(--acc); border-bottom: 1px dashed currentColor; }

@media (max-width: 1200px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0;
    flex-direction: column; padding: 10px clamp(16px, 4vw, 40px) 22px; gap: 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    display: none; max-height: calc(100svh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.open { display: flex; animation: fadeIn .2s; }
  .nav-links a { padding: 15px 18px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-logo { margin-right: auto; }
}
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; gap: 14px; }
  .svc { padding: 22px; }
  .faq summary { padding: 17px 16px; font-size: 16px; }
  .faq p { padding: 0 16px 18px; font-size: 15px; }
}

/* ════════════ SERVICE LANDING PAGES ════════════ */
body.sp {
  background:
    radial-gradient(60% 40% at 85% 0%, rgba(var(--acc2-rgb), .14), transparent 70%),
    radial-gradient(50% 35% at 0% 20%, rgba(var(--acc-rgb), .08), transparent 70%),
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1.5px) 0 0 / 34px 34px,
    var(--bg);
  background-attachment: fixed;
}
[data-theme="light"] body.sp { background-color: var(--bg); }
.sp-hero { padding: calc(var(--nav-h) + clamp(50px, 8vw, 100px)) 0 clamp(50px, 7vw, 90px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font: 500 13px var(--f-mono); color: var(--text-mute); }
.crumbs a:hover { color: var(--acc); }
.crumbs b { color: var(--text-dim); font-weight: 500; }
.sp-h1 { margin: 6px 0 0; font: 700 clamp(38px, 7vw, 84px)/1 var(--f-display); text-transform: uppercase; letter-spacing: -.01em; max-width: 14ch; }
.sp-h1 em { font-style: normal; color: var(--acc); }
.sp-lead { margin: 24px 0 0; max-width: 640px; font-size: clamp(17px, 2vw, 19px); color: var(--text-dim); }
.sp-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-top: 38px; border: 1px solid var(--line); background: var(--line); gap: 1px; }
.sp-facts div { background: var(--panel); padding: 16px 14px; }
.sp-facts b { display: block; font: 700 clamp(17px, 2.4vw, 22px)/1.1 var(--f-display); color: var(--acc); }
.sp-facts span { font: 500 12px var(--f-mono); color: var(--text-mute); letter-spacing: .08em; text-transform: uppercase; }
.sp-sec { padding: clamp(56px, 8vw, 100px) 0; }
.sp-sec .sec-title { margin-bottom: clamp(26px, 4vw, 40px); }
.sp-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.sp-uses { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-uses li { display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); font-weight: 500; }
.sp-uses i { color: var(--acc); }
.sp-stack { padding: 26px; background: var(--panel); border: 1px solid var(--line-strong); }
.sp-stack h3 { margin: 0 0 14px; font: 700 15px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.sp-stack .pill-row { margin-bottom: 26px; }
.sp-stack ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.sp-stack li { counter-increment: s; display: flex; gap: 12px; color: var(--text-dim); }
.sp-stack li::before { content: '0' counter(s); font: 700 14px var(--f-mono); color: var(--acc); }
.sp-stack li b { color: var(--text); }
.sp-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.sp-proj { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.sp-proj:hover { transform: translateY(-5px); border-color: var(--acc); }
.sp-proj-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.sp-proj-media img { width: 100%; height: 100%; object-fit: cover; }
.sp-proj-body { padding: 18px 20px 22px; }
.sp-proj-body h3 { margin: 0 0 8px; font: 700 20px/1.2 var(--f-display); text-transform: uppercase; }
.sp-proj-body p { margin: 0 0 14px; color: var(--text-dim); font-size: 15px; }
.sp-others { margin-top: 50px; }
.sp-others-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.sp-other { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); font: 700 15px var(--f-display); text-transform: uppercase; letter-spacing: .04em; transition: border-color .2s, color .2s; }
.sp-other i:first-child { color: var(--acc); width: 20px; }
.sp-other i:last-child { margin-left: auto; color: var(--text-mute); transition: transform .2s; }
.sp-other:hover { border-color: var(--acc); color: var(--acc); }
.sp-other:hover i:last-child { transform: translateX(4px); color: var(--acc); }
footer a:hover { color: var(--acc); }
.svc-more { margin-top: 10px; font: 600 13px var(--f-mono); color: var(--text-mute); letter-spacing: .06em; }
.svc-more:hover { color: var(--text); }
.svc-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding: 0 clamp(18px, 4vw, 40px) 24px; font: 500 12.5px var(--f-mono); color: var(--text-mute); position: relative; z-index: 2; }
.svc-links a:hover { color: var(--acc); }
@media (max-width: 860px) {
  .sp-split { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .sp-uses { grid-template-columns: 1fr; }
  .sp-facts span { font-size: 10.5px; }
  .sp-facts div { padding: 13px 10px; }
}

/* ════════════ ALL-SERVICES STRIP + ABOUT ════════════ */
.svc-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
.svc-all-label { font: 700 13px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); margin-right: 6px; }
.svc-all a { padding: 9px 13px; font: 600 13px var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); background: var(--panel); border: 1px solid var(--line-strong); transition: all .2s; }
.svc-all a:hover { color: #07080d; background: var(--acc); border-color: var(--acc); }
.sp-prose p { margin: 0 0 18px; color: var(--text-dim); font-size: 17px; line-height: 1.75; }
.sp-prose b { color: var(--text); }
.sp-prose .sec-title { margin-bottom: 22px; }
.pc-avatar .av img { width: 52px; height: 52px; }

/* ════════════ BLOG ════════════ */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; }
.blog-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--panel); border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.blog-card:hover { transform: translateY(-5px); border-color: var(--acc); }
.blog-tag { align-self: flex-start; padding: 5px 9px; font: 600 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); border: 1px solid rgba(var(--acc-rgb), .4); }
.blog-card h2 { margin: 4px 0 0; font: 700 21px/1.25 var(--f-display); }
.blog-card p { margin: 0; color: var(--text-dim); font-size: 15px; flex: 1; }
.blog-more { margin-top: 6px; font: 600 13px var(--f-mono); color: var(--acc); }
.post { padding: calc(var(--nav-h) + clamp(40px, 6vw, 80px)) 0 clamp(50px, 7vw, 90px); }
.post-inner { max-width: 780px; }
.post-h1 { margin: 6px 0 14px; font: 700 clamp(30px, 5vw, 50px)/1.12 var(--f-display); }
.post-meta { margin: 0 0 24px; font: 500 13px var(--f-mono); color: var(--text-mute); }
.post-meta a { color: var(--acc); }
.post-intro { font-size: clamp(17px, 2vw, 19px); line-height: 1.75; color: var(--text); margin: 0 0 26px; }
.post-toc { padding: 18px 22px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--acc); margin-bottom: 30px; }
.post-toc b { font: 700 13px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
.post-toc ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.post-toc a { color: var(--text-dim); }
.post-toc a:hover { color: var(--acc); }
.post-body h2 { margin: 40px 0 14px; font: 700 clamp(22px, 3vw, 28px)/1.25 var(--f-display); scroll-margin-top: calc(var(--nav-h) + 16px); }
.post-body p { margin: 0 0 16px; font-size: 17px; line-height: 1.8; color: var(--text-dim); }
.post-body b { color: var(--text); }
.post-body code { font-family: var(--f-mono); font-size: 14px; padding: 2px 6px; background: var(--panel-2); }
.post-cta { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; margin: 46px 0 10px; padding: 28px; background: linear-gradient(150deg, rgba(var(--acc-rgb), .12), transparent 60%), var(--panel); border: 1px solid rgba(var(--acc-rgb), .35); }
.post-cta h2 { margin: 0 0 6px; font: 700 24px/1.2 var(--f-display); text-transform: uppercase; }
.post-cta p { margin: 0; color: var(--text-dim); }
.post-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) {
  .post-cta { padding: 22px; }
  .post-cta-btns .btn { flex: 1 1 100%; justify-content: center; }
  .post-body p { font-size: 16px; }
}

/* ════════════ HERO UPGRADE (2026-11-12) ════════════ */
/* Trust strip under the CTAs */
.hero-trust {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font: 600 12.5px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
}
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust i { color: var(--acc); }
.hero-trust a { color: var(--text-mute); border-bottom: 1px dashed currentColor; display: inline-flex; gap: 8px; align-items: center; }
.hero-trust a:hover { color: var(--acc2); }
.hero-trust a i { color: inherit; }

/* Shine sweep on the primary CTA */
.btn-shine { overflow: hidden; box-shadow: 0 0 0 0 rgba(var(--acc-rgb), .0); }
.btn-shine::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite 2.4s;
  pointer-events: none;
}
@keyframes shine { 0% { left: -60%; } 35%, 100% { left: 130%; } }
.btn-shine:hover { filter: brightness(1.12) drop-shadow(0 0 14px rgba(var(--acc-rgb), .55)); }

/* Animated neon on the "BY" + RGB-split glitch on hover */
#matrixName .hl {
  background: linear-gradient(90deg, var(--acc), var(--acc2), var(--acc));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: hlFlow 4s linear infinite;
}
@keyframes hlFlow { to { background-position: 200% 0; } }
.glitch-hover:hover { animation: rgbSplit .45s steps(2) 2; }
@keyframes rgbSplit {
  0%   { text-shadow: 3px 0 rgba(var(--acc2-rgb), .8), -3px 0 rgba(var(--acc-rgb), .8); }
  50%  { text-shadow: -4px 1px rgba(var(--acc2-rgb), .8), 4px -1px rgba(var(--acc-rgb), .8); }
  100% { text-shadow: none; }
}

/* 3D tilt + glare on the character sheet */
.player-card.visible {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: opacity .7s ease, transform .5s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.player-card.tilting { transition: transform .08s linear; }
.player-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.14), transparent 45%);
}
.player-card.tilting::after { opacity: 1; }

@media (max-width: 560px) {
  .hero-trust { gap: 8px 16px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-shine::after, #matrixName .hl { animation: none; }
}

/* ════════════════════════════════════════════════════════════════
   PREMIUM LAYER (2026-11-13)
   Softer geometry, editorial type, glass surfaces, device mockups.
   Appended last so it overrides the v3 HUD base without rewriting it.
   ════════════════════════════════════════════════════════════════ */
:root { --r-lg: 22px; --r-md: 14px; --r-sm: 10px; --glass: color-mix(in srgb, var(--panel) 72%, transparent); }

/* Film grain for depth */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  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");
}
.scanlines { opacity: .35; }

/* ── Type ─────────────────────────────────────────── */
#matrixName { font-weight: 800; letter-spacing: -.045em; }
@supports (font-size: 1cqi) { #matrixName { font-size: min(11.6cqi, 112px); } }
.sec-title, .cta-title {
  font-weight: 800; text-transform: none; letter-spacing: -.035em; line-height: .98;
}
.sec-title em, .cta-title em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  padding-right: .06em;
  background: linear-gradient(100deg, var(--acc) 10%, var(--acc2) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.proj-title, .svc h3, .cert-title { text-transform: none; letter-spacing: -.02em; font-weight: 700; }
.proj-title { font-size: 24px; }
.hero-role { font-family: var(--f-mono); font-weight: 600; font-size: 13px; }
.hero-role span { border-radius: 999px; padding: 9px 16px; }
.nav-links a { font-family: var(--f-body); letter-spacing: .02em; text-transform: none; font-size: 14.5px; font-weight: 500; }
.nav-links a::before { display: none; }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }

/* ── Buttons & chips: pills ───────────────────────── */
.btn, .nav-cta, .game-btn { clip-path: none; border-radius: 999px; }
.btn { letter-spacing: .08em; font-weight: 700; }
.btn-primary { box-shadow: 0 10px 30px -10px rgba(var(--acc-rgb), .7), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-secondary { backdrop-filter: blur(8px); background: rgba(255,255,255,.03); }
.nav-cta { letter-spacing: .06em; box-shadow: 0 8px 24px -10px rgba(var(--acc-rgb), .8); }
.theme-toggle, .nav-toggle, .sound-toggle { border-radius: 12px; }
.status-chip, .eyebrow .lvl, .filter-btn, .pill, .svc ul li, .rarity, .media-badge { border-radius: 999px; }
.filter-btn { font-family: var(--f-body); text-transform: none; letter-spacing: .01em; font-weight: 600; font-size: 14px; }

/* ── Glass panels ─────────────────────────────────── */
#siteNav { background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); }
.player-card, .boss-panel {
  clip-path: none; border-radius: var(--r-lg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--panel-2) 85%, transparent), var(--glass));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.pc-avatar .av { clip-path: none; border-radius: 18px; }
.pc-meta { border-radius: var(--r-md); overflow: hidden; }
.bar, .bar span { border-radius: 99px; }
.svc, .tl-row, .cert-card, .arcade-cabinet, .proj-card-cta {
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(170deg, rgba(255,255,255,.035), transparent 40%), var(--panel);
}
.svc-ic { border-radius: 14px; }
.arcade-canvas { border-radius: var(--r-md); }

/* ── Project cards with device mockups ─────────────── */
.project-grid { gap: 26px; }
.proj-card {
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(170deg, rgba(255,255,255,.04), transparent 35%), var(--panel);
}
.proj-card::after { display: none; }
.proj-card:hover { box-shadow: 0 30px 70px -30px var(--rc), 0 0 0 1px var(--rc); border-color: transparent; }
.proj-stage {
  position: relative; padding: 22px 22px 0; margin-bottom: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 22px 22px;
}
.mock-browser {
  position: relative; border-radius: 12px 12px 0 0; overflow: hidden;
  background: #0b0d14; border: 1px solid rgba(255,255,255,.1); border-bottom: 0;
  box-shadow: 0 -10px 40px -20px rgba(0,0,0,.6), 0 20px 50px -20px rgba(0,0,0,.8);
  transform: translateY(6px); transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.proj-card:hover .mock-browser { transform: translateY(0); }
.mock-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #151823; border-bottom: 1px solid rgba(255,255,255,.07); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; flex: none; }
.mock-bar i:nth-child(2) { background: #febc2e; } .mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar span {
  flex: 1; margin: 0 6px 0 10px; height: 17px; border-radius: 6px; background: rgba(255,255,255,.06);
  font: 500 10.5px/17px var(--f-mono); color: #8d93a8; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mock-browser .proj-media { aspect-ratio: 16 / 10; }
.mock-browser .proj-media img, .mock-browser .proj-media video { object-position: top center; }
.proj-media::after { display: none; }
.mock-phone {
  position: absolute; right: 14px; bottom: -14px; z-index: 3; width: 23%; aspect-ratio: 9 / 19.2;
  border-radius: 20px; padding: 4px; background: #0a0b10;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 50px -12px rgba(0,0,0,.85), inset 0 0 0 1px rgba(0,0,0,.6);
  transform: rotate(4deg) translateY(4px); transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.mock-phone::before { content: ''; position: absolute; top: 9px; left: 50%; width: 30%; height: 6px; translate: -50% 0; border-radius: 6px; background: #000; z-index: 1; }
.mock-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 16px; display: block; }
.proj-card:hover .mock-phone { transform: rotate(0deg) translateY(-6px); }
.proj-stage .rarity { top: 62px; left: 32px; }
.proj-stage .media-badge { top: 62px; right: 32px; }
.proj-body { padding: 0 24px 24px; }
.proj-open { border-top-style: solid; border-top-color: var(--line); }

/* Rounded modal (keeps its own overflow:auto for scrolling) */
.modal-box { border-radius: var(--r-lg); }

[data-theme="light"] .mock-browser { background: #fff; border-color: rgba(0,0,0,.1); }
[data-theme="light"] .mock-bar { background: #eef0f5; border-color: rgba(0,0,0,.06); }
[data-theme="light"] .mock-bar span { background: rgba(0,0,0,.06); color: #6b7189; }

@media (max-width: 560px) {
  .proj-stage { padding: 16px 16px 0; }
  .mock-phone { width: 25%; right: 10px; }
}
