/* =========================================
   YOUR NAME — Portfolio (lean + interactive)
   ========================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-void: #07080c;
  --bg-deep: #0d0f15;
  --bg-panel: #12151d;
  --bg-elevated: #1a1e29;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f0f1f3;
  --text-secondary: #a1a5b0;
  --text-muted: #6b7080;
  --accent: #d94818;
  --accent-glow: #ff6a35;
  --gold: #c89668;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.65, 0.05, 0.36, 1);
}

html { background: var(--bg-void); scroll-behavior: smooth; font-size: 75%; }

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none; /* hide default — using custom */
}

/* Hide custom cursor on touch devices */
@media (hover: none) { body { cursor: auto; } .cursor, .cursor-dot { display: none; } }

/* On desktop: kill the system cursor on EVERY element (including links,
   which would otherwise show the browser's pointer hand). The custom
   .cursor + .cursor-dot are still visible because they're position:fixed
   overlays — only the OS arrow/hand is suppressed. */
@media (hover: hover) {
  *, *::before, *::after { cursor: none !important; }
}

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: none; color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; }
.container { max-width: 1500px; margin: 0 auto; padding: 0 3rem; }
section { position: relative; }

/* ============== CUSTOM CURSOR ============== */
/* Old circle cursor is HIDDEN — replaced by the 3D spaceship canvas below.
   The orange dot is kept as a precision aim point at the actual mouse position. */
.cursor { display: none; }

.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;                  /* was 4 — bigger center */
  background: #ffae5a;                       /* was --accent, now slightly brighter */
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  /* Two-layer shadow: outer orange glow for dark bgs +
     a faint dark ring for visibility on light bgs */
  box-shadow:
    0 0 14px 2px rgba(255, 138, 77, 0.9),
    0 0 0 1px rgba(20, 10, 5, 0.4);
}

/* The spaceship cursor — a tiny three.js renderer that follows the mouse */
#cursor-ship {
  position: fixed;
  top: 0; left: 0;
  width: 90px;
  height: 90px;
  pointer-events: none;
  z-index: 10000;
  transition:
    width  0.4s var(--ease-out),
    height 0.4s var(--ease-out),
    filter 0.4s var(--ease-out);
  /* Stronger warm glow at rest so the ship is visible on bright backgrounds too */
  filter: drop-shadow(0 0 12px rgba(255, 106, 53, 0.85));
  will-change: transform, width, height;
}

/* Hover variants — ship grows and glow intensifies */
body.cursor-link    #cursor-ship { width: 130px; height: 130px;
  filter: drop-shadow(0 0 14px rgba(255, 106, 53, 0.8)); }
body.cursor-button  #cursor-ship { width: 120px; height: 120px;
  filter: drop-shadow(0 0 14px rgba(255, 106, 53, 0.8)); }
body.cursor-card    #cursor-ship { width: 170px; height: 170px;
  filter: drop-shadow(0 0 18px rgba(255, 106, 53, 0.9)); }
body.cursor-explore #cursor-ship { width: 220px; height: 220px;
  filter: drop-shadow(0 0 24px rgba(255, 106, 53, 1)); }

@media (hover: none) { #cursor-ship { display: none; } }

/* ============== NAV ============== */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.6) 0%, transparent 100%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; font-size: 1.65rem; letter-spacing: 0.15em;
}

.brand-mark {
  width: 24px; height: 24px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
  position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.nav-email, .nav-back {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.13rem;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  transition: all 0.3s var(--ease-out);
}
.nav-email:hover, .nav-back:hover {
  color: var(--accent); border-color: var(--accent);
  background: rgba(217, 72, 24, 0.08);
}
.nav-back svg { width: 14px; height: 14px; }

.menu-toggle {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  transition: all 0.4s var(--ease-out);
  background: rgba(7, 8, 12, 0.4);
}
.menu-toggle:hover { border-color: var(--accent); background: rgba(217, 72, 24, 0.1); }
.menu-label { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.2em; }
.menu-lines { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-lines span { display: block; height: 1.5px; background: var(--text-primary); transition: all 0.4s var(--ease-out); }
.menu-lines span:first-child { width: 100%; }
.menu-lines span:last-child { width: 70%; align-self: flex-end; }
.menu-toggle:hover .menu-lines span:last-child { width: 100%; }

body.menu-open .menu-lines span:first-child { transform: translateY(3px) rotate(45deg); }
body.menu-open .menu-lines span:last-child { width: 100%; transform: translateY(-3px) rotate(-45deg); }

.menu-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 90vw);
  background: var(--bg-deep);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.8s var(--ease-smooth);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
}
body.menu-open .menu-drawer { transform: translateX(0); }

.menu-drawer-inner { padding: 6rem 3rem 3rem; flex: 1; display: flex; flex-direction: column; }
.menu-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.1rem; text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 3rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.menu-list { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.menu-list a {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 0.8rem 0;
  font-family: 'Cormorant Garamond', serif;
  position: relative; overflow: hidden;
}
.menu-num { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); transition: color 0.4s var(--ease-out); min-width: 30px; }
.menu-text {
  font-size: 2.5rem; font-weight: 400; letter-spacing: -0.01em;
  position: relative; display: inline-block;
  transition: transform 0.5s var(--ease-out), color 0.4s var(--ease-out);
}
.menu-list a:hover .menu-text { color: var(--accent); transform: translateX(15px); font-style: italic; }
.menu-list a:hover .menu-num { color: var(--accent); }

.menu-footer { display: flex; gap: 1.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.menu-footer a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-secondary);
  transition: color 0.3s var(--ease-out);
}
.menu-footer a:hover { color: var(--accent); }

.menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 8, 12, 0.7);
  z-index: 150;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
  backdrop-filter: blur(4px);
}
body.menu-open .menu-backdrop { opacity: 1; pointer-events: all; }

/* ============== 3D SHIP CANVAS (hero) ============== */
#ship-canvas-wrap {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(217, 72, 24, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(78, 130, 200, 0.08) 0%, transparent 55%),
    var(--bg-void);
}
#ship-canvas { width: 100%; height: 100%; display: block; }
#ship-loader, .asset-loader {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; gap: 0.6rem; z-index: 2;
  transition: opacity 0.6s var(--ease-out);
}
#ship-loader.hidden, .asset-loader.hidden { opacity: 0; pointer-events: none; }
.loader-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* ============== HERO ============== */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 2;
  padding: 8rem 0 3rem;
}
.hero-content { position: relative; z-index: 2; width: 100%; }

.hero-meta {
  display: flex; align-items: center; gap: 1rem;
  color: var(--accent);
  margin-bottom: 3rem;
  opacity: 0; animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}
.meta-line { width: 50px; height: 1px; background: var(--accent); }

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(8rem, 28vw, 28rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 30px rgba(7, 8, 12, 0.8);
  margin-bottom: 5rem;
}
.hero-title .line { display: block; opacity: 0; transform: translateY(60px); animation: lineUp 1.2s var(--ease-smooth) forwards; }
.hero-title .line:nth-child(1) { animation-delay: 0.5s; }
.hero-title .line:nth-child(2) { animation-delay: 0.7s; }
.hero-title em { font-style: italic; color: var(--accent); font-weight: 500; }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-secondary);
  opacity: 0; animation: fadeUp 1s var(--ease-out) 1.3s forwards;
  transition: color 0.3s var(--ease-out);
}
.scroll-cue:hover { color: var(--accent); }
.scroll-cue svg { width: 16px; height: 16px; animation: bob 2.4s ease-in-out infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lineUp { to { opacity: 1; transform: translateY(0); } }

/* ============== SECTIONS ============== */
.section-meta {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 4rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.section-num { font-family: 'JetBrains Mono', monospace; font-size: 1.2rem; color: var(--accent); letter-spacing: 0.15em; }
.section-label { font-family: 'JetBrains Mono', monospace; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--text-muted); }

.work, .lab, .contact, .footer {
  position: relative; z-index: 3;
  /* Very subtle dark wash — universe dominates, just enough tint to keep
     content visually anchored. Soft blur so text edges stay crisp. */
  background: rgba(7, 8, 12, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.lab     { background: rgba(15, 18, 26, 0.32); }
.contact { background: rgba(7, 8, 12, 0.24); }
.footer  { background: rgba(7, 8, 12, 0.62); }

/* Section meta needs a soft glow so it pops against the moving universe */
.section-num,
.section-label,
.game-title,
.lab-title,
.contact-mega {
  text-shadow: 0 2px 18px rgba(7, 8, 12, 0.75);
}

/* ============== WORK ============== */
.work { padding: 10rem 0; }

.games-grid {
  display: grid;
  /* Single column — each card stacks beneath the previous one */
  grid-template-columns: 1fr;
  gap: 4rem;
  /* Centered, with breathing room so videos feel like a focal column
     rather than full-width banners */
  max-width: 1100px;
  margin: 0 auto;
  counter-reset: trans;
}

/* ====================================================
   GAME CARD — sci-fi transmission frame
   - Glassmorphic dark panel, floats with orange glow
   - Corner brackets (injected via JS) extend outside
   - Transmission header bar at top with a live counter
   - Scan-line overlay over video for CRT feel
   ==================================================== */
/* ====================================================
   GAME CARD — CYBERPUNK NEON FRAME
   - Deep-glass panel, blue/magenta neon glow stack
   - SVG corner brackets (animated, glow on hover)
   - HUD overlays: ID column, SYNC hex, data grid
   - 4 traveling energy lines around perimeter
   - Vertical scan beam descending through frame
   - Palette scoped to .game-card via custom props
   ==================================================== */
.game-card {
  /* Scoped neon palette — warm orange family, matches the debris/ship glow.
     Variable names are kept historic (cyan/magenta/purple) but the values
     are now orange variants for brand cohesion. */
  --c-cyan:    #ff6a35;  /* DOMINANT — bright orange, matches flying debris */
  --c-magenta: #d94818;  /* SECONDARY — deep orange (site --accent) */
  --c-purple:  #ffb066;  /* TERTIARY — soft amber highlight */
  --c-blue:    #ff8a4d;
  --c-glass:   rgba(12, 6, 4, 0.55);

  position: relative;
  grid-column: 1;
  min-height: 640px;
  display: flex; flex-direction: column;
  padding: 22px;
  /* Deep glass panel */
  background:
    linear-gradient(140deg, rgba(6, 10, 22, 0.72) 0%, rgba(2, 4, 12, 0.82) 100%);
  border: 1px solid rgba(255, 106, 53, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: visible;
  /* Multi-layer neon glow */
  box-shadow:
    inset 0 0 0 1px rgba(255, 106, 53, 0.05),
    inset 0 0 60px rgba(255, 106, 53, 0.03),
    0 18px 60px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(255, 106, 53, 0.10),
    0 0 140px rgba(217, 72, 24, 0.06);
  transition:
    border-color 0.4s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}
.game-card.featured { grid-column: 1; min-height: 640px; padding: 22px; }
.game-card:hover {
  border-color: rgba(255, 106, 53, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(255, 106, 53, 0.18),
    inset 0 0 80px rgba(255, 106, 53, 0.06),
    0 22px 80px rgba(0, 0, 0, 0.85),
    0 0 160px rgba(255, 106, 53, 0.28),
    0 0 220px rgba(217, 72, 24, 0.16);
}
/* Kill the old transmission chips — replaced by the HUD overlay */
.game-card::before, .game-card::after { content: none; }

/* ============== HUD OVERLAY ============== */
.card-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.93rem;
  letter-spacing: 0.18em;
  color: var(--c-cyan);
}

/* SVG corner brackets — TL is canonical, others mirrored via scale */
.card-bracket {
  position: absolute;
  width: 44px; height: 44px;
  color: var(--c-cyan);
  filter: drop-shadow(0 0 6px var(--c-cyan));
  transition: filter 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.card-bracket-tl { top: -10px; left: -10px; }
.card-bracket-tr { top: -10px; right: -10px; transform: scaleX(-1); }
.card-bracket-bl { bottom: -10px; left: -10px; transform: scaleY(-1); }
.card-bracket-br { bottom: -10px; right: -10px; transform: scale(-1, -1); }
.game-card:hover .card-bracket {
  filter: drop-shadow(0 0 14px var(--c-cyan)) brightness(1.35);
}
.game-card:hover .card-bracket-tl { transform: scale(1.12); transform-origin: top left; }
.game-card:hover .card-bracket-tr { transform: scaleX(-1) scale(1.12); transform-origin: top right; }
.game-card:hover .card-bracket-bl { transform: scaleY(-1) scale(1.12); transform-origin: bottom left; }
.game-card:hover .card-bracket-br { transform: scale(-1, -1) scale(1.12); transform-origin: bottom right; }

/* Top-left HUD: ID column with progress bar */
.card-hud-tl {
  position: absolute;
  top: 14px; left: 58px;
  display: flex; flex-direction: column; gap: 5px;
  min-width: 110px;
}
.card-hud-tl .hud-id {
  color: var(--c-cyan);
  text-shadow: 0 0 8px rgba(255, 106, 53, 0.7);
  font-weight: 500;
}
.card-hud-tl .hud-bar {
  height: 2px;
  background: rgba(255, 106, 53, 0.15);
  border-left: 1px solid var(--c-cyan);
  border-right: 1px solid var(--c-cyan);
  position: relative;
  overflow: hidden;
}
.card-hud-tl .hud-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-magenta));
  width: 78%;
  box-shadow: 0 0 8px var(--c-cyan);
  animation: hudBar 4s ease-in-out infinite;
}
@keyframes hudBar {
  0%, 100% { width: 65%; }
  50%      { width: 92%; }
}
.card-hud-tl .hud-status {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.87rem;
  letter-spacing: 0.22em;
}

/* Top-right HUD: SYNC hex */
.card-hud-tr {
  position: absolute;
  top: 16px; right: 58px;
  display: flex; align-items: center; gap: 8px;
}
.card-hud-tr .hud-tag {
  color: var(--c-magenta);
  text-shadow: 0 0 8px rgba(217, 72, 24, 0.6);
  font-weight: 500;
}
.card-hud-tr .hud-hex {
  width: 22px; height: 22px;
  color: var(--c-magenta);
  filter: drop-shadow(0 0 6px var(--c-magenta));
  animation: hexPulse 2.2s ease-in-out infinite;
}
@keyframes hexPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}

/* Bottom-right HUD: floating data grid */
.card-hud-br {
  position: absolute;
  bottom: 58px; right: 22px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 14px;
  padding: 10px 14px 10px 16px;
  background: rgba(2, 4, 12, 0.65);
  border: 1px solid rgba(255, 106, 53, 0.22);
  border-left: 2px solid var(--c-cyan);
  font-size: 0.87rem;
  box-shadow:
    inset 0 0 20px rgba(255, 106, 53, 0.06),
    0 0 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.card-hud-br .hud-key {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.25em;
}
.card-hud-br .hud-val {
  color: var(--c-cyan);
  text-shadow: 0 0 6px rgba(255, 106, 53, 0.7);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Energy lines traveling around the perimeter */
.energy-line {
  position: absolute;
  filter: blur(0.5px);
  pointer-events: none;
  opacity: 0.85;
}
.energy-line.top {
  top: -1px; left: -60%;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-cyan), transparent);
  box-shadow: 0 0 8px var(--c-cyan);
  animation: travelRight 5s linear infinite;
}
.energy-line.right {
  top: -60%; right: -1px;
  width: 2px; height: 60%;
  background: linear-gradient(180deg, transparent, var(--c-magenta), transparent);
  box-shadow: 0 0 8px var(--c-magenta);
  animation: travelDown 5s linear infinite 1.25s;
}
.energy-line.bottom {
  bottom: -1px; right: -60%;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-purple), transparent);
  box-shadow: 0 0 8px var(--c-purple);
  animation: travelLeft 5s linear infinite 2.5s;
}
.energy-line.left {
  bottom: -60%; left: -1px;
  width: 2px; height: 60%;
  background: linear-gradient(180deg, transparent, var(--c-cyan), transparent);
  box-shadow: 0 0 8px var(--c-cyan);
  animation: travelUp 5s linear infinite 3.75s;
}
@keyframes travelRight { from { left: -60%; }   to { left: 100%; } }
@keyframes travelDown  { from { top: -60%; }    to { top: 100%; } }
@keyframes travelLeft  { from { right: -60%; }  to { right: 100%; } }
@keyframes travelUp    { from { bottom: -60%; } to { bottom: 100%; } }

/* Vertical scan beam descending through the card */
.card-scan-beam {
  position: absolute;
  left: 6px; right: 6px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 4%,
    rgba(255, 106, 53, 0.9) 50%,
    transparent 96%);
  box-shadow:
    0 0 8px var(--c-cyan),
    0 0 18px rgba(255, 106, 53, 0.6),
    0 0 32px rgba(255, 106, 53, 0.25);
  opacity: 0;
  pointer-events: none;
  animation: scanBeam 7s ease-in-out infinite;
}
@keyframes scanBeam {
  0%   { top: 0%;   opacity: 0; }
  8%   { opacity: 0.85; }
  92%  { opacity: 0.85; }
  100% { top: 100%; opacity: 0; }
}

/* === Lab-card simple corners (legacy, kept for lab) === */
.card-corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid var(--accent);
  pointer-events: none;
  z-index: 5;
  transition:
    width 0.3s var(--ease-out),
    height 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}
.card-corner-tl { top: -6px; left: -6px;  border-right: none; border-bottom: none; }
.card-corner-tr { top: -6px; right: -6px; border-left: none;  border-bottom: none; }
.card-corner-bl { bottom: -6px; left: -6px;  border-right: none; border-top: none; }
.card-corner-br { bottom: -6px; right: -6px; border-left: none;  border-top: none; }
.lab-card:hover .card-corner {
  width: 28px; height: 28px;
  box-shadow: 0 0 18px var(--accent);
}

/* === Video media area === */
.game-media {
  position: relative;
  width: 100%; flex: 1;
  min-height: 280px;
  overflow: hidden;
  background: var(--bg-void);
  margin-top: 26px;  /* Clearance below the HUD chips */
  border: 1px solid rgba(255, 106, 53, 0.20);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.game-card:hover .game-media {
  border-color: rgba(255, 106, 53, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 106, 53, 0.1),
    0 0 35px rgba(255, 106, 53, 0.18);
}
.game-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.85) saturate(1.1);
  transition: transform 1s var(--ease-out), filter 0.6s var(--ease-out);
}
.game-card:hover .game-video { transform: scale(1.06); filter: brightness(1) saturate(1.3); }

/* Bottom darken gradient (existing) */
.game-media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 8, 12, 0.2) 60%, rgba(7, 8, 12, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.6s var(--ease-out);
}
.game-card:hover .game-media-overlay { opacity: 0.5; }

/* CRT scan-line overlay on top of the video */
.game-media::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0.45;
  mix-blend-mode: multiply;
  transition: opacity 0.4s var(--ease-out);
}
.game-card:hover .game-media::after { opacity: 0.22; }

/* === Info area === */
.game-info {
  padding: 1.2rem 0.5rem 0.3rem;
  border-top: 1px solid rgba(255, 106, 53, 0.15);
  margin-top: 14px;
  position: relative;
  z-index: 3;
}
.game-meta-row {
  display: flex; justify-content: space-between;
  margin-bottom: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.18em;
}
.game-num    { color: #d94818; text-shadow: 0 0 8px rgba(217, 72, 24, 0.5); }
.game-status { color: #ff6a35; text-shadow: 0 0 8px rgba(255, 106, 53, 0.6); }
.game-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  /* Title size matches the previously-featured card so every entry feels equally big */
  font-size: 6rem;
  line-height: 1.05; letter-spacing: -0.015em;
  margin-bottom: 0.8rem;
}
.game-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.game-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.15em;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(255, 106, 53, 0.28);
  background: rgba(2, 4, 12, 0.6);
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.3s var(--ease-out);
}
.game-tags span:hover {
  border-color: #ff6a35;
  color: #ff6a35;
  box-shadow: 0 0 12px rgba(255, 106, 53, 0.4);
}

/* ============== LAB CARDS (3D asset entries) ============== */
.lab {
  padding: 10rem 0;
  /* Background defined above (transparent w/ blur) — don't reset it here */
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lab-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.lab-card {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-panel);
  border: 1px solid rgba(217, 72, 24, 0.18);
  /* Need visible overflow so the corner brackets can extend outside.
     We re-clip the inner background via .lab-card-bg's own overflow. */
  overflow: visible;
  transition:
    border-color 0.4s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 50px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(217, 72, 24, 0.08);
}
.lab-card:hover {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 22px 70px rgba(0, 0, 0, 0.7),
    0 0 110px rgba(217, 72, 24, 0.22);
}
/* Clip the gradient background to the card edge */
.lab-card-bg { overflow: hidden; }

.lab-card-bg {
  position: absolute; inset: 0;
  transition: transform 1.5s var(--ease-out), filter 0.6s var(--ease-out);
}
.lab-card:hover .lab-card-bg { transform: scale(1.08); filter: brightness(1.15); }

.lab-bg-ship {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 106, 53, 0.4), transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(78, 130, 200, 0.25), transparent 50%),
    linear-gradient(135deg, var(--bg-elevated) 0%, #0a0d18 100%);
}
.lab-bg-ship::before, .lab-bg-laser::before, .lab-bg-cybercone::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}
.lab-bg-laser {
  background:
    radial-gradient(circle at 50% 50%, rgba(217, 72, 24, 0.55), transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(255, 100, 50, 0.3), transparent 40%),
    linear-gradient(135deg, #1a0f08 0%, var(--bg-void) 100%);
}
.lab-bg-cybercone {
  background:
    radial-gradient(circle at 50% 45%, rgba(200, 210, 230, 0.30), transparent 55%),
    radial-gradient(circle at 25% 75%, rgba(120, 140, 180, 0.18), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 106, 53, 0.15), transparent 45%),
    linear-gradient(135deg, #0a0a0d 0%, #050507 100%);
}

.lab-card-content {
  position: relative; z-index: 2;
  padding: 2.5rem;
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
}

.lab-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: rgba(217, 72, 24, 0.1);
  align-self: flex-start;
}

.lab-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(3.35rem, 6.7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.lab-cta {
  display: inline-flex; align-items: center; gap: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-primary);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
  transition: color 0.3s var(--ease-out), padding-left 0.4s var(--ease-out);
}
.lab-card:hover .lab-cta { color: var(--accent); padding-left: 0.5rem; }
.lab-cta svg { width: 18px; height: 18px; transition: transform 0.4s var(--ease-out); }
.lab-card:hover .lab-cta svg { transform: translateX(8px); }

/* ============== CONTACT ============== */
.contact {
  padding: 10rem 0;
  position: relative;
}
.contact::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(217, 72, 24, 0.12), transparent 60%);
  pointer-events: none;
}

/* ============== CONTACT MEGA — neon orange ============== */
.contact-mega {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  position: relative; z-index: 2;
  color: var(--text-primary);
  /* Ambient warm glow at rest — gently breathes via the @keyframes below */
  text-shadow: 0 0 28px rgba(255, 106, 53, 0.08);
  animation: contactBreath 5s ease-in-out infinite;
  transition:
    color 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    text-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    letter-spacing 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contactBreath {
  0%, 100% { text-shadow: 0 0 22px rgba(255, 106, 53, 0.06); }
  50%      { text-shadow: 0 0 40px rgba(255, 106, 53, 0.18); }
}

.contact-mega .contact-email {
  display: inline-block;
}

.contact-mega:hover {
  color: #ff6a35;
  padding-left: 2.5rem;
  letter-spacing: -0.018em;
  animation: none;  /* override idle pulse on hover */
  /* Multi-layer neon glow */
  text-shadow:
    0 0  8px rgba(255, 106, 53, 0.95),
    0 0 22px rgba(255, 106, 53, 0.7),
    0 0 50px rgba(255, 106, 53, 0.45),
    0 0 90px rgba(217, 72, 24, 0.32);
  border-top-color: rgba(255, 106, 53, 0.85);
  border-bottom-color: rgba(255, 106, 53, 0.85);
  /* Borders glow outward */
  box-shadow:
    0 -1px 24px -1px rgba(255, 106, 53, 0.45),
    0  1px 24px -1px rgba(255, 106, 53, 0.45);
}

.contact-mega .arrow {
  flex-shrink: 0;
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter   0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-mega:hover .arrow {
  transform: translate(20px, -14px) rotate(-12deg);
  filter: drop-shadow(0 0 14px rgba(255, 106, 53, 0.75));
}

/* ============== FOOTER ============== */
.footer { padding: 3rem 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-tagline { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-muted); }
.footer-socials { display: flex; gap: 1.5rem; }
.footer-socials a { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-secondary); transition: color 0.3s var(--ease-out); }
.footer-socials a:hover { color: var(--accent); }

/* ============== ASSET PAGES (full-screen 3D) ============== */
.asset-page {
  height: 100vh;
  position: relative;
  display: flex;
  overflow: hidden;
}

.asset-viewport {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(217, 72, 24, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(78, 130, 200, 0.08) 0%, transparent 55%),
    var(--bg-void);
}

body[data-model="laser"] .asset-viewport {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(217, 72, 24, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(255, 100, 50, 0.12) 0%, transparent 50%),
    var(--bg-void);
}

#asset-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
#asset-canvas:active { cursor: grabbing; }

.viewport-corners span {
  position: absolute; width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  pointer-events: none; z-index: 4;
}
.viewport-corners span:nth-child(1) { top: 100px; left: 32px; border-right: none; border-bottom: none; }
.viewport-corners span:nth-child(2) { top: 100px; right: 32px; border-left: none; border-bottom: none; }
.viewport-corners span:nth-child(3) { bottom: 32px; left: 32px; border-right: none; border-top: none; }
.viewport-corners span:nth-child(4) { bottom: 32px; right: 32px; border-left: none; border-top: none; }

.asset-overlay {
  position: relative; z-index: 3;
  width: 100%; height: 100%;
  padding: 7rem 3rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 2rem;
  pointer-events: none;
}

.asset-overlay > * { pointer-events: auto; }

.asset-title-block {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  display: flex; flex-direction: column; gap: 1rem;
}

.asset-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: rgba(217, 72, 24, 0.1);
  align-self: flex-start;
}
.asset-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.asset-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(4rem, 9.3vw, 8.7rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(7, 8, 12, 0.8);
}

.asset-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.13rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-secondary);
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  max-width: 240px;
}

.asset-controls {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  display: flex; flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(13, 15, 21, 0.7);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 220px;
}

.control-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.15em;
}
.control-label { color: var(--text-muted); }
.control-key {
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line-strong);
  background: rgba(7, 8, 12, 0.5);
}
.control-btn {
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line-strong);
  background: rgba(7, 8, 12, 0.5);
  transition: all 0.3s var(--ease-out);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; letter-spacing: 0.15em;
}
.control-btn:hover { color: var(--accent); border-color: var(--accent); }
.control-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(217, 72, 24, 0.1); }

.asset-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex; justify-content: flex-end;
}
.asset-nav-next {
  display: inline-flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem 2rem;
  border: 1px solid var(--line-strong);
  font-family: 'Cormorant Garamond', serif;
  background: rgba(13, 15, 21, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s var(--ease-out);
}
.asset-nav-next:hover { border-color: var(--accent); background: rgba(217, 72, 24, 0.1); }
.next-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-muted);
}
.next-title { font-size: 3rem; font-weight: 500; letter-spacing: -0.01em; }
.asset-nav-next svg { width: 20px; height: 20px; transition: transform 0.4s var(--ease-out); }
.asset-nav-next:hover svg { transform: translateX(8px); color: var(--accent); }

/* ============== TILT + SCROLL-DRIVEN ENTRANCE ==============
   .tilt cards combine two transforms:
     1) entrance: --enter (0 = hidden+small+lower, 1 = settled)
     2) tilt: --tilt-x / --tilt-y (rotated by mouse position)
   JS updates these variables every frame. */
.tilt {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --enter: 0;   /* 0 = invisible, scaled down, offset down. JS animates to 1. */
  opacity: var(--enter);
  transform-origin: center 70%;
  will-change: transform, opacity;
  transform:
    translateY(calc((1 - var(--enter)) * 90px))
    scale(calc(0.62 + var(--enter) * 0.38))
    perspective(1000px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y));
}

/* ============== HERO SCROLL CUE — bottom center ============== */
.hero { justify-content: flex-end; padding-bottom: 4rem; }
.hero-scroll {
  align-self: center;
  animation: scrollCueIn 1.2s var(--ease-out) 0.6s both;
}
@keyframes scrollCueIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .container { padding: 0 2rem; }
  .top-nav { padding: 1.2rem 2rem; }
  .games-grid { grid-template-columns: 1fr; }
  .game-card, .game-card.featured { grid-column: 1; min-height: 460px; padding: 12px; }
  .game-title { font-size: 4rem; }
  .lab-grid { grid-template-columns: 1fr; }
  .asset-overlay { grid-template-columns: 1fr; padding: 6rem 1.5rem 2rem; }
  .asset-controls { grid-column: 1; justify-self: stretch; min-width: 0; }
  .asset-title-block { grid-column: 1; }
}

@media (max-width: 700px) {
  .container { padding: 0 1.5rem; }
  .nav-email { display: none; }
  .work, .lab, .contact { padding: 5rem 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .contact-mega { font-size: clamp(0.9rem, 5vw, 1.8rem); padding: 2rem 0; }
  .contact-mega:hover { padding-left: 0; }
  .menu-text { font-size: 1.8rem; }
}
/* ==========================================================
   GAMEDEV JOURNEY — top-center title that grows on scroll
   Outer .gdj-title  → handles spawn/hide via CSS transitions
   Inner .gdj-inner  → handles scroll-driven scale via CSS var
   This split prevents the JS scale lerp from interfering with
   the entrance/exit transitions.
   ========================================================== */
.gdj-title {
  /* Pinned at the very top, horizontally centered */
  position: fixed;
  top: 1.2rem;
  left: 50%;
  z-index: 500;
  pointer-events: none;
  will-change: transform, opacity;

  /* Hidden state by default — slides in from above + fades in */
  opacity: 0;
  transform: translate(-50%, -40px);
  transition:
    opacity   0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visible state — toggled by JS (initial spawn + every scroll-up return) */
.gdj-title.gdj-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gdj-inner {
  display: inline-block;
  /* Typography */
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;

  /* Orange gradient fill — same family as the site --accent */
  background: linear-gradient(
    160deg,
    #ffb066 0%,
    #ff6a35 30%,
    #d94818 60%,
    #ff8a4d 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* Warm ambient glow */
  filter:
    drop-shadow(0 0 12px rgba(255, 106, 53, 0.55))
    drop-shadow(0 0 28px rgba(217, 72, 24, 0.30));

  /* --gdj-scale is updated by JS every frame as the user scrolls.
     No CSS transition here — the JS already lerps it smoothly. */
  --gdj-scale: 1;
  font-size: clamp(2.15rem, 4.3vw, 3.75rem);
  transform: scale(var(--gdj-scale));
  transform-origin: 50% 0%;
}

@media (max-width: 700px) {
  .gdj-title { top: 0.9rem; }
  .gdj-inner { font-size: clamp(1.6rem, 7.4vw, 2.7rem); }
}

/* ==========================================================
   GLOBAL FONT OVERRIDE — Silkscreen everywhere
   Applied at the end so it wins over every earlier font-family rule.
   ========================================================== */
body,
body *,
input,
button,
textarea,
select {
  font-family: 'Silkscreen', 'Courier New', monospace !important;
}

/* Silkscreen is a pixel font — its built-in metrics are tight and it has
   no italic. A couple of small tweaks help it sit comfortably across the
   existing layout: */
body {
  /* Pixel fonts look best with crisp rendering */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
}

/* Pixel font has no italic glyphs — kill the italic so words stay readable */
em, i, .menu-list a:hover .menu-text {
  font-style: normal !important;
}

/* Big serif titles — letter-spacing/line-height tweaks for Silkscreen pixel font.
   (font-size is intentionally NOT set here — each title controls its own size below.) */
.hero-title,
.game-title,
.lab-title,
.asset-title,
.contact-mega,
.gdj-inner {
  letter-spacing: 0;
  line-height: 1.05;
}

/* Body copy / menu items — pixel font reads better with a touch more line-height */
p, li, .menu-text, .menu-list a, .next-title {
  line-height: 1.4;
}

/* ==========================================================
   GAME PAGE — fullscreen 3D runner
   ========================================================== */
.game-page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg-void);
}

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Loader */
.game-loader {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 0.6rem;
  z-index: 200;
  transition: opacity 0.4s var(--ease-out);
}

/* ----- HUD (top bar with DIST / status / BEST) ----- */
.game-hud {
  position: fixed;
  top: 6rem;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 3rem;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
/* HUD visible only while playing or dead */
body.game-playing .game-hud,
body.game-dead    .game-hud { opacity: 1; }

.hud-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
}
.hud-left  { align-items: flex-start; }
.hud-right { align-items: flex-end;   }
.hud-center {
  flex: 1;
  align-items: center;
  justify-content: center;
}
.hud-label {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hud-value {
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(255, 106, 53, 0.5);
}
.hud-status {
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: rgba(217, 72, 24, 0.08);
  box-shadow: 0 0 24px rgba(255, 106, 53, 0.25);
}

/* ----- Overlays (idle + game-over) ----- */
.game-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  background: radial-gradient(ellipse at center,
              rgba(7, 8, 12, 0.4) 0%,
              rgba(7, 8, 12, 0.85) 80%);
}
body.game-armed .game-overlay-idle { opacity: 1; pointer-events: auto; }
body.game-dead  .game-overlay-dead { opacity: 1; pointer-events: auto; }

.overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
  padding: 2rem;
}

.overlay-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
}
.overlay-tag .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 1.6s infinite;
}
.overlay-tag-dead {
  color: #ff3a3a;
  border-color: #ff3a3a;
}
.overlay-tag-dead .dot { background: #ff3a3a; box-shadow: 0 0 8px #ff3a3a; }

.overlay-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
  text-shadow: 0 0 30px rgba(255, 106, 53, 0.3);
}
.overlay-title-dead {
  color: #ff3a3a;
  text-shadow: 0 0 30px rgba(255, 58, 58, 0.5);
}
.overlay-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ----- CTA button (FLY / RETRY) ----- */
.game-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 3.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 100px;
  cursor: none;
  overflow: hidden;
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.game-cta .cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-out);
  z-index: 0;
}
.game-cta .cta-label {
  position: relative;
  z-index: 1;
}
.game-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 106, 53, 0.4);
}
.game-cta:hover .cta-bg { transform: translateY(0); }

/* ----- Control hints on idle screen ----- */
.overlay-controls {
  margin-top: 1rem;
  font-family: 'JetBrains Mono', monospace;
}
.ctrl-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.ctrl-keys { display: inline-flex; gap: 0.3rem; }
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.ctrl-sep, .ctrl-text { color: var(--text-secondary); }

/* ----- Game over score block ----- */
.game-over-scores {
  display: flex;
  gap: 3rem;
  margin: 1rem 0;
}
.score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.score-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.6rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-shadow: 0 0 14px rgba(255, 106, 53, 0.5);
}

/* ----- Hit feedback (body classes added briefly by game.js on collision) ----- */
@keyframes gameShake {
  0%,100% { transform: translate(0, 0); }
  20%     { transform: translate(-10px, 6px); }
  40%     { transform: translate(8px, -8px); }
  60%     { transform: translate(-6px, -4px); }
  80%     { transform: translate(4px, 8px); }
}
body.game-shake .game-page { animation: gameShake 0.46s; }

body.game-hit::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 58, 58, 0.25);
  pointer-events: none;
  z-index: 999;
  animation: hitFlash 0.56s ease-out;
}
@keyframes hitFlash {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Hide the GameDev Journey title on the game page (would block the HUD) */
body[data-page="game"] .gdj-title { display: none; }

/* Responsive */
@media (max-width: 700px) {
  .game-hud { top: 5rem; padding: 0 1.2rem; }
  .hud-value { font-size: 1.6rem; }
  .hud-status { font-size: 1rem; padding: 0.5rem 1rem; }
  .overlay-title { font-size: clamp(2.8rem, 14vw, 5rem); }
  .game-over-scores { gap: 1.5rem; }
  .score-value { font-size: 1.8rem; }
  .ctrl-row { font-size: 0.8rem; }
}

/* ==========================================================
   JUMP BUTTON — top-left of game page, triggers the journey
   to the static solar system
   ========================================================== */
.jump-btn {
  position: fixed;
  top: 6rem;
  left: 1.5rem;
  z-index: 105;
  display: none;             /* hidden until gameplay starts */
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.4rem;
  background: rgba(7, 8, 12, 0.7);
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: none;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 0 24px rgba(255, 106, 53, 0.2);
  backdrop-filter: blur(8px);
}
.jump-btn:hover {
  background: rgba(255, 106, 53, 0.15);
  box-shadow: 0 0 32px rgba(255, 106, 53, 0.5);
  transform: translateX(2px);
}
.jump-btn .jump-icon {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.9rem;
  transition: transform 0.3s var(--ease-out);
}
.jump-btn:hover .jump-icon { transform: translateX(2px); }
.jump-btn:disabled {
  opacity: 0.35;
  cursor: none;
  pointer-events: none;
}

/* Show button only during gameplay, hide during travel & after arrival */
body.game-playing .jump-btn { display: inline-flex; }
body[data-travel-mode="travelling"] .jump-btn,
body[data-travel-mode="arrived"]    .jump-btn { display: none; }

@media (max-width: 700px) {
  .jump-btn { top: 5rem; left: 1rem; font-size: 0.75rem; padding: 0.6rem 1rem; }
}
/* ==========================================================
   ART PAGE — gallery for 3D objects & visual work
   ========================================================== */
.art-header {
  padding: 10rem 0 3rem;
  position: relative;
  z-index: 3;
}
.art-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(5rem, 14vw, 14rem);
  letter-spacing: -0.02em;
  line-height: 0.9;
  margin: 0;
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(255, 106, 53, 0.25);
}
.art-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin: 1.5rem 0 0;
}

.art-section {
  padding: 4rem 0;
  position: relative;
  z-index: 3;
}

/* Placeholder block for the empty "Visual Art" section */
.art-empty {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}
.art-empty-mark {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: relative;
}
.art-empty-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: blink 2s ease-in-out infinite;
}
.art-empty-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.02em;
}

@media (max-width: 700px) {
  .art-header { padding: 7rem 0 2rem; }
  .art-empty { flex-direction: column; align-items: flex-start; padding: 2rem 1.5rem; }
  .art-empty-text { font-size: 0.85rem; }
}

/* ==========================================================
   PLANET HOVER LABEL — appears when hovering Sun / Jupiter
   on the SpaceJourney page (created dynamically in game-init.js)
   ========================================================== */
.planet-label {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  top: 0; left: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: #fff;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 106, 53, 0.65);
  padding: 0.65rem 1.15rem 0.6rem;
  transform: translate(28px, -50%) scale(0.92);
  transform-origin: left center;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 28px rgba(255, 106, 53, 0.25),
              inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}
.planet-label::before {
  content: '→';
  display: inline-block;
  margin-right: 0.7rem;
  color: rgba(255, 106, 53, 0.95);
  letter-spacing: 0;
  font-weight: 700;
  transform: translateY(-1px);
}
.planet-label.visible {
  opacity: 1;
  transform: translate(28px, -50%) scale(1);
}

/* ==========================================================
   LANDING PAGE — scroll-driven space roller coaster
   ========================================================== */
body[data-page="landing"] {
  background: #010108;
}

/* Fixed full-screen 3D canvas, behind all content */
#landing-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;   /* let cursor and clicks pass through */
}

/* Tall empty area that gives the page scroll-height to drive the journey.
   ~1500vh means ~15 viewport heights of scrolling. The 3 acts split
   roughly as: Cosmic ~40%, Trip ~25%, Pixel forest ~35%. */
.journey-scroll {
  position: relative;
  height: 1500vh;
  z-index: 1;
  pointer-events: none;
}

/* "Scroll to begin" hint — fixed at bottom-center until first scroll */
.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 3.5rem;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform-origin: center;
  animation: scrollHintIn 1.4s ease 1.2s forwards;
  transition: opacity 0.6s ease;
}
.scroll-hint.hidden { opacity: 0; }
.scroll-hint-arrow {
  font-size: 1.3rem;
  color: rgba(255, 106, 53, 0.9);
  animation: scrollHintBounce 1.8s ease-in-out infinite;
}
@keyframes scrollHintIn {
  to { opacity: 1; }
}
@keyframes scrollHintBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

/* The contact section must cover the canvas as user scrolls into it.
   Solid background + slight gradient at the top for a smooth blend
   from the journey into the contact panel. */
/* The footer is now the only thing after the journey on the landing page,
   so it absorbs the smooth gradient-transition role that .contact used
   to do: a gentle fade from transparent-trip into solid-dark. */
body[data-page="landing"] .contact,
body[data-page="landing"] .footer {
  position: relative;
  z-index: 5;
  background: #010108;
}
body[data-page="landing"] .footer {
  padding-top: 14rem;
  background:
    linear-gradient(180deg, rgba(1, 1, 8, 0) 0%, rgba(1, 1, 8, 0.85) 25%, #010108 60%);
}

@media (max-width: 700px) {
  .journey-scroll  { height: 1280vh; }
  .scroll-hint     { font-size: 0.7rem; bottom: 2.4rem; }
}

/* ==========================================================
   CONTACT PAGE — cosmic transmission form (bigger)
   ========================================================== */
.contact-body {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #0a0a18 0%, #02020a 60%, #000000 100%);
  color: #f0e8d8;
  overflow-x: hidden;
  position: relative;
}

.contact-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-main {
  position: relative;
  z-index: 2;
  max-width: 740px;                  /* wider */
  margin: 0 auto;
  padding: 14vh 2.5rem 7rem;
}

.contact-header {
  margin-bottom: 4.5rem;
  text-align: center;
}
.contact-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;                   /* was 0.78 */
  letter-spacing: 0.45em;
  color: #ff8a4d;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}
.contact-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3.5rem, 8vw, 6.5rem);   /* bigger */
  line-height: 0.95;
  margin: 0 0 1.25rem;
  color: #ffd5a8;
  text-shadow: 0 0 40px rgba(255, 138, 77, 0.35),
               0 0 90px rgba(255, 90, 24, 0.18);
}
.contact-sub {
  font-family: 'Inter', sans-serif;        /* match site body font */
  font-size: 1.1rem;                       /* was 0.88 */
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(240, 232, 216, 0.65);
  margin: 0;
}

/* form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2.1rem;                       /* more breathing room */
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;                /* was 0.72 */
  letter-spacing: 0.28em;
  color: rgba(255, 138, 77, 0.8);
  text-transform: lowercase;
}
.field-group input,
.field-group textarea {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;                 /* was 0.95 */
  color: #f0e8d8;
  background: rgba(10, 10, 22, 0.55);
  border: 1px solid rgba(255, 138, 77, 0.2);
  border-radius: 3px;
  padding: 1.15rem 1.3rem;           /* roomier */
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  resize: vertical;
}
.field-group input::placeholder,
.field-group textarea::placeholder {
  color: rgba(240, 232, 216, 0.28);
  font-style: italic;
}
.field-group input:focus,
.field-group textarea:focus {
  border-color: rgba(255, 138, 77, 0.75);
  background: rgba(15, 12, 25, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 138, 77, 0.08),
              0 0 28px rgba(255, 138, 77, 0.2);
}
.field-group textarea {
  min-height: 180px;                 /* taller */
  line-height: 1.55;
}

/* footer */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.send-button {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;                   /* was 0.85 */
  letter-spacing: 0.3em;
  font-weight: 500;
  color: #02020a;
  background: linear-gradient(180deg, #ffc080 0%, #ff8a4d 50%, #ff6020 100%);
  border: none;
  padding: 1.15rem 2.2rem;           /* bigger button */
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 30px rgba(255, 138, 77, 0.3),
              0 0 0 1px rgba(255, 138, 77, 0.35);
  position: relative;
}
.send-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 45px rgba(255, 138, 77, 0.5),
              0 0 0 1px rgba(255, 200, 130, 0.65);
}
.send-button:active { transform: translateY(0); }
.send-arrow {
  transition: transform 0.25s ease;
  font-size: 1.1rem;
}
.send-button:hover .send-arrow { transform: translateX(5px); }

.form-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;                /* was 0.68 */
  letter-spacing: 0.2em;
  color: rgba(240, 232, 216, 0.4);
  margin: 0;
}

/* success state */
.contact-success {
  text-align: center;
  padding-top: 2.5rem;
  animation: success-fade-in 0.7s ease forwards;
}
@keyframes success-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-orb {
  width: 110px;                      /* bigger */
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd5a8 0%, #ff8a4d 35%, #ff5a18 70%, transparent 90%);
  margin: 0 auto 2.75rem;
  animation: orb-pulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(255, 138, 77, 0.65),
              0 0 120px rgba(255, 90, 24, 0.35);
}
@keyframes orb-pulse {
  0%, 100% { transform: scale(1);    opacity: 1;    }
  50%      { transform: scale(1.15); opacity: 0.85; }
}
.success-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.4rem, 5.5vw, 4rem);    /* bigger */
  color: #ffd5a8;
  margin: 0 0 1.25rem;
}
.success-sub {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;                        /* was 0.9 */
  color: rgba(240, 232, 216, 0.65);
  margin: 0 0 2.75rem;
}
.success-back {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;                          /* was 0.85 */
  letter-spacing: 0.22em;
  color: #ff8a4d;
  text-decoration: none;
  border: 1px solid rgba(255, 138, 77, 0.45);
  padding: 0.95rem 1.9rem;                  /* bigger */
  transition: all 0.25s ease;
}
.success-back:hover {
  background: rgba(255, 138, 77, 0.1);
  border-color: rgba(255, 138, 77, 0.85);
  color: #ffae5a;
}

@media (max-width: 600px) {
  .contact-main { padding: 10vh 1.5rem 4rem; }
  .form-footer { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================
   ABOUT PAGE — cosmic bio
   ========================================================== */
.about-body {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #0a0a18 0%, #02020a 60%, #000000 100%);
  color: #f0e8d8;
  overflow-x: hidden;
  position: relative;
}

.about-main {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 14vh 2.5rem 8rem;
}

.about-header {
  margin-bottom: 6rem;
  text-align: center;
}
.about-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.45em;
  color: #ff8a4d;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}
.about-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.95;
  margin: 0 0 1.5rem;
  color: #ffd5a8;
  text-shadow: 0 0 50px rgba(255, 138, 77, 0.4),
               0 0 100px rgba(255, 90, 24, 0.2);
}
.about-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  color: rgba(240, 232, 216, 0.7);
  margin: 0;
}

.about-section {
  margin-bottom: 5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 138, 77, 0.12);
}
.about-section:last-child {
  border-bottom: none;
}
.about-section .section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: rgba(255, 138, 77, 0.6);
  margin: 0 0 0.8rem;
}
.about-section .section-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: #ffd5a8;
  margin: 0 0 2rem;
}
.about-section .section-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(240, 232, 216, 0.82);
}
.about-section .section-body p {
  margin: 0 0 1.2rem;
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
}
.stack-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  border-bottom: 1px dashed rgba(255, 138, 77, 0.18);
  padding-bottom: 0.6rem;
}
.stack-list .stack-name {
  color: #ffd5a8;
  font-weight: 500;
}
.stack-list .stack-role {
  color: rgba(240, 232, 216, 0.45);
  font-size: 0.82rem;
}

.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.work-list li {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.85rem;
  color: rgba(240, 232, 216, 0.82);
}
.work-list strong {
  color: #ff8a4d;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  margin-right: 0.5rem;
}

.elsewhere-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.elsewhere-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: #ffd5a8;
  text-decoration: none;
  padding: 1.1rem 1.4rem;
  border: 1px solid rgba(255, 138, 77, 0.25);
  border-radius: 3px;
  background: rgba(10, 10, 22, 0.4);
  transition: all 0.25s ease;
}
.elsewhere-link:hover {
  border-color: rgba(255, 138, 77, 0.7);
  background: rgba(20, 12, 28, 0.7);
  color: #ffae5a;
  transform: translateX(4px);
}
.elsewhere-link .el-arrow {
  color: rgba(255, 138, 77, 0.7);
  transition: transform 0.25s ease;
}
.elsewhere-link:hover .el-arrow {
  transform: translateX(4px);
}
.elsewhere-link.primary {
  background: linear-gradient(180deg, rgba(255, 138, 77, 0.15) 0%, rgba(255, 90, 24, 0.08) 100%);
  border-color: rgba(255, 138, 77, 0.5);
  font-weight: 500;
}

@media (max-width: 600px) {
  .about-main { padding: 10vh 1.5rem 5rem; }
  .stack-list { grid-template-columns: 1fr; }
}

/* ==========================================================
   LOADING SCREEN — initial overlay before three.js mounts
   ========================================================== */
.gigachu-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(ellipse at center, #0a0a18 0%, #000000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.gigachu-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: #ffae5a;
  text-shadow: 0 0 30px rgba(255, 138, 77, 0.5),
               0 0 80px rgba(255, 90, 24, 0.25);
  letter-spacing: 0.02em;
  margin: 0;
}

.loader-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: rgba(255, 138, 77, 0.65);
  text-transform: uppercase;
  margin: 0;
  animation: loader-blink 1.6s ease-in-out infinite;
}
@keyframes loader-blink {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

.loader-bar {
  width: 240px;
  height: 2px;
  background: rgba(255, 138, 77, 0.18);
  overflow: hidden;
  position: relative;
}
.loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, #ff8a4d 50%, transparent 100%);
  animation: loader-sweep 1.8s ease-in-out infinite;
}
@keyframes loader-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================================
   ART CARDS — tree + house additions
   ========================================================== */
.lab-bg-tree {
  background:
    radial-gradient(circle at 50% 40%, rgba(110, 180, 80, 0.45), transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(140, 90, 50, 0.35), transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(180, 220, 100, 0.18), transparent 45%),
    linear-gradient(135deg, #0d1208 0%, var(--bg-void) 100%);
}
.lab-bg-tree::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
}

.lab-bg-house {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 138, 77, 0.40), transparent 55%),
    radial-gradient(circle at 30% 75%, rgba(140, 80, 40, 0.30), transparent 45%),
    radial-gradient(circle at 75% 25%, rgba(255, 200, 130, 0.18), transparent 40%),
    linear-gradient(135deg, #150c08 0%, var(--bg-void) 100%);
}
.lab-bg-house::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
}
/* ==========================================================
   PLAY PORTAL — eye-catching game CTA card
   Unique class names (`play-portal-*`) so nothing collides.
   ========================================================== */
.play-portal {
  position: relative;
  display: block;
  max-width: 640px;
  margin: 3rem auto;
  padding: 2.5rem 2.5rem 2.2rem;
  text-decoration: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 138, 77, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 12, 28, 0.7) 0%, rgba(10, 10, 22, 0.7) 100%);
  border: 1px solid rgba(255, 138, 77, 0.3);
  border-radius: 6px;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  box-shadow:
    0 4px 30px rgba(255, 138, 77, 0.12),
    0 0 0 1px rgba(255, 138, 77, 0.08) inset;
  animation: portal-breathe 3.5s ease-in-out infinite;
}

@keyframes portal-breathe {
  0%, 100% { box-shadow: 0 4px 30px rgba(255, 138, 77, 0.12), 0 0 0 1px rgba(255, 138, 77, 0.08) inset; }
  50%      { box-shadow: 0 4px 50px rgba(255, 138, 77, 0.22), 0 0 0 1px rgba(255, 138, 77, 0.18) inset; }
}

/* Sweeping shimmer that pulses across the card */
.play-portal-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 174, 90, 0.18) 50%, transparent 100%);
  animation: portal-shimmer 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes portal-shimmer {
  0%, 100% { left: -100%; }
  50%      { left: 140%; }
}

.play-portal-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* "// LIVE NOW" status pill */
.play-portal-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: #ff8a4d;
  margin-bottom: 1.2rem;
}
.play-portal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff5a18;
  box-shadow: 0 0 12px #ff8a4d, 0 0 24px rgba(255, 138, 77, 0.5);
  animation: portal-pulse 1.4s ease-in-out infinite;
}
@keyframes portal-pulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%      { opacity: 0.55; transform: scale(0.75); }
}

/* Game title — big italic serif */
.play-portal-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  color: #ffd5a8;
  margin: 0 0 0.6rem;
  text-shadow:
    0 0 25px rgba(255, 138, 77, 0.45),
    0 0 60px rgba(255, 90, 24, 0.2);
  transition: text-shadow 0.4s ease, color 0.4s ease;
}

.play-portal-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: rgba(240, 232, 216, 0.6);
  margin: 0 0 1.8rem;
}

/* Big CTA button at the bottom */
.play-portal-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: #02020a;
  background: linear-gradient(180deg, #ffc080 0%, #ff8a4d 50%, #ff6020 100%);
  padding: 1rem 2rem;
  border-radius: 2px;
  box-shadow:
    0 6px 30px rgba(255, 138, 77, 0.4),
    0 0 0 1px rgba(255, 138, 77, 0.45);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    gap 0.3s ease;
}
.play-portal-cta-arrow {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

/* --- HOVER STATE: brighter, lifts up, glow intensifies --- */
.play-portal:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 138, 77, 0.85);
  box-shadow:
    0 12px 50px rgba(255, 138, 77, 0.35),
    0 0 0 1px rgba(255, 174, 90, 0.4) inset;
  animation-play-state: paused; /* freeze breathing during hover */
}
.play-portal:hover .play-portal-title {
  color: #ffae5a;
  text-shadow:
    0 0 30px rgba(255, 138, 77, 0.7),
    0 0 80px rgba(255, 90, 24, 0.4);
}
.play-portal:hover .play-portal-cta {
  gap: 1.3rem;
  box-shadow:
    0 10px 50px rgba(255, 138, 77, 0.65),
    0 0 0 1px rgba(255, 200, 130, 0.7);
}
.play-portal:hover .play-portal-cta-arrow {
  transform: translateX(4px);
}

@media (max-width: 540px) {
  .play-portal { padding: 2rem 1.5rem; }
  .play-portal-cta { font-size: 0.85rem; padding: 0.9rem 1.5rem; letter-spacing: 0.22em; }
}