:root {
  --bg: #09070f;
  --bg-soft: #141022;
  --panel: rgba(18, 14, 33, 0.88);
  --panel-2: rgba(26, 20, 46, 0.95);
  --text: #f7f2ff;
  --muted: #b8acd0;
  --line: rgba(255, 255, 255, 0.1);
  --pink: #ff4fd8;
  --cyan: #61f4ff;
  --lime: #b6ff6a;
  --yellow: #ffe66d;
  --shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 18px 60px rgba(0, 0, 0, 0.45);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "VT323", monospace;
  color: var(--text);
  background:
    linear-gradient(rgba(97,244,255,0.055) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(97, 244, 255, 0.11), transparent 25%),
    linear-gradient(180deg, #08060d 0%, #0b0814 50%, #07060b 100%);
  background-size:
    100% 32px,
    auto,
    auto,
    auto;
  overflow-x: hidden;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  z-index: 0;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}



/* HUD */
.game-hud {
  position: fixed;
  top: 96px;
  right: 1rem;
  z-index: 40;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.hud-box {
  min-height: 58px;
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    rgba(18, 14, 33, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hud-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.42rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.hud-time {
  display: block;
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  color: var(--yellow);
}

.lives {
  display: flex;
  gap: 0.35rem;
}

.life {
  font-size: 1.25rem;
  color: var(--pink);
  text-shadow:
    0 0 8px rgba(255, 79, 216, 0.45),
    2px 2px 0 rgba(0,0,0,0.6);
  animation: lifePulse 1.4s ease-in-out infinite alternate;
}

.life:nth-child(2) {
  animation-delay: 0.15s;
}

.life:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes lifePulse {
  from {
    transform: scale(1);
    opacity: 0.85;
  }

  to {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 6, 11, 0.7);
  border-bottom: 1px solid var(--line);
}

.navbar {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-tag {
  font-family: "Press Start 2P", cursive;
  font-size: 1.1rem;
  color: var(--yellow);
  line-height: 1.6;
  transition: 0.25s ease;
}

.brand-tag:hover {
  text-shadow:
    0 0 8px rgba(255, 230, 109, 0.6),
    0 0 16px rgba(255, 79, 216, 0.4),
    0 0 24px rgba(97, 244, 255, 0.25);
}

.desktop-nav,
.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav {
  display: flex;
  gap: 1rem;
}

.desktop-nav a,
.mobile-nav-links a {
  font-family: "Press Start 2P", cursive;
  font-size: 0.62rem;
  padding: 0.95rem 1rem;
  border: 2px solid transparent;
  transition: 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav-links a:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255, 79, 216, 0.08);
}

.menu-toggle {
  display: none;
  width: 54px;
  height: 54px;
  border: 2px solid var(--line);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  width: 24px;
  height: 3px;
  background: var(--text);
  display: block;
  transition: 0.25s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(10, 8, 18, 0.96);
}

.mobile-menu.open {
  display: block;
}

.mobile-nav-links {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.mobile-nav-links a {
  display: block;
  border-radius: 12px;
}

/* hero */
.visual-hero {
  padding: 4rem 0 2rem;
  max-width: 920px;
}

.section-label {
  font-family: "Press Start 2P", cursive;
  font-size: 0.56rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.visual-hero h1,
.section-heading h2 {
  margin: 1rem 0;
  font-family: "Press Start 2P", cursive;
  line-height: 1.45;
}

.visual-hero h1 {
  font-size: clamp(1.4rem, 4vw, 3rem);
}

.section-heading h2 {
  font-size: clamp(1rem, 2.6vw, 1.5rem);
}

.visual-hero p {
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  color: var(--muted);
  line-height: 1.4;
}

/* archive */
.archive-section {
  padding: 2rem 0 3rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 1.5rem;
}

.visual-grid {
  columns: 3 260px;
  column-gap: 1.2rem;
}

.visual-card {
  position: relative;
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 1.4rem;
  padding: 0.75rem 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
    rgba(26, 20, 46, 0.96);
  box-shadow:
    0 8px 0 rgba(0,0,0,0.22),
    0 22px 45px rgba(0,0,0,0.38);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.visual-card:hover,
.visual-card:focus-visible {
  transform: rotate(0deg) translateY(-8px) scale(1.02);
  border-color: var(--cyan);
  box-shadow:
    0 8px 0 rgba(0,0,0,0.22),
    0 22px 45px rgba(0,0,0,0.38),
    0 0 20px rgba(97,244,255,0.2);
  z-index: 3;
}

.visual-card img {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.08);
  background: #141022;
  filter: saturate(0.96) contrast(1.04);
}

.card-label {
  display: block;
  margin-top: 0.75rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.52rem;
  line-height: 1.6;
  color: var(--yellow);
}

.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 28px;
  transform: translateX(-50%) rotate(-2deg);
  background:
    linear-gradient(90deg, rgba(255,230,109,0.4), rgba(97,244,255,0.35)),
    rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 2;
  backdrop-filter: blur(2px);
}

.tilt-left {
  transform: rotate(-1.8deg);
}

.tilt-right {
  transform: rotate(1.6deg);
}

.tilt-small {
  transform: rotate(-0.8deg);
}

.sketchbook {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sketch-card {
  background:
    linear-gradient(rgba(97,244,255,0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
    rgba(26, 20, 46, 0.96);
  background-size: 100% 24px, auto, auto;
}

.photo-card img {
  filter: saturate(1.08) contrast(1.02);
}

/* lightbox */
.visual-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.visual-lightbox.open {
  display: block;
}

.visual-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 10, 0.84);
  backdrop-filter: blur(8px);
}

.visual-lightbox-panel {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), 1000px);
  margin: 4vh auto 0;
  padding: 1rem;
  border-radius: 24px;
  border: 2px solid rgba(255,255,255,0.08);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.visual-lightbox-panel img {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  background: #09070f;
}

.visual-lightbox-copy {
  padding-top: 1rem;
}

.visual-lightbox-copy h2 {
  margin: 0 0 0.5rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.78rem;
  line-height: 1.6;
}

.visual-lightbox-copy p {
  margin: 0;
  font-size: 1.3rem;
  color: var(--muted);
}

.visual-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 72px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.55);
  color: var(--text);
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  cursor: pointer;
  z-index: 5;
}

.visual-lightbox-close span {
  font-size: 0.45rem;
}

/* responsive */
@media (max-width: 768px) {
  .game-hud {
    position: static;
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 1rem auto 0;
    justify-content: space-between;
  }

  .hud-box {
    flex: 1;
  }

  .hud-time {
    font-size: 0.58rem;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .navbar {
    min-height: 74px;
  }

  .visual-hero {
    padding-top: 2.5rem;
  }

  .visual-grid {
    columns: 2 220px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .visual-grid {
    columns: 1;
  }

  .visual-card {
    transform: none;
  }

  .section-label,
  .card-label {
    letter-spacing: 0.02em;
  }

  .visual-lightbox-panel {
    margin-top: 3vh;
    padding: 0.75rem;
  }

  .visual-lightbox-close span {
    display: none;
  }
}