: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);
  --radius: 20px;
  --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:
    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%);
  overflow-x: hidden;
}
/* =========================
   GAME HUD CLOCK + LIVES
   ========================= */

.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);
  text-shadow: 0 0 12px rgba(255, 230, 109, 0.25);
}

.lives {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.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;
  }
}

@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;
  }
}

@media (max-width: 420px) {
  .game-hud {
    flex-direction: column;
    align-items: stretch;
  }

  .lives-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .hud-label {
    margin-bottom: 0.25rem;
  }
}
.hidden {
  display: none !important;
}

.game-hud {
  animation: hudEnter 0.35s ease both;
}

@keyframes hudEnter {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.menu-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;
}

/* 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;
  gap: 1rem;
}

.brand-tag {
  font-family: "Press Start 2P", cursive;
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--yellow);
  text-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.6),
    0 0 18px rgba(255, 230, 109, 0.2);
}

.brand-tag {
  transition: all 0.25s ease;
}

.brand-tag:hover {
  color: var(--yellow);
  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);
  transform: translateY(-1px);
}

.desktop-nav,
.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  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,
.mobile-nav-links a:hover,
.desktop-nav a.active {
  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;
  padding: 1rem;
  border-radius: 12px;
}

/* PAGE */
.projects-page {
  padding: 0 0 4rem;
}

.screen-label,
.content-label,
.panel-title {
  font-family: "Press Start 2P", cursive;
  font-size: 0.58rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

/* START SCREEN */
.start-screen {
  min-height: calc(100vh - 81px);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.start-screen.active {
  display: flex;
}

.start-screen-inner {
  max-width: 900px;
}

.start-screen h1 {
  margin: 1.2rem 0 1rem;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(1.8rem, 5vw, 4rem);
  line-height: 1.4;
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(255, 230, 109, 0.16);
}

.start-copy {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.4;
  color: var(--muted);
}

.start-button {
  min-width: 240px;
  min-height: 68px;
  padding: 1rem 1.4rem;
  border: 2px solid rgba(255, 230, 109, 0.45);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 230, 109, 0.16), rgba(255, 230, 109, 0.06));
  color: var(--yellow);
  font-family: "Press Start 2P", cursive;
  font-size: 0.72rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  animation: pulseStart 1.2s infinite alternate;
}

.start-hint {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

@keyframes pulseStart {
  from {
    transform: translateY(0);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.06), 0 10px 30px rgba(0,0,0,0.35);
  }
  to {
    transform: translateY(-4px);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.06), 0 0 24px rgba(255, 230, 109, 0.18);
  }
}

/* MENU SCREEN */
.game-menu-screen {
  display: none;
  padding-top: 3rem;
}

.game-menu-screen.active {
  display: block;
}

.menu-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.menu-copy h2 {
  margin: 1rem 0 0.75rem;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(1.1rem, 3vw, 2rem);
  line-height: 1.5;
}

.menu-copy p {
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  color: var(--muted);
}

.menu-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.status-chip {
  min-height: 40px;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-family: "Press Start 2P", cursive;
  font-size: 0.5rem;
}

.game-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
}

.game-menu-panel,
.game-content-panel {
  background: var(--panel-2);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.game-menu-panel {
  padding: 1.25rem;
  align-self: start;
}

.panel-title {
  margin: 0 0 1rem;
}

.game-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.menu-item {
  width: 100%;
  text-align: left;
  min-height: 58px;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-family: "Press Start 2P", cursive;
  font-size: 0.56rem;
  line-height: 1.6;
  cursor: pointer;
  transition: 0.2s ease;
}

.menu-item:hover,
.menu-item.active {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateX(4px);
  background: rgba(97, 244, 255, 0.08);
}

.game-content-panel {
  padding: 1.5rem;
  min-height: 540px;
  overflow: hidden;
}

.content-screen {
  display: none;
}

.content-screen.active {
  display: block;
}

.content-screen h3 {
  margin: 0.9rem 0 1rem;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(0.95rem, 2vw, 1.4rem);
  line-height: 1.6;
}

/* ROULETTE / CAROUSEL PROJECT CARDS */
.roulette-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.roulette-track {
  display: flex;
  gap: 1rem;
  flex: 1;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 1rem 0.35rem 1.2rem;
}

.roulette-track::-webkit-scrollbar {
  display: none;
}

.roulette-card {
  flex: 0 0 280px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 1.2rem;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: scale(1);
  transform-origin: center center;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.roulette-card:hover,
.roulette-card:focus-visible {
  transform: scale(1.08);
  border-color: var(--cyan);
  background:
    linear-gradient(180deg, rgba(97, 244, 255, 0.08), transparent 55%),
    rgba(255,255,255,0.05);
  z-index: 3;
}

.featured-card {
  background:
    linear-gradient(180deg, rgba(255, 79, 216, 0.08), transparent 50%),
    rgba(255,255,255,0.03);
}

.project-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: "Press Start 2P", cursive;
  font-size: 0.45rem;
  color: var(--yellow);
  margin-bottom: 1rem;
}

.roulette-card h4 {
  margin: 0 0 0.75rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.72rem;
  line-height: 1.6;
}

.roulette-card p {
  margin: 0;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  color: var(--muted);
}

.roulette-arrow {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--yellow);
  font-family: "Press Start 2P", cursive;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.roulette-arrow:hover,
.roulette-arrow:focus-visible {
  transform: scale(1.06);
  border-color: var(--yellow);
  background: rgba(255, 230, 109, 0.08);
}

/* INFO PANELS */
.single-panel-card {
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 1.2rem;
}

.single-panel-card p,
.pixel-list li {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  line-height: 1.4;
  color: var(--muted);
}

.pixel-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.pixel-list li {
  margin-bottom: 0.45rem;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .menu-hero {
    flex-direction: column;
    align-items: start;
  }

  .roulette-card {
    flex: 0 0 250px;
    min-height: 240px;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .navbar {
    min-height: 74px;
  }

  .start-screen {
    min-height: calc(100vh - 75px);
  }

  .start-button {
    width: 100%;
    min-width: 0;
    font-size: 0.66rem;
  }

  .game-menu-screen {
    padding-top: 2rem;
  }

  .game-menu-panel,
  .game-content-panel {
    border-radius: 18px;
  }

  .game-content-panel {
    padding: 1rem;
    min-height: auto;
  }

  .menu-item {
    font-size: 0.5rem;
  }

  .status-chip {
    font-size: 0.45rem;
  }

  .roulette-shell {
    gap: 0.5rem;
  }

  .roulette-arrow {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 0.75rem;
  }

  .roulette-card {
    flex: 0 0 220px;
    min-height: 220px;
    padding: 1rem;
  }

  .roulette-card:hover,
  .roulette-card:focus-visible {
    transform: scale(1.04);
  }
}

@media (max-width: 560px) {
  .roulette-shell {
    display: block;
  }

  .roulette-arrow {
    display: none;
  }

  .roulette-track {
    padding: 0.8rem 0 1rem;
    scroll-snap-type: x mandatory;
  }

  .roulette-card {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .start-copy,
  .roulette-card p,
  .single-panel-card p,
  .pixel-list li,
  .menu-copy p {
    font-size: 1.15rem;
  }

  .menu-item,
  .desktop-nav a,
  .mobile-nav-links a,
  .status-chip,
  .project-tag,
  .screen-label,
  .content-label,
  .panel-title {
    letter-spacing: 0.02em;
  }
}

/* =========================
   CHUNKY PIXEL WINDOWS ARROW
   ========================= */

body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' shape-rendering='crispEdges'%3E%3Cpath d='M4 2 L4 36 L14 28 L20 44 L28 41 L22 26 L36 26 Z' fill='%23ffffff' stroke='%23000000' stroke-width='4'/%3E%3C/svg%3E") 4 2, auto;
}

/* clickable colour change */
a,
button,
.btn,
.menu-toggle,
.menu-item,
.roulette-card,
.project-card,
.gallery-card,
input[type='submit'] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' shape-rendering='crispEdges'%3E%3Cpath d='M4 2 L4 36 L14 28 L20 44 L28 41 L22 26 L36 26 Z' fill='%23ffe66d' stroke='%23000000' stroke-width='4'/%3E%3C/svg%3E") 4 2, pointer;
}

/* optional: pink when actively clicking */
a:active,
button:active,
.btn:active,
.menu-item:active,
.roulette-card:active,
.project-card:active,
.gallery-card:active {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' shape-rendering='crispEdges'%3E%3Cpath d='M4 2 L4 36 L14 28 L20 44 L28 41 L22 26 L36 26 Z' fill='%23ff4fd8' stroke='%23000000' stroke-width='4'/%3E%3C/svg%3E") 4 2, pointer;
}

@media (hover: none) {
  body,
  a,
  button {
    cursor: auto;
  }
}