/* ==========================================================================
   KAFA AL GANIYU — 16-BIT PIXEL PORTFOLIO DESIGN SYSTEM
   Cohesive SNES / GBA RPG + Data Analytics Terminal Aesthetic
   ========================================================================== */

:root {
  /* Core Ink & Surfaces */
  --ink:            #161826;
  --ink-soft:       #475269;
  --ink-muted:      #647087;

  --bg-page:        #F2ECE1;
  --bg-alt:         #E1EDF2;
  --surface:        #FFFDF7;
  --surface-warm:   #F7F1E5;
  --surface-sky:    #EBF4FA;

  --panel-dark:     #1A1E33;
  --panel-navy:     #232844;
  --panel-darker:   #101321;

  /* Pixel Accent Palette */
  --crimson:        #E63946;
  --crimson-dark:   #9B1B26;
  --gold:           #FFB703;
  --gold-bright:    #FFD166;
  --gold-dark:      #C98200;
  --emerald:        #38E59A;
  --emerald-dark:   #158058;
  --teal:           #2EC4B6;
  --azure:          #3B82F6;

  /* Sky & Terrain */
  --sky-top:        #1F3F7A;
  --sky-mid:        #3E7DD1;
  --sky-low:        #7EC8F2;
  --sky-horizon:    #C5EAFF;

  --grass-light:    #63A844;
  --grass-mid:      #468232;
  --grass-dark:     #2B5420;

  /* Text */
  --text-dark:      #161826;
  --text-body:      #3B4459;
  --text-light:     #FFFDF7;
  --text-light-sub: #C8D3E6;

  /* Borders & Shadows */
  --px-border:      3px solid var(--ink);
  --px-shadow:      6px 6px 0px var(--ink);
  --px-shadow-sm:   4px 4px 0px var(--ink);
  --px-shadow-lg:   8px 8px 0px var(--ink);
  --px-bevel:       inset 2px 2px 0px rgba(255, 255, 255, 0.9), inset -2px -2px 0px rgba(22, 24, 38, 0.08);
  --px-bevel-dark:  inset 2px 2px 0px rgba(255, 255, 255, 0.12), inset -2px -2px 0px rgba(0, 0, 0, 0.35);

  /* Typography */
  --font-pixel:     'Press Start 2P', monospace;
  --font-display:   'Pixelify Sans', sans-serif;
  --font-sans:      'Plus Jakarta Sans', sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --container:      1180px;
}

/* ==========================================================================
   BASE RESET & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-wrap: break-word;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-page);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background-image:
    radial-gradient(rgba(22, 24, 38, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(22, 24, 38, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 24, 38, 0.025) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 24px 24px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 0;
  letter-spacing: 0.01em;
}
p { margin: 0; min-width: 0; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--panel-darker); }
::-webkit-scrollbar-thumb {
  background: var(--crimson);
  border: 2px solid var(--panel-darker);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson), var(--gold), var(--emerald));
  z-index: 600;
  border-bottom: 2px solid var(--ink);
}

/* ==========================================================================
   PRELOADER (SNAPPY, NON-BLOCKING)
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--panel-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 340px;
  width: 88%;
}
.preloader-logo {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 4vw, 22px);
  color: var(--gold-bright);
  text-shadow: 3px 3px 0px var(--crimson);
  letter-spacing: 0.05em;
}
.preloader-bar-bg {
  width: 100%;
  height: 18px;
  background: var(--panel-dark);
  border: 3px solid var(--surface);
  padding: 2px;
}
.preloader-progress {
  height: 100%;
  width: 25%;
  background: var(--emerald);
  transition: width 0.25s steps(6);
}
.preloader-subtitle {
  font-family: var(--font-pixel);
  font-size: 9.5px;
  color: var(--text-light-sub);
  letter-spacing: 0.08em;
}

/* ==========================================================================
   PIXEL BUTTONS & BADGES
   ========================================================================== */
.px-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 20px;
  border: var(--px-border);
  box-shadow: var(--px-shadow-sm);
  cursor: pointer;
  transition: transform .1s steps(2), box-shadow .1s steps(2), background .15s ease;
  white-space: nowrap;
  position: relative;
}
.px-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--px-shadow);
}
.px-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--ink);
}
.px-btn-red {
  background: var(--crimson);
  color: var(--text-light);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.25), var(--px-shadow-sm);
}
.px-btn-red:hover {
  background: #d32f3c;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.25), var(--px-shadow);
}
.px-btn-yellow {
  background: var(--gold);
  color: var(--ink);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.45), var(--px-shadow-sm);
}
.px-btn-yellow:hover {
  background: var(--gold-bright);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.5), var(--px-shadow);
}
.px-btn-dark {
  background: var(--panel-dark);
  color: var(--text-light);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.14), var(--px-shadow-sm);
}
.px-btn-dark:hover {
  background: var(--panel-navy);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.18), var(--px-shadow);
}
.px-btn-white {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--px-bevel), var(--px-shadow-sm);
}
.px-btn-mint {
  background: var(--emerald);
  color: var(--ink);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.45), var(--px-shadow-sm);
}
.px-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.px-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

/* ==========================================================================
   NAVBAR (UNIFIED ACROSS ALL PAGES)
   ========================================================================== */
.nav-outer {
  position: sticky;
  top: 0;
  z-index: 400;
  background: var(--panel-dark);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 4px 0 rgba(22, 24, 38, 0.22);
  padding: 10px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-logo-badge {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--crimson);
  color: var(--text-light);
  border: 2px solid var(--surface);
  box-shadow: 3px 3px 0px var(--gold);
  font-family: var(--font-pixel);
  font-size: 13px;
  transition: transform .1s steps(2);
}
.nav-logo:hover .nav-logo-badge {
  transform: translate(-1px, -1px);
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo-text strong {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.04em;
}
.nav-logo-text span {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--gold-bright);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-light);
}
.nav-links a {
  padding: 6px 11px;
  border: 2px solid transparent;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 183, 3, 0.45);
}

.nav-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light-sub);
}
.nav-breadcrumbs a:hover { color: var(--gold-bright); }
.nav-breadcrumbs .sep { color: var(--crimson); font-weight: 800; }
.nav-breadcrumbs .current { color: var(--gold-bright); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sfx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-navy);
  color: var(--text-light-sub);
  border: 2px solid rgba(255, 255, 255, 0.35);
  padding: 7px 11px;
  font-family: var(--font-pixel);
  font-size: 8.5px;
  cursor: pointer;
  transition: all .12s steps(2);
  white-space: nowrap;
}
.sfx-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}
.sfx-toggle.on {
  background: var(--emerald);
  color: var(--ink);
  border-color: var(--surface);
  box-shadow: 2px 2px 0 var(--ink);
}

.mobile-toggle {
  display: none;
  background: var(--crimson);
  border: 2px solid var(--surface);
  color: var(--text-light);
  padding: 6px 8px;
  cursor: pointer;
}
.mobile-toggle svg { width: 22px; height: 22px; display: block; }

/* ==========================================================================
   HERO: 16-BIT RPG TITLE SCREEN
   ========================================================================== */
.hero-title-screen {
  position: relative;
  min-height: 580px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-low) 84%, var(--sky-horizon) 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 4px solid var(--ink);
}

/* Twinkling Pixel Stars in Upper Sky */
.pixel-stars {
  position: absolute;
  inset: 0 0 55% 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 18%, rgba(255, 255, 255, 0.85) 99%, transparent),
    radial-gradient(2px 2px at 23% 11%, rgba(255, 209, 102, 0.85) 99%, transparent),
    radial-gradient(2px 2px at 38% 24%, rgba(255, 255, 255, 0.65) 99%, transparent),
    radial-gradient(2px 2px at 61% 14%, rgba(255, 255, 255, 0.8) 99%, transparent),
    radial-gradient(2px 2px at 78% 22%, rgba(255, 209, 102, 0.75) 99%, transparent),
    radial-gradient(2px 2px at 91% 12%, rgba(255, 255, 255, 0.9) 99%, transparent),
    radial-gradient(3px 3px at 49% 8%, rgba(255, 255, 255, 0.7) 99%, transparent);
  animation: starTwinkle 4s steps(2) infinite;
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.45; }
}

/* Pixel Clouds */
.pixel-clouds {
  position: absolute;
  inset: 0 0 42% 0;
  pointer-events: none;
  overflow: hidden;
}
.cloud {
  position: absolute;
  width: 24px;
  height: 12px;
  background: #FFFDF7;
  box-shadow:
    12px 0 0 #FFFDF7, 24px 0 0 #FFFDF7, 36px 0 0 #FFFDF7,
    -12px 8px 0 #FFFDF7, 0 8px 0 #FFFDF7, 12px 8px 0 #FFFDF7, 24px 8px 0 #FFFDF7, 36px 8px 0 #FFFDF7, 48px 8px 0 #FFFDF7,
    -12px 16px 0 #D8EEFA, 0 16px 0 #D8EEFA, 12px 16px 0 #D8EEFA, 24px 16px 0 #D8EEFA, 36px 16px 0 #D8EEFA, 48px 16px 0 #D8EEFA;
  opacity: 0.92;
}
.cloud-1 { top: 72px; left: 4%; animation: drift 42s linear infinite; }
.cloud-2 { top: 145px; right: 5%; animation: driftReverse 55s linear infinite; }
.cloud-3 { top: 56px; left: 76%; animation: driftSmall 36s linear infinite; }

@keyframes drift {
  0% { transform: translateX(-30px) scale(1.35); }
  50% { transform: translateX(35px) scale(1.35); }
  100% { transform: translateX(-30px) scale(1.35); }
}
@keyframes driftReverse {
  0% { transform: translateX(25px) scale(1.65); }
  50% { transform: translateX(-35px) scale(1.65); }
  100% { transform: translateX(25px) scale(1.65); }
}
@keyframes driftSmall {
  0% { transform: translateX(-18px) scale(1.05); }
  50% { transform: translateX(22px) scale(1.05); }
  100% { transform: translateX(-18px) scale(1.05); }
}

/* Top HUD Bar inside Hero */
.hero-hud-bar {
  position: relative;
  z-index: 5;
  padding: 16px 0 0;
}
.hero-hud-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(22, 24, 38, 0.85);
  border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.14), 4px 4px 0 rgba(22, 24, 38, 0.45);
  padding: 9px 16px;
  color: var(--text-light);
}
.hud-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hud-item {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-light-sub);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.04em;
}
.hud-item strong {
  color: var(--gold-bright);
}
.hud-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  display: inline-block;
  box-shadow: 0 0 0 2px var(--ink);
  animation: pulseStep 1.2s steps(2) infinite;
}
@keyframes pulseStep {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.hud-hp-bar {
  width: 72px;
  height: 11px;
  background: var(--panel-darker);
  border: 2px solid var(--surface);
  padding: 1px;
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
}
.hud-hp-fill {
  width: 100%;
  height: 100%;
  display: block;
  background: repeating-linear-gradient(90deg, var(--emerald) 0 6px, var(--emerald-dark) 6px 8px);
}

/* Hero Sky Title */
.hero-sky-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 54px 20px 28px;
}
.hero-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  background: var(--panel-dark);
  color: var(--gold-bright);
  padding: 7px 14px;
  border: 2px solid var(--surface);
  box-shadow: 4px 4px 0px var(--ink);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
.hero-3d-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 7.6vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  color: #FFFDF7;
  letter-spacing: 0.03em;
  text-shadow:
    3px 3px 0px var(--crimson),
    6px 6px 0px var(--crimson-dark),
    9px 9px 0px var(--ink);
  margin-bottom: 18px;
}
.hero-sub-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-sub-100 {
  font-family: var(--font-pixel);
  font-size: clamp(11px, 1.8vw, 17px);
  color: var(--text-light);
  background: var(--crimson);
  display: inline-block;
  padding: 10px 18px;
  border: 3px solid var(--ink);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.28), 5px 5px 0px var(--ink);
  letter-spacing: 0.06em;
}
.hero-sub-tag {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--ink);
  background: var(--gold-bright);
  padding: 10px 14px;
  border: 3px solid var(--ink);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.5), 5px 5px 0px var(--ink);
}

/* Pixel Horizon Silhouette & Scenic Props */
.hero-sky-stage {
  position: relative;
  z-index: 4;
  padding-bottom: 0;
}
.hero-skyline {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 56px;
  margin-bottom: -2px;
  pointer-events: none;
  overflow: hidden;
}
.hero-skyline svg {
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: crispEdges;
}

/* Grass Foreground Stage using public/rumput.png */
.hero-grass-stage {
  position: relative;
  z-index: 5;
  margin-top: -78px;
  background: transparent;
  padding: 120px 24px 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-grass-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-grass-fill {
  position: absolute;
  top: 55%;
  left: 0;
  right: 0;
  bottom: 0;
  background: #143025;
}
.hero-grass-img {
  position: absolute;
  inset: 0;
  background-image: url('../public/rumput.png');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* Horizon Anchor locks house & mage bottoms firmly inside the sunlit meadow */
.hero-horizon-anchor {
  position: absolute;
  top: 102px;
  left: 0;
  right: 0;
  height: 0;
  z-index: 4;
  pointer-events: none;
}
.hero-prop-house {
  position: absolute;
  left: max(14px, calc(50% - 680px));
  bottom: 0;
  width: clamp(185px, 17vw, 245px);
}
.hero-prop-house img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(5px 6px 0 rgba(22, 24, 38, 0.38));
  display: block;
}

/* Cozy Pixel Chimney Smoke Puffs */
.chimney-smoke {
  position: absolute;
  left: 65%;
  bottom: 87%;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 2;
}
.smoke-puff {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  background: #E2E8F0;
  box-shadow:
    4px -2px 0 0 #E2E8F0,
    -2px -4px 0 0 #CBD5E1,
    2px -6px 0 0 #F8FAFC;
  opacity: 0;
  animation: chimneyPuff 3.2s steps(10) infinite;
}
.smoke-puff.p2 {
  width: 8px;
  height: 8px;
  animation-delay: -0.8s;
}
.smoke-puff.p3 {
  width: 10px;
  height: 10px;
  animation-delay: -1.6s;
}
.smoke-puff.p4 {
  width: 8px;
  height: 8px;
  animation-delay: -2.4s;
}
@keyframes chimneyPuff {
  0% {
    opacity: 0;
    transform: translate(0px, 0px) scale(0.7);
  }
  15% {
    opacity: 0.92;
    transform: translate(2px, -8px) scale(0.95);
  }
  65% {
    opacity: 0.72;
    transform: translate(10px, -32px) scale(1.25);
  }
  100% {
    opacity: 0;
    transform: translate(18px, -54px) scale(1.5);
  }
}

.hero-prop-mage {
  position: absolute;
  right: max(18px, calc(50% - 640px));
  bottom: 0;
  width: clamp(112px, 11vw, 150px);
  aspect-ratio: 240 / 289;
  overflow: hidden;
}
.hero-prop-mage img {
  width: 800%;
  max-width: none;
  height: 100%;
  image-rendering: pixelated;
  animation: mageIdleStrip 0.8s steps(8) infinite;
  filter: drop-shadow(3px 4px 0 rgba(22, 24, 38, 0.35));
}
@keyframes mageIdleStrip {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* Pixel Menu + Character Card Layout */
.pixel-menu-layout {
  position: relative;
  z-index: 6;
  max-width: 960px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 44px;
  align-items: center;
}

.pixel-menu-layout > * {
  min-width: 0;
}

/* RPG Command Window */
.arcade-menu-box {
  background: var(--panel-dark);
  border: 4px solid var(--surface);
  outline: 4px solid var(--ink);
  box-shadow: var(--px-bevel-dark), 10px 10px 0px var(--ink);
  padding: 24px 26px;
  width: 100%;
  position: relative;
}
.arcade-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.22);
}
.arcade-menu-prompt {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}
.arcade-menu-hint {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--emerald);
  opacity: 0.9;
}
.arcade-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arcade-menu-link {
  font-family: var(--font-pixel);
  font-size: clamp(11px, 1.5vw, 13.5px);
  color: var(--text-light-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid transparent;
  transition: color .1s ease, background .1s ease, border-color .1s ease;
}
.arcade-menu-link-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.arcade-menu-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--panel-dark);
  background: rgba(255, 255, 255, 0.16);
  color: var(--gold-bright);
  padding: 2px 8px;
  border: 1px solid rgba(255, 209, 102, 0.4);
}
.arcade-menu-cursor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: var(--emerald);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .1s ease, transform .1s ease;
  font-size: 14px;
}
.arcade-menu-link.active {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(56, 229, 154, 0.55);
}
.arcade-menu-link.active .arcade-menu-tag {
  background: var(--emerald);
  color: var(--ink);
  border-color: var(--ink);
}
.arcade-menu-link.active .arcade-menu-cursor {
  opacity: 1;
  transform: translateX(0);
  animation: bob 0.55s steps(2) infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.arcade-menu-preview {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 2px dashed rgba(255, 255, 255, 0.22);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light-sub);
  display: flex;
  align-items: center;
  gap: 8px;
}
.arcade-menu-preview span.caret {
  color: var(--emerald);
  font-family: var(--font-pixel);
  font-size: 10px;
}

/* RPG Portrait Card in Hero */
.hero-portrait-card {
  background: var(--panel-dark);
  border: 4px solid var(--surface);
  outline: 4px solid var(--ink);
  box-shadow: var(--px-bevel-dark), 10px 10px 0 var(--ink);
  padding: 10px;
  width: 100%;
  max-width: 275px;
}
.hero-portrait-frame {
  position: relative;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  height: 255px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
}
.hero-portrait-lvl {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--crimson);
  color: var(--text-light);
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 4px 7px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.hero-portrait-status {
  padding: 10px 4px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-light);
}
.hero-portrait-status strong {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--gold-bright);
}
.hero-portrait-status span {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--emerald);
}

.hero-bottom-credits {
  position: absolute;
  bottom: 10px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 8.5px;
  color: rgba(255, 253, 247, 0.78);
  text-shadow: 2px 2px 0 var(--ink);
  z-index: 4;
  pointer-events: none;
}

/* ==========================================================================
   SECTIONS & STAGE HEADERS
   ========================================================================== */
.section-pad { padding: 76px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}
.section-dark {
  background: var(--panel-dark);
  color: var(--text-light);
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
}

.px-section-head {
  margin-bottom: 36px;
}
.px-stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  background: var(--crimson);
  color: var(--text-light);
  padding: 7px 13px;
  border: 2px solid var(--ink);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.25), 3px 3px 0px var(--ink);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.section-dark .px-stage-tag {
  border-color: var(--surface);
  box-shadow: 3px 3px 0px var(--gold);
}
.px-section-head h2 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.1;
  color: var(--ink);
}
.section-dark .px-section-head h2 { color: var(--text-light); }
.px-section-head p {
  color: var(--text-body);
  font-size: 15.5px;
  margin-top: 10px;
  max-width: 680px;
}
.section-dark .px-section-head p { color: var(--text-light-sub); }

/* ==========================================================================
   PLAYER PROFILE / ABOUT
   ========================================================================== */
.player-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 34px;
  align-items: start;
}
.player-card {
  background: var(--panel-dark);
  color: var(--text-light);
  border: 4px solid var(--ink);
  box-shadow: var(--px-bevel-dark), var(--px-shadow-lg);
}
.player-card-top {
  background: #FFFFFF;
  padding: 46px 18px 0;
  border-bottom: 4px solid var(--ink);
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.player-card-top img {
  width: 230px;
  height: auto;
  display: block;
}
.player-loc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: var(--gold-bright);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
}
.player-card-body {
  padding: 22px;
}
.xp-bar-wrap {
  margin-bottom: 16px;
}
.xp-bar-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--gold-bright);
  margin-bottom: 7px;
}
.xp-bar-track {
  height: 16px;
  background: var(--panel-darker);
  border: 2px solid var(--surface);
  padding: 2px;
}
.xp-bar-fill {
  height: 100%;
  width: 86.75%;
  background: repeating-linear-gradient(90deg, var(--emerald) 0 10px, #25b878 10px 12px);
}
.quick-connect-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.px-connect-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-navy);
  border: 2px solid rgba(255, 253, 247, 0.78);
  padding: 10px 14px;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  transition: transform .1s steps(2), background .15s ease, box-shadow .1s steps(2);
}
.px-connect-btn:hover {
  background: var(--crimson);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0px var(--gold);
}
.px-connect-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.px-connect-left svg { width: 16px; height: 16px; stroke: var(--gold-bright); }

/* RPG Dialog Bio Box */
.rpg-dialog-box {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow);
  padding: 28px 30px;
  margin-bottom: 24px;
  position: relative;
}
.rpg-dialog-box h3 {
  font-size: 25px;
  color: var(--crimson);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rpg-dialog-box p {
  color: var(--text-body);
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 14px;
}
.rpg-dialog-box p:last-child { margin-bottom: 0; }

/* Stats Mini Grid + Pixel Bar Chart Accent */
.stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-px-box {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow-sm);
  padding: 18px 14px;
  text-align: center;
  transition: transform .1s steps(2);
}
.stat-px-box:hover {
  transform: translate(-2px, -2px);
  background: #FFF9EB;
}
.stat-px-num {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--crimson);
  margin-bottom: 8px;
}
.stat-px-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

/* Analyst Radar / Core Attributes Bar Box */
.attr-card {
  background: var(--panel-dark);
  color: var(--text-light);
  border: var(--px-border);
  box-shadow: var(--px-bevel-dark), var(--px-shadow);
  padding: 22px 26px;
}
.attr-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.attr-card-head span {
  font-family: var(--font-pixel);
  font-size: 9.5px;
  color: var(--gold-bright);
}
.attr-card-head em {
  font-style: normal;
  font-family: var(--font-pixel);
  font-size: 8.5px;
  color: var(--emerald);
}
.attr-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
.attr-row-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-light);
}
.attr-row-top span:last-child {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--gold-bright);
  align-self: center;
}
.attr-track {
  height: 11px;
  background: var(--panel-darker);
  border: 2px solid rgba(255, 253, 247, 0.45);
  padding: 1px;
}
.attr-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, var(--gold-bright) 8px 10px);
}
.attr-fill.mint {
  background: repeating-linear-gradient(90deg, var(--emerald) 0 8px, #25b878 8px 10px);
}

/* ==========================================================================
   QUEST LOG: WORK EXPERIENCE, EDUCATION, ORG, SKILLS
   ========================================================================== */
.quest-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 30px;
}
.quest-panel {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow);
  padding: 28px;
  margin-bottom: 26px;
}
.quest-panel:last-child { margin-bottom: 0; }
.quest-panel--highlight {
  background: #FFF9E9;
}
.quest-panel-title {
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px dashed var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.quest-entry {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(22, 24, 38, 0.12);
}
.quest-entry:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.quest-logo {
  width: 56px;
  height: 56px;
  border: 3px solid var(--ink);
  background: #ffffff;
  box-shadow: 3px 3px 0 var(--ink);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quest-logo img { width: 100%; height: 100%; object-fit: cover; }

.quest-badge-active,
.quest-badge-period {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 4px 8px;
  margin-bottom: 7px;
}
.quest-badge-active { background: var(--emerald); }
.quest-badge-period { background: var(--gold-bright); }

.quest-details {
  min-width: 0;
  flex: 1;
}
.quest-details h4 {
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 2px;
}
.quest-org {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--crimson);
  margin-bottom: 4px;
}
.quest-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.quest-desc {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.62;
}
.px-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.px-tag {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--panel-dark);
  color: var(--gold-bright);
  padding: 4px 11px;
  border: 2px solid var(--ink);
}

/* Inventory / Technical Skills */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 20px;
}
.inv-slot {
  background: var(--surface-warm);
  border: 3px solid var(--ink);
  box-shadow: var(--px-bevel), 3px 3px 0px var(--ink);
  padding: 12px 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform .1s steps(2), background .15s ease;
}
.inv-slot:hover {
  transform: translate(-2px, -2px);
  background: #FFF7DC;
  box-shadow: var(--px-bevel), 5px 5px 0 var(--ink);
}
.inv-slot img { width: 32px; height: 32px; object-fit: contain; }
.inv-slot span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.inv-lvl-bar {
  width: 85%;
  height: 6px;
  background: #D6CEBE;
  border: 1.5px solid var(--ink);
  overflow: hidden;
}
.inv-lvl-fill {
  height: 100%;
  background: var(--emerald);
}

/* ==========================================================================
   PROJECTS FILTER & CARDS
   ========================================================================== */
.quest-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filter-tab {
  font-family: var(--font-pixel);
  font-size: 9.5px;
  padding: 9px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .1s steps(2), background .12s ease;
}
.filter-tab:hover {
  transform: translate(-1px, -1px);
  background: var(--surface-sky);
}
.filter-tab.active {
  background: var(--crimson);
  color: var(--text-light);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.25), 4px 4px 0 var(--ink);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.project-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow);
  display: flex;
  flex-direction: column;
  transition: transform .14s steps(3), box-shadow .14s steps(3);
}
.project-card.is-hidden {
  display: none;
}
.project-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--px-bevel), var(--px-shadow-lg);
}
.project-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--panel-dark);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.project-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.project-card:hover .project-thumb-wrap img {
  transform: scale(1.03);
}
.project-stage-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--crimson);
  color: var(--text-light);
  font-family: var(--font-pixel);
  font-size: 8.5px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0px var(--ink);
}
.project-status-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--emerald);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 8.5px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0px var(--ink);
}
.project-metric-chip {
  position: absolute;
  bottom: 10px; left: 12px;
  background: rgba(22, 24, 38, 0.9);
  color: var(--gold-bright);
  font-family: var(--font-pixel);
  font-size: 8.5px;
  padding: 6px 10px;
  border: 2px solid var(--gold-bright);
  box-shadow: 3px 3px 0 var(--ink);
}
.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-body h3 {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.25;
}
.project-body p {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 18px;
}
.project-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  margin-bottom: 20px;
}
.project-tags-wrap span {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--surface-sky);
  color: var(--ink);
  padding: 4px 10px;
  border: 2px solid var(--ink);
}

/* ==========================================================================
   CERTIFICATES / ACHIEVEMENTS
   ========================================================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.cert-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .14s steps(2), box-shadow .14s steps(2);
}
.cert-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--px-bevel), var(--px-shadow);
}
.cert-thumb-box {
  aspect-ratio: 16 / 10;
  background: var(--panel-dark);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.cert-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s ease;
}
.cert-thumb-box:hover img {
  transform: scale(1.03);
}
.cert-zoom-tag {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(22, 24, 38, 0.88);
  color: var(--gold-bright);
  border: 2px solid var(--surface);
  font-family: var(--font-pixel);
  font-size: 7.5px;
  padding: 4px 7px;
}
.cert-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.cert-body h4 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.3;
}
.cert-issuer {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 14px;
}
.cert-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cert-link-btn {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface-warm);
  border: 2px solid var(--ink);
  transition: background .12s ease;
}
.cert-link-btn:hover {
  background: var(--gold-bright);
}

/* ==========================================================================
   SAVE POINT: CONTACT TERMINAL
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.contact-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.contact-pill-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-navy);
  border: 3px solid var(--surface);
  box-shadow: 4px 4px 0px var(--gold);
  padding: 13px 20px;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  transition: transform .1s steps(2), background .15s ease;
}
.contact-pill-btn:hover {
  background: var(--crimson);
  transform: translate(-2px, -2px);
}
.contact-pill-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-pill-left svg { width: 18px; height: 18px; stroke: var(--gold-bright); }

.contact-form-box {
  background: var(--surface);
  color: var(--ink);
  border: 4px solid var(--gold);
  outline: 3px solid var(--ink);
  box-shadow: 8px 8px 0px var(--panel-darker);
  padding: 28px;
}
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  color: var(--ink);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 3px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--surface-warm);
  color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus {
  background: #ffffff;
}
.form-field textarea { min-height: 105px; resize: vertical; }
.form-feedback-modal {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  background: #d1fae5;
  border: 2px solid var(--ink);
  color: #065f46;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   SUBPAGES: HERO, CASE STUDY, EXPERIENCE, ORGANIZATION
   ========================================================================== */
.sub-hero {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 65%, var(--sky-low) 100%);
  border-bottom: 4px solid var(--ink);
  padding: 46px 0 0;
  position: relative;
  overflow: hidden;
}
.sub-hero-inner {
  position: relative;
  z-index: 4;
  padding-bottom: 38px;
}

.proj-hero-box,
.exp-hero-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow-lg);
  padding: 28px 30px;
  margin-bottom: 26px;
}
.proj-badge,
.role-badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  background: var(--crimson);
  color: var(--text-light);
  padding: 6px 12px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 14px;
}
.role-badge--active {
  background: var(--emerald);
  color: var(--ink);
}
.proj-hero-box h1,
.exp-hero-info h1 {
  font-size: clamp(26px, 4.2vw, 42px);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 10px;
}
.proj-hero-box .subtitle {
  font-size: 15.5px;
  color: var(--text-body);
  line-height: 1.65;
  max-width: 860px;
}

.exp-hero-header {
  display: flex;
  align-items: center;
  gap: 24px;
}
.exp-hero-header + .exp-hero-header {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 3px dashed var(--ink);
}
.exp-hero-logo {
  width: 86px;
  height: 86px;
  flex-shrink: 0;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exp-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.org-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--crimson);
  margin-bottom: 6px;
}
.period-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--surface-warm);
  border: 2px solid var(--ink);
  padding: 5px 11px;
}

/* Showcase Dashboard Card */
.showcase-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow-lg);
  margin-bottom: 26px;
  cursor: pointer;
  transition: transform .14s steps(2);
}
.showcase-card:hover {
  transform: translate(-2px, -2px);
}
.showcase-img-wrap {
  background: var(--panel-darker);
  border-bottom: 3px solid var(--ink);
  max-height: 520px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.showcase-img-wrap img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}
.showcase-caption {
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.showcase-caption > div {
  flex: 1 1 360px;
  min-width: 0;
}
.showcase-caption h3 {
  font-size: 21px;
  color: var(--ink);
  margin-bottom: 4px;
}
.showcase-caption p {
  font-size: 14px;
  color: var(--text-body);
}

/* Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.metric-box {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow-sm);
  padding: 18px 16px;
  text-align: center;
}
.metric-box .num,
.metric-box .metric-num {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--crimson);
  margin-bottom: 7px;
  line-height: 1.3;
}
.metric-box .lbl,
.metric-box .metric-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

/* Detail Grid & Cards */
.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.detail-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow);
  padding: 28px;
  margin-bottom: 26px;
}
.detail-card:last-child { margin-bottom: 0; }
.detail-card h3 {
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 11px;
  border-bottom: 3px dashed var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-card h3 .star { color: var(--crimson); }
.detail-card p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.72;
  margin-bottom: 14px;
}
.detail-card p:last-child { margin-bottom: 0; }
.detail-card code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-sky);
  border: 1.5px solid var(--ink);
  padding: 1px 6px;
  color: var(--ink);
}

.insights-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.insight-tile {
  background: var(--surface-sky);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 16px;
}
.insight-tile b {
  display: block;
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--crimson);
  margin-bottom: 6px;
}
.insight-tile span {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.58;
  display: block;
}

.highlights-summary-box {
  background: #FFF9E9;
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 18px 20px;
  margin-top: 16px;
}
.highlights-summary-box h4 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 10px;
}
.highlights-summary-box li {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 7px;
  padding-left: 16px;
  position: relative;
}
.highlights-summary-box li::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 9px;
  color: var(--crimson);
}
.highlights-summary-box li:last-child { margin-bottom: 0; }

/* SQL Terminal Code Box */
.sql-code-box {
  background: var(--panel-darker);
  color: #E2E8F0;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 14px 0;
  white-space: pre;
}
.sql-kw { color: #FF7B72; font-weight: 700; }
.sql-fn { color: #FFD166; font-weight: 700; }
.sql-tbl { color: #38E59A; }
.sql-num { color: #79C0FF; }

/* Galleries on Subpages */
.gallery-grid,
.sql-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.gallery-item,
.sql-gallery-item,
.gallery-card {
  background: var(--surface);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .12s steps(2), box-shadow .12s steps(2);
}
.gallery-item:hover,
.sql-gallery-item:hover,
.gallery-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.gallery-thumb,
.sql-gallery-thumb,
.gallery-img-wrap {
  aspect-ratio: 16 / 10;
  background: var(--panel-dark);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  position: relative;
}
.gallery-thumb img,
.sql-gallery-thumb img,
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--gold-bright);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 7.5px;
  padding: 4px 8px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.gallery-lbl,
.sql-gallery-lbl {
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-warm);
}
.gallery-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.gallery-card-body h4 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
}
.gallery-card-body p {
  font-size: 13.5px;
  color: var(--text-body);
  margin-bottom: 12px;
}
.gallery-card-footer {
  padding: 12px 14px;
  background: var(--surface-warm);
}
.gallery-zoom-prompt {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson);
}
.gallery-zoom-prompt svg { width: 15px; height: 15px; }

/* Pillar / Program Cards (Experience & Organization) */
.exp-pillars-list,
.org-programs-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 28px;
}
.pillar-card,
.program-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow);
  padding: 28px;
}
.pillar-head,
.program-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 3px dashed var(--ink);
}
.pillar-num,
.program-num {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: var(--crimson);
  color: var(--text-light);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-pixel);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-head h3,
.program-head h3 {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 6px;
}
.pillar-head p,
.program-head p {
  font-size: 14.5px;
  color: var(--text-body);
}
.pillar-subgrid,
.program-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.pillar-subitem,
.prog-subitem {
  background: var(--surface-sky);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dot-point {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  background: var(--gold);
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.pillar-subitem b,
.prog-subitem b {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}
.pillar-subitem span,
.prog-subitem span {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.55;
  display: block;
}

/* Sidebar Cards */
.side-card {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-bevel), var(--px-shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.side-card h4 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 3px dashed var(--ink);
}
.side-item { margin-bottom: 13px; }
.side-item:last-child { margin-bottom: 0; }
.side-item .lbl {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--crimson);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.side-item .val {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list span {
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-sky);
  color: var(--ink);
  padding: 4px 10px;
  border: 2px solid var(--ink);
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 19, 33, 0.92);
  z-index: 800;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox-modal.active { display: flex; }
.lightbox-content {
  background: var(--panel-dark);
  border: 4px solid var(--surface);
  outline: 4px solid var(--ink);
  box-shadow: 10px 10px 0px var(--ink);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--crimson);
  color: var(--text-light);
  border: 2px solid var(--surface);
  box-shadow: 2px 2px 0 var(--ink);
  width: 36px; height: 36px;
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.lightbox-close:hover { background: var(--gold); color: var(--ink); }
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-img-box {
  width: 100%;
  background: #0b0e18;
  display: flex;
  justify-content: center;
  border-bottom: 3px solid var(--surface);
}
.lightbox-img-box img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
}
.lightbox-details { padding: 20px 24px; color: var(--text-light); }
.lightbox-details h3 { font-size: 20px; color: var(--gold-bright); margin-bottom: 6px; }
.lightbox-details p { font-size: 14px; color: var(--text-light-sub); line-height: 1.6; }

/* ==========================================================================
   BOTTOM CTA, FOOTER & TO-TOP
   ========================================================================== */
.bottom-cta {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 16px, transparent 16px 32px),
    linear-gradient(180deg, var(--grass-mid) 0%, var(--grass-dark) 100%);
  color: var(--text-light);
  padding: 64px 0;
  text-align: center;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}
.bottom-cta h2 {
  font-size: clamp(26px, 3.8vw, 38px);
  margin-bottom: 10px;
  text-shadow: 3px 3px 0px var(--ink);
}
.bottom-cta p {
  max-width: 600px;
  margin: 0 auto 24px;
  font-size: 15.5px;
  color: #ECFDF5;
}
.bottom-cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

footer {
  background: var(--panel-darker);
  color: var(--text-light);
  padding: 32px 0;
  border-top: 4px solid var(--gold);
}
.footer-inner,
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-logo {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--gold-bright);
}
.footer-links,
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light-sub);
}
.footer-links a:hover,
.foot-links a:hover { color: var(--gold-bright); }
.footer-copy,
.foot-note { font-size: 12.5px; color: var(--ink-muted); }

.totop {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--crimson);
  color: var(--text-light);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0px var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .1s steps(2);
  z-index: 500;
}
.totop.show { opacity: 1; visibility: visible; }
.totop:hover {
  transform: translate(-2px, -2px);
  background: var(--gold);
  color: var(--ink);
}
.totop svg { width: 20px; height: 20px; }

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s steps(4);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pixel-stars, .cloud, .hud-dot, .arcade-menu-cursor { animation: none !important; }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 960px) {
  .player-grid { grid-template-columns: 1fr; }
  .quest-columns { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .pixel-menu-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 24px;
  }
  .attr-bars { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }
  .nav-inner { gap: 8px; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--panel-dark);
    padding: 16px 24px;
    border-bottom: 4px solid var(--gold);
    gap: 8px;
  }
  .nav-links.mobile-open { display: flex; }
  .mobile-toggle { display: block; flex-shrink: 0; }
  .nav-breadcrumbs { display: none; }
  .nav-logo-text { display: none; }
  .nav-cta { gap: 6px; }
  .sfx-toggle { font-size: 7.5px; padding: 6px 8px; }
  .nav-cta .px-btn { padding: 7px 10px !important; font-size: 11.5px !important; }

  .section-pad { padding: 54px 0; }
  .inventory-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-mini-grid { grid-template-columns: 1fr; }
  .insights-list { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .quest-panel, .rpg-dialog-box, .contact-form-box, .detail-card, .side-card, .pillar-card, .program-card, .proj-hero-box, .exp-hero-card {
    padding: 20px 16px;
  }
  .quest-entry { flex-direction: column; gap: 12px; }
  .quest-badge-active, .quest-badge-period { font-size: 7.5px; line-height: 1.5; }
  .px-btn { white-space: normal; text-align: center; }
  .nav-cta .px-btn { white-space: nowrap; }

  .hero-hud-inner { padding: 8px 10px; gap: 6px; }
  .hud-group { gap: 8px; }
  .hud-item { font-size: 7px; }
  .hero-level-pill { font-size: 7.5px; padding: 6px 10px; max-width: 100%; }
  .hero-sub-100 { font-size: 10px; padding: 8px 14px; }
  .hero-sub-tag { font-size: 7.5px; padding: 8px 10px; }
  .hero-sky-content { padding: 34px 16px 106px; }
  .hero-grass-stage {
    margin-top: -38px;
    padding: 72px 14px 38px;
  }
  .hero-grass-fill {
    top: 160px;
    background: linear-gradient(180deg, rgba(20, 48, 37, 0) 0%, #143025 55px, #143025 100%);
    z-index: 2;
  }
  .hero-grass-img {
    inset: auto;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background-size: 1100px auto;
  }
  .hero-horizon-anchor { top: 52px; }
  .hero-prop-house { left: 10px; width: 106px; }
  .hero-prop-mage { right: 12px; width: 76px; }

  .pixel-menu-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 24px;
  }
  .arcade-menu-box {
    padding: 14px 12px;
    outline-width: 3px;
    box-shadow: 5px 5px 0 var(--ink);
    max-width: 100%;
  }
  .arcade-menu-prompt { font-size: 8px; }
  .arcade-menu-link {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    padding: 9px 8px;
    gap: 8px;
  }
  .arcade-menu-link-left { gap: 8px; min-width: 0; flex: 1; }
  .arcade-menu-tag {
    font-size: 10px;
    padding: 2px 6px;
    flex-shrink: 0;
  }
  .arcade-menu-preview { font-size: 12.5px; flex-wrap: wrap; }
  .hero-portrait-card { max-width: 240px; }
  .hero-bottom-credits { display: none; }
  .exp-hero-header { flex-direction: column; align-items: flex-start; }
  .pillar-head, .program-head { flex-direction: column; }
  .arcade-menu-hint { display: none; }
}
