/* ═══════════════════════════════════════════════════════════════
   NEO-BRUTALIST ARCADE — DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --mint:     #98FFD6;
  --lemon:    #FFF07C;
  --coral:    #FF6F61;
  --hotpink:  #FF69B4;
  --electric: #00CFFF;
  --black:    #111111;
  --white:    #FAFAFA;
  --off-white:#F0EDE6;
  --grey:     #333333;

  --border:   4px solid var(--black);
  --border-thick: 6px solid var(--black);
  --shadow:   6px 6px 0 var(--black);
  --shadow-lg:10px 10px 0 var(--black);
  --shadow-sm:3px 3px 0 var(--black);

  --font-display: 'Bungee', cursive;
  --font-display-shade: 'Bungee Shade', cursive;
  --font-serif: 'DM Serif Display', serif;
  --font-mono:  'Space Mono', monospace;

  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --hud-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-height) + 16px);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-mono);
  background: var(--off-white);
  color: var(--black);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   LEVEL LOADER OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.level-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.level-loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  z-index: 2;
}

.loader-label {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: var(--lemon);
  margin-bottom: 24px;
  animation: loaderPulse 1s infinite alternate;
}

@keyframes loaderPulse {
  0%   { opacity: 1; }
  100% { opacity: 0.4; }
}

.loader-bar-track {
  width: 320px;
  max-width: 80vw;
  height: 28px;
  border: var(--border);
  border-color: var(--lemon);
  background: transparent;
  position: relative;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--mint);
  transition: width 0.15s linear;
}

.loader-tip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--electric);
  margin-top: 16px;
  opacity: 0.8;
}

/* Scanlines */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  z-index: 1;
}

.scanlines--subtle {
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════
   HUD (TOP BAR)
   ═══════════════════════════════════════════════════════════════ */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hud-height);
  background: var(--lemon);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

.hud-logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--black);
  letter-spacing: 1px;
}

.hud-nav {
  display: flex;
  gap: 4px;
}

.hud-link {
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 6px 14px;
  border: 3px solid transparent;
  transition: all 0.25s var(--ease-bounce);
  letter-spacing: 0.5px;
}

.hud-link:hover,
.hud-link.active {
  border-color: var(--black);
  background: var(--mint);
  transform: scale(1.08);
  box-shadow: var(--shadow-sm);
}

.hud-right {
  display: flex;
  align-items: center;
}

.coin-counter {
  font-family: var(--font-display);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--black);
  color: var(--lemon);
  padding: 6px 14px;
  border: 3px solid var(--black);
}

.coin-icon {
  display: inline-block;
  animation: coinSpin 1.2s steps(6) infinite;
  font-size: 1.1rem;
}

@keyframes coinSpin {
  0%   { transform: rotateY(0deg);   }
  50%  { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

.coin-count {
  min-width: 2ch;
  text-align: right;
}

/* coin pop animation */
.coin-counter.pop {
  animation: coinPop 0.5s var(--ease-bounce);
}

@keyframes coinPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   DAILY QUEST WIDGET
   ═══════════════════════════════════════════════════════════════ */
.quest-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 260px;
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow);
  z-index: 900;
  font-size: 0.8rem;
  transition: transform 0.35s var(--ease-bounce);
}

.quest-widget.minimized .quest-body {
  display: none;
}

.quest-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--coral);
  border-bottom: var(--border);
  font-family: var(--font-display);
  font-size: 0.7rem;
}

.quest-icon { font-size: 1.1rem; }
.quest-title { flex: 1; letter-spacing: 1px; }

.quest-toggle {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  transition: transform 0.3s var(--ease-bounce);
}

.quest-widget.minimized .quest-toggle {
  transform: rotate(180deg);
}

.quest-close {
  background: var(--black);
  border: none;
  color: var(--white);
  font-size: 0.75rem;
  font-family: var(--font-display);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
  line-height: 1;
}

.quest-close:hover {
  background: var(--coral);
  transform: scale(1.2) rotate(90deg);
}

/* Dismissed state — slides off to the right */
.quest-widget.closed {
  transform: translateX(320px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out), opacity 0.3s ease;
}

.quest-body {
  padding: 12px;
}

.quest-desc {
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: 0.75rem;
}

.quest-progress-track {
  height: 16px;
  border: 3px solid var(--black);
  background: var(--off-white);
  margin-bottom: 6px;
}

.quest-progress-fill {
  height: 100%;
  background: var(--mint);
  transition: width 0.5s var(--ease-bounce);
}

.quest-counter {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-align: right;
}

.quest-badge {
  padding: 14px;
  text-align: center;
  background: var(--lemon);
  border-top: var(--border);
  animation: badgeBounce 0.8s var(--ease-bounce);
}

.badge-icon { font-size: 2rem; display: block; margin-bottom: 4px; }
.badge-text {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1px;
}

@keyframes badgeBounce {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  50%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

.quest-widget.completed {
  border-color: var(--mint);
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS - SHARED
   ═══════════════════════════════════════════════════════════════ */
.section {
  padding: 100px 0 80px;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--coral);
  margin-bottom: 8px;
  display: inline-block;
  padding: 4px 12px;
  border: 3px solid var(--coral);
  background: var(--white);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 40px;
}

.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--coral);
}

/* Section reveal animation */
.section .container {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.section.visible .container {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   HERO — TWO COLUMN LAYOUT + PHOTO FRAME
   ═══════════════════════════════════════════════════════════════ */
.section--hero {
  background: var(--black);
  color: var(--white);
  padding-top: var(--hud-height);
  overflow: hidden;
  align-items: stretch;
}

/* Two-column split */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

/* ── LEFT COLUMN ── */
.hero-text-col {
  text-align: left;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--coral);
  margin-bottom: 16px;
  padding: 5px 14px;
  border: 2px solid var(--coral);
  display: inline-block;
  animation: heroSlideIn 0.6s var(--ease-bounce) 0.1s both;
}

.hero-title {
  font-family: var(--font-display-shade);
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.92;
  margin-bottom: 20px;
}

.hero-line {
  display: block;
}

.hero-line--1 {
  color: var(--mint);
  animation: heroSlideIn 0.8s var(--ease-bounce) 0.3s both;
}

.hero-line--2 {
  color: var(--lemon);
  animation: heroSlideIn 0.8s var(--ease-bounce) 0.5s both;
}

@keyframes heroSlideIn {
  0%   { opacity: 0; transform: translateX(-50px) scaleX(0.8); }
  100% { opacity: 1; transform: translateX(0) scaleX(1); }
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: clamp(0.6rem, 1.5vw, 0.85rem);
  letter-spacing: 3px;
  color: var(--electric);
  margin-bottom: 28px;
  animation: heroSlideIn 0.8s var(--ease-bounce) 0.65s both;
}

/* Mini stat bar */
.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  animation: heroSlideIn 0.8s var(--ease-bounce) 0.75s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-val {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--lemon);
  line-height: 1;
}

.hero-stat-key {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--electric);
  opacity: 0.7;
}

.hero-stat-sep {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.15);
  line-height: 1;
}

.hero-coin-slot {
  margin-bottom: 24px;
  animation: heroSlideIn 0.8s var(--ease-bounce) 0.9s both;
}

.hero-blink {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--coral);
  animation: blink 1s steps(2) infinite;
  letter-spacing: 4px;
}

@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
}

/* ── RIGHT COLUMN — PHOTO FRAME ── */
.hero-photo-col {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: photoSlideIn 1s var(--ease-bounce) 0.4s both;
}

@keyframes photoSlideIn {
  0%   { opacity: 0; transform: translateX(60px) scale(0.85); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

.hero-photo-outer {
  position: relative;
  display: inline-block;
  animation: photoFloat 4s ease-in-out infinite;
}

@keyframes photoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* Rotating dashed ring */
.hero-photo-ring {
  position: absolute;
  inset: -28px;
  border: 3px dashed var(--mint);
  border-radius: 0;
  opacity: 0.4;
  animation: ringRotate 12s linear infinite;
  pointer-events: none;
}

@keyframes ringRotate {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.03); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Pixel corner decorations */
.hero-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--lemon);
  border-style: solid;
  z-index: 3;
}

.hero-corner--tl { top: -6px; left: -6px; border-width: 4px 0 0 4px; }
.hero-corner--tr { top: -6px; right: -6px; border-width: 4px 4px 0 0; }
.hero-corner--bl { bottom: -6px; left: -6px; border-width: 0 0 4px 4px; }
.hero-corner--br { bottom: -6px; right: -6px; border-width: 0 4px 4px 0; }

/* Main photo frame */
.hero-photo-frame {
  width: clamp(260px, 30vw, 380px);
  height: clamp(300px, 38vw, 460px);
  border: 6px solid var(--white);
  box-shadow: 12px 12px 0 var(--mint), 18px 18px 0 var(--black);
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  cursor: pointer;
}

.hero-photo-frame:hover {
  animation: glitchFrame 0.35s steps(2) 1;
}

@keyframes glitchFrame {
  0%  { box-shadow: 12px 12px 0 var(--coral), 18px 18px 0 var(--black); clip-path: inset(0 0 60% 0); }
  25% { box-shadow: -8px 12px 0 var(--electric), 18px 18px 0 var(--black); clip-path: inset(40% 0 0 0); transform: translate(4px, 0); }
  50% { box-shadow: 12px -6px 0 var(--hotpink), 18px 18px 0 var(--black); clip-path: inset(0); transform: translate(-4px, 0); }
  100%{ box-shadow: 12px 12px 0 var(--mint), 18px 18px 0 var(--black); clip-path: inset(0); transform: translate(0, 0); }
}

/* Actual photo */
.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: contrast(1.05) saturate(1.1);
  transition: filter 0.4s ease;
}

.hero-photo-frame:hover .hero-photo-img {
  filter: contrast(1.15) saturate(0.2) hue-rotate(20deg);
}

/* Fallback when no photo */
.hero-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a2a1a, #0d1a0d);
  gap: 12px;
}

.hero-fallback-initials {
  font-family: var(--font-display-shade);
  font-size: 6rem;
  color: var(--mint);
  line-height: 1;
}

.hero-fallback-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(152, 255, 214, 0.4);
  letter-spacing: 2px;
}

/* Scanner line */
.hero-photo-scanner {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--mint), var(--electric), transparent);
  animation: scannerSlide 3s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes scannerSlide {
  0%   { top: -4px; opacity: 0; }
  5%   { opacity: 0.8; }
  95%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

/* P1 Badge */
.hero-photo-badge {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 48px;
  height: 48px;
  background: var(--coral);
  border: 4px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  box-shadow: 3px 3px 0 var(--black);
  animation: badgePop 0.6s var(--ease-bounce) 1.2s both;
}

.hero-photo-badge span {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--white);
  letter-spacing: 1px;
}

@keyframes badgePop {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

/* XP bar under photo */
.hero-photo-xpbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.hero-xp-label,
.hero-xp-val {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--lemon);
}

.hero-xp-track {
  flex: 1;
  height: 14px;
  border: 3px solid var(--lemon);
  background: transparent;
  overflow: hidden;
}

.hero-xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mint), var(--electric));
  animation: xpFill 2.5s var(--ease-bounce) 1.5s forwards;
}

@keyframes xpFill {
  0%   { width: 0%; }
  100% { width: 95%; }
}

/* Hero grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(152, 255, 214, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(152, 255, 214, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridScroll 5s linear infinite;
}

@keyframes gridScroll {
  0%   { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text-col {
    text-align: center;
    order: 2;
  }
  .hero-photo-col {
    order: 1;
  }
  .hero-stats-row {
    justify-content: center;
  }
  .hero-photo-frame {
    width: clamp(220px, 60vw, 320px);
    height: clamp(260px, 72vw, 380px);
  }
  .hero-photo-ring {
    inset: -18px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2.5rem, 14vw, 5rem);
  }
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS (SHARED)
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 12px 28px;
  background: var(--lemon);
  color: var(--black);
  box-shadow: var(--shadow);
  transition: all 0.3s var(--ease-bounce);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--black);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--black);
}

.btn--arcade {
  background: var(--mint);
  font-size: 1rem;
  padding: 16px 36px;
}

.btn--skill {
  font-size: 0.65rem;
  padding: 8px 18px;
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

.btn--skill.active {
  background: var(--mint);
}

.btn--buy {
  background: var(--coral);
  color: var(--white);
}

.btn--buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow);
}

.btn--buy:disabled:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.btn--send {
  background: var(--mint);
  width: 100%;
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.about-card {
  border: var(--border-thick);
  background: var(--off-white);
  box-shadow: var(--shadow-lg);
}

.about-card--avatar {
  text-align: center;
}

.avatar-frame {
  padding: 24px;
}

.avatar-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  background: var(--mint);
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: avatarIdle 2s steps(3) infinite;
}

.avatar-char {
  font-family: var(--font-display-shade);
  font-size: 5rem;
  color: var(--black);
}

/* Real photo — drop photo.jpg into the project folder */
.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0;
}

@keyframes avatarIdle {
  0%, 100% { transform: translateY(0); }
  33%      { transform: translateY(-4px); }
  66%      { transform: translateY(4px); }
}

.avatar-stats {
  border-top: var(--border);
  padding: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.75rem;
  border-bottom: 2px dashed rgba(0,0,0,0.15);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1px;
}

.stat-val {
  font-weight: 700;
}

.hp-bar {
  display: inline-block;
  width: 80px;
  height: 14px;
  border: 2px solid var(--black);
  background: var(--off-white);
  position: relative;
}

.hp-fill {
  display: block;
  height: 100%;
  width: 85%;
  background: var(--mint);
  animation: hpPulse 3s ease infinite;
}

@keyframes hpPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

.about-card--bio {
  padding: 32px;
}

.about-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 16px;
  display: inline-block;
  padding: 4px 12px;
  background: var(--lemon);
  border: 3px solid var(--black);
}

.about-text {
  font-size: 0.9rem;
  margin-bottom: 16px;
  max-width: 540px;
}

.about-text strong {
  color: var(--coral);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  padding: 6px 14px;
  border: 3px solid var(--black);
  background: var(--electric);
  color: var(--black);
  letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease-bounce);
}

.tag:hover {
  transform: rotate(-3deg) scale(1.08);
  background: var(--hotpink);
  color: var(--white);
}

.tag--sm {
  font-size: 0.55rem;
  padding: 4px 10px;
  box-shadow: 2px 2px 0 var(--black);
}

/* ═══════════════════════════════════════════════════════════════
   EXPERIENCE SECTION
   ═══════════════════════════════════════════════════════════════ */
.section--experience {
  background: var(--off-white);
}

.experience-timeline {
  position: relative;
  border-left: var(--border-thick);
  margin-left: 20px;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -15px; /* Centers the 24px dot on the 6px thick line (left border) */
  top: 24px;
  width: 24px;
  height: 24px;
  background: var(--lemon);
  border: 3px solid var(--black);
  border-radius: 50%;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.timeline-item:nth-child(even) .timeline-dot {
  background: var(--mint);
}

.timeline-card {
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-left: 36px;
  position: relative;
  transition: all 0.3s var(--ease-bounce);
}

.timeline-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-lg);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--black);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--lemon);
  border: 3px solid var(--black);
  padding: 4px 10px;
  box-shadow: 2px 2px 0 var(--black);
  letter-spacing: 0.5px;
}

.timeline-item:nth-child(even) .timeline-date {
  background: var(--mint);
}

.timeline-company {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--coral);
  margin-bottom: 12px;
}

.timeline-location {
  font-weight: 400;
  opacity: 0.7;
  color: var(--black);
  margin-left: 4px;
}

.timeline-bullets {
  list-style: none;
  font-size: 0.82rem;
  line-height: 1.6;
  padding-left: 0;
}

.timeline-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.timeline-bullets li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: var(--black);
  font-size: 0.65rem;
  top: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   SKILLS / RADAR CHART
   ═══════════════════════════════════════════════════════════════ */
.section--skills {
  background: var(--lemon);
}

.skills-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}

#radar-chart {
  max-width: 100%;
  height: auto;
}

/* ── CORE COMPETENCIES ── */
.competencies-section {
  margin-top: 56px;
  width: 100%;
}

.competencies-subtitle {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--black);
  margin-bottom: 28px;
  text-align: center;
  letter-spacing: 1px;
}

.competencies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.competency-card {
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: all 0.3s var(--ease-bounce);
}

.competency-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-lg);
  background: var(--mint);
}

.competency-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--black);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.competency-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--black);
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS / GAME CARTRIDGES
   ═══════════════════════════════════════════════════════════════ */
.section--projects {
  background: var(--off-white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow);
  transition: all 0.35s var(--ease-bounce);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translate(-5px, -5px) rotate(-1deg);
  box-shadow: 14px 14px 0 var(--black);
}

.project-card:active {
  transform: translate(2px, 2px) rotate(0deg);
  box-shadow: 2px 2px 0 var(--black);
}

.project-card.clicked {
  animation: cardFlash 0.4s ease;
}

@keyframes cardFlash {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.5); background: var(--lemon); }
  100% { filter: brightness(1); }
}

.card-screen {
  height: 160px;
  border-bottom: var(--border);
  overflow: hidden;
}

.card-screen-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-bounce);
}

.project-card:hover .card-screen-inner {
  transform: scale(1.1) rotate(2deg);
}

.card-icon {
  font-size: 3.5rem;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3));
}

.card-label-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: var(--border);
  background: var(--black);
  color: var(--white);
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.card-genre {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--electric);
}

.card-desc {
  padding: 14px 16px;
  font-size: 0.78rem;
  line-height: 1.6;
}

.card-tags {
  padding: 0 16px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-links {
  padding: 0 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn--project-link {
  font-family: var(--font-display);
  font-size: 0.6rem;
  padding: 6px 12px;
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease-bounce);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--project-link:hover {
  background: var(--mint);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--black);
}

.btn--project-link:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 var(--black);
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT / COIN GATE
   ═══════════════════════════════════════════════════════════════ */
.section--contact {
  background: var(--mint);
}

.contact-gate {
  display: flex;
  justify-content: center;
}

.gate-box {
  text-align: center;
  padding: 48px 56px;
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
}

.gate-prompt {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.gate-sub {
  font-size: 0.75rem;
  margin-bottom: 24px;
  opacity: 0.7;
}

.gate-coin-display {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.coin-icon-lg {
  font-size: 2.2rem;
  animation: coinSpin 1.2s steps(6) infinite;
}

.gate-coin-count {
  color: var(--coral);
}

.gate-coin-sep {
  opacity: 0.3;
}

/* Form */
.contact-form-wrap {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  animation: formReveal 0.6s var(--ease-bounce);
}

@keyframes formReveal {
  0%   { opacity: 0; transform: scale(0.8) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: var(--border);
  background: var(--off-white);
  outline: none;
  transition: all 0.25s var(--ease-bounce);
}

.form-input:focus {
  background: var(--lemon);
  box-shadow: var(--shadow);
  transform: translate(-2px, -2px);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 60px 0 32px;
  border-top: var(--border-thick);
  border-top-color: var(--lemon);
}

.footer-scores {
  text-align: center;
  margin-bottom: 40px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--lemon);
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.score-table {
  margin: 0 auto;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.score-table tr {
  border-bottom: 2px dashed rgba(255, 255, 255, 0.15);
}

.score-table td {
  padding: 10px 24px;
}

.score-rank {
  font-family: var(--font-display);
  color: var(--coral);
  letter-spacing: 1px;
}

.score-name {
  color: var(--mint);
}

.score-val {
  color: var(--lemon);
  text-align: right;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.footer-link {
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 8px 20px;
  border: 3px solid var(--white);
  letter-spacing: 1px;
  transition: all 0.3s var(--ease-bounce);
}

.footer-link:hover {
  background: var(--hotpink);
  border-color: var(--hotpink);
  color: var(--white);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--lemon);
}

.footer-copy {
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.5;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   CONFETTI CANVAS
   ═══════════════════════════════════════════════════════════════ */
#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hud-nav { display: none; }
  .hud-logo { font-size: 0.7rem; }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card--avatar {
    max-width: 300px;
    margin: 0 auto;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .experience-timeline {
    margin-left: 10px;
  }

  .timeline-card {
    margin-left: 24px;
    padding: 16px;
  }

  .timeline-dot {
    left: -13px;
    width: 20px;
    height: 20px;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .gate-box {
    padding: 32px 24px;
  }

  .quest-widget {
    width: 220px;
    right: 12px;
    bottom: 12px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 14vw, 5rem);
  }

  .section {
    padding: 80px 0 60px;
  }

  .competencies-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .coin-counter {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .gate-coin-display {
    font-size: 1.5rem;
  }

  .radar-wrap {
    padding: 16px;
  }

  .about-card--bio {
    padding: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   NAV TRANSITION OVERLAY (Section Transitions)
   ═══════════════════════════════════════════════════════════════ */
.nav-transition {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-transition.active {
  opacity: 1;
  pointer-events: all;
}

.nav-transition-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--lemon);
  letter-spacing: 3px;
  animation: loaderPulse 0.6s infinite alternate;
}

/* ═══════════════════════════════════════════════════════════════
   EXTRA SPRITE ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

/* Blinking cursor on hero */
.hero-sub::after {
  content: '█';
  animation: blink 0.8s steps(2) infinite;
  margin-left: 4px;
  color: var(--lemon);
}

/* Float-in for quest widget */
@keyframes questSlideIn {
  0%   { transform: translateX(300px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.quest-widget {
  animation: questSlideIn 0.6s var(--ease-bounce) 1.5s both;
}

/* Noise overlay for retro feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
