/* ==========================================================
   KEANE PARAS — 8-BIT PORTFOLIO
   Design tokens & global reset
   ========================================================== */

:root {
  /* NES-flavored palette */
  --bg: #0f0f23;
  --bg-2: #1a1a3e;
  --bg-3: #2a2a5e;
  --fg: #fcf4d6;
  --fg-dim: #c8b890;
  --fg-mute: #8a7e5c;
  --red: #e63946;
  --red-dark: #b32434;
  --cyan: #5fcde4;
  --green: #8bc34a;
  --purple: #c084fc;
  --orange: #fb923c;
  --yellow: #fde047;

  /* Pixel grid */
  --px: 4px;
  --border: 4px;

  /* Layout */
  --maxw: 1100px;
  --pad-x: clamp(16px, 4vw, 48px);
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: 0;
}

body {
  font-family: "VT323", "Courier New", monospace;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.4;
  font-size: 20px;
  overflow-x: hidden;
  image-rendering: pixelated;
  background-image:
    linear-gradient(var(--bg-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-2) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

/* Pixelated rendering everywhere it matters */
img,
svg,
.sprite,
.game-screen {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

button,
a {
  font-family: inherit;
}

/* ==========================================================
   CRT OVERLAYS
   ========================================================== */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.6;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* ==========================================================
   HUD
   ========================================================== */

.hud {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px var(--pad-x);
  background: var(--bg);
  border-bottom: var(--border) solid var(--fg);
  box-shadow: 0 6px 0 0 rgba(252, 244, 214, 0.18);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
}

.hud-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-left { justify-content: flex-start; }
.hud-center { justify-content: center; }
.hud-right { justify-content: flex-end; }

.hud-tag {
  background: var(--red);
  color: var(--fg);
  padding: 6px 8px;
  font-size: 10px;
  border: 2px solid var(--fg);
}

.hud-name {
  letter-spacing: 1px;
}

.hud-stage {
  background: var(--bg-2);
  padding: 8px 14px;
  border: 2px solid var(--fg);
  letter-spacing: 2px;
}

.hud-score {
  color: var(--yellow);
  letter-spacing: 2px;
  min-width: 9ch;
  text-align: right;
}

/* ==========================================================
   SCREEN CONTAINER
   ========================================================== */

.screen-container {
  position: relative;
}

.screen {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: calc(100vh - 60px);
  padding: clamp(40px, 8vh, 96px) var(--pad-x) clamp(40px, 8vh, 96px);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(14px, 2.2vw, 22px);
  margin-bottom: 32px;
  letter-spacing: 1px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 14px;
}

.st-prefix {
  color: var(--cyan);
}

.section-title::after {
  content: "";
  flex: 1;
  height: 4px;
  background:
    linear-gradient(to right, var(--fg) 0, var(--fg) 8px, transparent 8px, transparent 16px) 0 0/16px 4px repeat-x;
  opacity: 0.7;
  min-width: 60px;
}

/* ==========================================================
   HERO
   ========================================================== */

.hero {
  text-align: center;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.hero-frame {
  position: relative;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px);
  border: var(--border) solid var(--fg);
  background: var(--bg);
  box-shadow:
    inset 0 0 0 8px var(--bg),
    inset 0 0 0 12px var(--fg),
    0 0 0 4px var(--bg),
    0 0 32px rgba(95, 205, 228, 0.18);
}

.frame-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--red);
}
.frame-corner.tl { top: -4px; left: -4px; }
.frame-corner.tr { top: -4px; right: -4px; }
.frame-corner.bl { bottom: -4px; left: -4px; }
.frame-corner.br { bottom: -4px; right: -4px; }

.hero-eyebrow {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(10px, 1.4vw, 14px);
  color: var(--yellow);
  letter-spacing: 3px;
  margin-bottom: 16px;
  animation: hue-cycle 6s steps(4) infinite;
}

@keyframes hue-cycle {
  0%, 100% { color: var(--yellow); }
  25% { color: var(--cyan); }
  50% { color: var(--green); }
  75% { color: var(--orange); }
}

.hero-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(40px, 11vw, 120px);
  line-height: 1;
  letter-spacing: 4px;
  margin-bottom: 20px;
  color: var(--fg);
  text-shadow:
    4px 4px 0 var(--red),
    8px 8px 0 var(--bg-2);
}

.title-row {
  display: block;
  white-space: nowrap;
}

.title-row-2 {
  color: var(--cyan);
  text-shadow:
    4px 4px 0 var(--red),
    8px 8px 0 var(--bg-2);
}

.ch {
  display: inline-block;
  animation: ch-pop 0.4s steps(2) backwards;
  animation-delay: calc(var(--i) * 80ms);
}

@keyframes ch-pop {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.title-dot {
  color: var(--red);
  text-shadow: none;
  animation: blink 1s steps(2) infinite 1.2s;
}

.hero-tagline {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(10px, 1.4vw, 14px);
  color: var(--fg);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.caret {
  color: var(--green);
  animation: blink 1s steps(2) infinite;
}

.tagline-text {
  display: inline-block;
}

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

/* Hero status / avatar */
.hero-stage {
  margin-top: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  text-align: left;
  padding: 16px 20px;
  border: 2px dashed var(--fg-mute);
  background: var(--bg-2);
}

.hero-avatar {
  background: var(--bg);
  padding: 12px;
  border: 2px solid var(--fg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--fg);
}

.hero-avatar .sprite {
  width: clamp(80px, 12vw, 120px);
  height: clamp(80px, 12vw, 120px);
  display: block;
}

.hero-status {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(10px, 1.3vw, 12px);
  display: grid;
  gap: 12px;
}

.status-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 12px;
  align-items: center;
}

.status-key {
  color: var(--cyan);
  letter-spacing: 1px;
}

.status-val {
  color: var(--yellow);
  text-align: right;
}

.bar {
  position: relative;
  height: 12px;
  background: var(--bg);
  border: 2px solid var(--fg);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--green);
  width: 100%;
  background-image: linear-gradient(
    to right,
    var(--green) 0,
    var(--green) 6px,
    transparent 6px,
    transparent 12px
  );
  background-size: 12px 100%;
  animation: bar-shimmer 1.2s steps(2) infinite;
}

.bar-mp {
  background-color: var(--cyan);
  background-image: linear-gradient(
    to right,
    var(--cyan) 0,
    var(--cyan) 6px,
    transparent 6px,
    transparent 12px
  );
  background-size: 12px 100%;
  width: 60%;
}

@keyframes bar-shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 12px 0; }
}

/* PRESS START */
.press-start {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 18px 32px;
  background: var(--red);
  color: var(--fg);
  border: var(--border) solid var(--fg);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: 3px;
  cursor: pointer;
  position: relative;
  box-shadow:
    inset 0 0 0 4px var(--red),
    inset 0 0 0 8px var(--fg),
    6px 6px 0 0 var(--bg-3);
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2);
  animation: press-pulse 1.4s steps(3) infinite;
}

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

.press-start:hover,
.press-start:focus-visible {
  background: var(--yellow);
  color: var(--bg);
  outline: none;
  animation: none;
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 4px var(--yellow),
    inset 0 0 0 8px var(--fg),
    2px 2px 0 0 var(--bg-3);
}

.ps-pulse {
  animation: blink 0.8s steps(2) infinite;
}

/* MARQUEE */
.marquee {
  margin-top: 32px;
  border: var(--border) solid var(--fg);
  background: var(--red);
  color: var(--fg);
  overflow: hidden;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 10px 0;
}

.marquee-track {
  display: inline-flex;
  gap: 32px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  padding-left: 32px;
}

.marquee-track span {
  display: inline-block;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================
   ABOUT — Panels
   ========================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  background: var(--bg);
  border: var(--border) solid var(--fg);
  position: relative;
  box-shadow: 6px 6px 0 0 var(--bg-3);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 2px;
}

.ph-tag {
  background: var(--red);
  color: var(--fg);
  padding: 4px 6px;
  font-size: 10px;
}

.ph-title {
  flex: 1;
}

.panel-body {
  padding: 20px;
  font-size: 19px;
  line-height: 1.5;
}

.bio-panel { grid-column: 1 / 2; }
.stats-panel { grid-column: 2 / 3; }
.tools-panel { grid-column: 1 / 2; }
.now-panel { grid-column: 2 / 3; }

.bio-line {
  margin-bottom: 12px;
}

.bio-prompt {
  color: var(--green);
  margin-right: 6px;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
}

.bio-quote {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  color: var(--yellow);
  margin: 16px 0 16px 24px;
  padding-left: 12px;
  border-left: 4px solid var(--red);
}

.bio-quote em {
  font-style: normal;
  color: var(--cyan);
}

.bio-muted {
  color: var(--fg-mute);
}

/* Stats */
.stat {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
}

.stat-label {
  color: var(--cyan);
  letter-spacing: 1px;
  white-space: nowrap;
}

.stat-bar {
  height: 14px;
  background: var(--bg-2);
  border: 2px solid var(--fg);
  position: relative;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: var(--green);
  width: var(--p, 50%);
  background-image: linear-gradient(
    to right,
    var(--green) 0,
    var(--green) 6px,
    rgba(0, 0, 0, 0.25) 6px,
    rgba(0, 0, 0, 0.25) 12px
  );
  background-size: 12px 100%;
  animation: bar-shimmer 1.4s steps(2) infinite;
}

.stat-fill-hot {
  background-color: var(--red);
  background-image: linear-gradient(
    to right,
    var(--red) 0,
    var(--red) 6px,
    rgba(0, 0, 0, 0.25) 6px,
    rgba(0, 0, 0, 0.25) 12px
  );
  background-size: 12px 100%;
}

.stat-fill-cool {
  background-color: var(--cyan);
  background-image: linear-gradient(
    to right,
    var(--cyan) 0,
    var(--cyan) 6px,
    rgba(0, 0, 0, 0.25) 6px,
    rgba(0, 0, 0, 0.25) 12px
  );
  background-size: 12px 100%;
}

.stat-fill-low {
  background-color: var(--red);
  background-image: linear-gradient(
    to right,
    var(--red) 0,
    var(--red) 6px,
    rgba(0, 0, 0, 0.25) 6px,
    rgba(0, 0, 0, 0.25) 12px
  );
  background-size: 12px 100%;
  animation: bar-blink 0.8s steps(2) infinite;
}

@keyframes bar-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.stat-num {
  color: var(--yellow);
  text-align: right;
}

/* Tools */
.tool-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tool-item {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 8px 6px;
  text-align: center;
  background: var(--bg-2);
  border: 2px solid var(--fg-mute);
  color: var(--fg-dim);
  position: relative;
  transition: transform 0.1s steps(2);
}

.tool-item:hover {
  transform: translateY(-2px);
  cursor: default;
}

.tool-item[data-rarity="rare"] {
  border-color: var(--cyan);
  color: var(--cyan);
}
.tool-item[data-rarity="epic"] {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--bg);
}
.tool-item[data-rarity="legendary"] {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--bg);
  animation: legendary 1.6s steps(2) infinite;
}

@keyframes legendary {
  0%, 100% { box-shadow: 0 0 0 0 var(--yellow); }
  50% { box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.4); }
}

.tools-foot {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--fg-mute);
  text-align: center;
  margin-top: 8px;
}

/* Now */
.now-line {
  display: grid;
  grid-template-columns: 18px 110px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  padding: 4px 0;
}

.now-icon {
  color: var(--green);
  font-size: 10px;
}

.now-label {
  color: var(--cyan);
  letter-spacing: 1px;
  white-space: nowrap;
}

.now-val {
  color: var(--fg);
}

/* ==========================================================
   GAMES
   ========================================================== */

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

.game-card {
  background: var(--bg);
  border: var(--border) solid var(--fg);
  position: relative;
  box-shadow: 6px 6px 0 0 var(--bg-3);
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2);
  overflow: hidden;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 0 var(--bg-3);
  outline: none;
}

.game-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--border) solid var(--fg);
}

.game-screen::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}

.game-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0,
    rgba(0, 0, 0, 0.4) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
  pointer-events: none;
}

.game-screen-1 {
  background:
    radial-gradient(circle at 70% 30%, #c084fc 0 2px, transparent 3px),
    radial-gradient(circle at 30% 70%, #5fcde4 0 2px, transparent 3px),
    radial-gradient(circle at 80% 75%, #fde047 0 2px, transparent 3px),
    radial-gradient(circle at 20% 30%, #fcf4d6 0 1px, transparent 2px),
    radial-gradient(circle at 60% 60%, #fcf4d6 0 1px, transparent 2px),
    radial-gradient(circle at 40% 20%, #fcf4d6 0 1px, transparent 2px),
    radial-gradient(circle at 90% 50%, #fcf4d6 0 1px, transparent 2px),
    linear-gradient(180deg, #1a1a3e 0%, #2a1a5e 60%, #e63946 100%);
  background-size:
    100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%,
    100% 100%;
}

.game-screen-1::after {
  content: "";
  position: absolute;
  bottom: 16%;
  left: 0;
  right: 0;
  height: 20%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 12px,
      #5fcde4 12px,
      #5fcde4 14px
    );
  opacity: 0.4;
}

.game-screen-2 {
  background:
    linear-gradient(180deg, #5fcde4 0%, #8bc34a 60%, #5a3e1a 100%);
}
.game-screen-2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background:
    repeating-linear-gradient(
      90deg,
      #2d4a1a 0,
      #2d4a1a 6px,
      #4a6b2a 6px,
      #4a6b2a 14px,
      #2d4a1a 14px,
      #2d4a1a 22px,
      #1a2e0a 22px,
      #1a2e0a 28px
    );
}

.game-screen-3 {
  background:
    radial-gradient(ellipse at 50% 80%, #fb923c 0%, #c084fc 40%, #1a1a3e 80%);
}
.game-screen-3::after {
  content: "";
  position: absolute;
  top: 30%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--yellow);
  box-shadow:
    0 10px 0 var(--orange),
    0 20px 0 var(--red);
  opacity: 0.6;
}

.game-screen-4 {
  background:
    radial-gradient(circle at 50% 50%, #4a2a1a 0%, #1a0a05 70%);
}
.game-screen-4::after {
  content: "";
  position: absolute;
  bottom: 20%;
  left: 25%;
  width: 50%;
  height: 30%;
  background:
    linear-gradient(180deg, #8b1a1a 0%, #8b1a1a 60%, transparent 60%),
    repeating-linear-gradient(90deg, #2a1a0a 0, #2a1a0a 8px, #1a0a05 8px, #1a0a05 16px);
}

.game-title-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 3;
  font-family: "Press Start 2P", monospace;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7);
}

.gto-sub {
  font-size: clamp(8px, 1vw, 11px);
  color: var(--yellow);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.gto-main {
  font-size: clamp(16px, 2.6vw, 32px);
  color: var(--fg);
  letter-spacing: 2px;
  line-height: 1.1;
}

.game-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--red);
  color: var(--fg);
  padding: 4px 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  z-index: 4;
  border: 2px solid var(--fg);
}

.game-meta {
  padding: 16px 18px;
}

.game-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.game-name {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 1px;
}

.game-role {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: var(--cyan);
  letter-spacing: 1px;
}

.game-desc {
  font-size: 17px;
  color: var(--fg-dim);
  margin-bottom: 12px;
  line-height: 1.4;
}

.game-actions {
  display: flex;
  gap: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
}

.game-action {
  color: var(--yellow);
  padding: 4px 8px;
  background: var(--bg-2);
  border: 2px solid var(--yellow);
}

.game-action:hover {
  background: var(--yellow);
  color: var(--bg);
  cursor: pointer;
}

/* ==========================================================
   CONTACT
   ========================================================== */

.contact {
  text-align: center;
  gap: 24px;
}

.contact-prompt {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(12px, 1.6vw, 16px);
  color: var(--yellow);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.nes-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 6px 16px;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-2);
  border: var(--border) solid var(--fg);
  color: var(--fg);
  font-family: "Press Start 2P", monospace;
  position: relative;
  box-shadow: 6px 6px 0 0 var(--bg-3);
  transition: transform 0.1s steps(2), box-shadow 0.1s steps(2), background 0.1s steps(2);
  text-align: left;
}

.nes-letter {
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--fg);
  background: var(--red);
  border: 4px solid var(--fg);
  font-family: "Press Start 2P", monospace;
}

.nes-label {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--fg);
}

.nes-sub {
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 1px;
  font-family: "VT323", monospace;
}

.nes-btn:hover,
.nes-btn:focus-visible {
  outline: none;
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 0 var(--bg-3);
}

.nes-btn-a .nes-letter { background: var(--red); border-color: var(--red); }
.nes-btn-a:hover { background: var(--red); }
.nes-btn-a:hover .nes-letter { background: var(--fg); color: var(--red); }

.nes-btn-b .nes-letter { background: var(--cyan); border-color: var(--cyan); color: var(--bg); }
.nes-btn-b:hover { background: var(--cyan); }
.nes-btn-b:hover .nes-letter { background: var(--fg); color: var(--cyan); }

.nes-btn-select .nes-letter { background: var(--purple); border-color: var(--purple); }
.nes-btn-select:hover { background: var(--purple); color: var(--bg); }
.nes-btn-select:hover .nes-letter { background: var(--fg); color: var(--purple); }

.nes-btn-start .nes-letter { background: var(--yellow); border-color: var(--yellow); color: var(--bg); }
.nes-btn-start:hover { background: var(--yellow); color: var(--bg); }
.nes-btn-start:hover .nes-letter { background: var(--fg); color: var(--yellow); }

.insert-coin {
  margin-top: 40px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(14px, 1.8vw, 18px);
  letter-spacing: 3px;
  color: var(--yellow);
}

.blink-fast {
  display: inline-block;
  animation: blink 0.5s steps(2) infinite;
  color: var(--red);
  margin: 0 8px;
}

/* ==========================================================
   FOOTER
   ========================================================== */

.footer {
  border-top: var(--border) solid var(--fg);
  background: var(--bg-2);
  padding: 18px var(--pad-x);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--fg-mute);
}

.footer-line {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.footer-line:last-child { margin-bottom: 0; }

.dot {
  color: var(--red);
}

.footer-muted {
  font-size: 9px;
  color: var(--fg-mute);
  opacity: 0.7;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 880px) {
  .about-grid,
  .games-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .bio-panel,
  .stats-panel,
  .tools-panel,
  .now-panel {
    grid-column: auto;
  }
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  .hud { font-size: 9px; gap: 8px; padding: 10px 14px; }
  .hud-tag, .hud-stage { padding: 4px 6px; }
  .hud-name { display: none; }
  .hero-title { letter-spacing: 2px; }
  .hero-stage {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-avatar { margin: 0 auto; }
  .status-row { grid-template-columns: 50px 1fr 60px; font-size: 9px; }
  .stat { grid-template-columns: 90px 1fr 32px; font-size: 9px; }
  .now-line {
    grid-template-columns: 18px 1fr;
    gap: 8px;
    row-gap: 4px;
  }
  .now-label {
    grid-column: 2;
    color: var(--cyan);
  }
  .now-val {
    grid-column: 2;
    color: var(--fg);
  }
  .nes-btn { padding: 14px; }
  .nes-letter { width: 44px; height: 44px; font-size: 18px; }
  .nes-label { font-size: 12px; }
  .marquee { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
}

/* Selection */
::selection {
  background: var(--red);
  color: var(--fg);
}

/* ==========================================================
   PRESS START WIPE
   ========================================================== */

@keyframes wipe-down {
  0% { clip-path: inset(0 0 100% 0); }
  50% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(100% 0 0 0); }
}

@keyframes wipe-h {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

body.wiping::before,
body.wiping::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--red);
  z-index: 2000;
  pointer-events: none;
}

body.wiping::before {
  animation: wipe-h 0.24s steps(4) forwards;
  transform-origin: left center;
}

body.wiping::after {
  animation: wipe-h 0.24s steps(4) 0.24s forwards;
  transform-origin: right center;
}

body.flash {
  animation: screen-flash 0.4s steps(4);
}

@keyframes screen-flash {
  0%, 100% { background-color: var(--bg); }
  25% { background-color: var(--yellow); }
  50% { background-color: var(--cyan); }
  75% { background-color: var(--green); }
}
