:root {
  --bg: #0a0a12;
  --bg-grid: #15152a;
  --fg: #e6e6f0;
  --fg-dim: #8a8aa0;
  --neon: #00f0ff;
  --neon-2: #ff00ea;
  --grid-size: 32px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--fg);
  font-family: 'VT323', ui-monospace, 'Courier New', monospace;
  font-size: 22px;
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 240, 255, 0.12) 0%,
    rgba(255, 0, 234, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.title {
  position: relative;
  z-index: 2;
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: clamp(2.25rem, 10vw, 7rem);
  letter-spacing: 0.02em;
  color: var(--fg);
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.6);
  user-select: none;
}

.title .ai {
  display: inline-block;
  color: var(--neon);
  text-shadow:
    0 0 4px var(--neon),
    0 0 12px var(--neon),
    0 0 24px var(--neon),
    0 0 48px rgba(0, 240, 255, 0.6);
}

.title.glitch .ai {
  color: var(--neon-2);
  text-shadow:
    0 0 4px var(--neon-2),
    0 0 12px var(--neon-2),
    0 0 24px var(--neon-2),
    0 0 48px rgba(255, 0, 234, 0.6);
}

.tagline {
  position: relative;
  z-index: 2;
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}

.tagline .pulse {
  color: var(--neon);
  text-shadow: 0 0 6px var(--neon);
}

@media (prefers-reduced-motion: no-preference) {
  .title .ai {
    animation: pulse-glow 2.4s ease-in-out infinite;
  }

  .hero::before {
    animation: scanlines 8s linear infinite;
    background-size: 100% 4px;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    text-shadow:
      0 0 4px var(--neon),
      0 0 12px var(--neon),
      0 0 24px var(--neon),
      0 0 48px rgba(0, 240, 255, 0.6);
  }
  50% {
    text-shadow:
      0 0 6px var(--neon),
      0 0 18px var(--neon),
      0 0 36px var(--neon),
      0 0 64px rgba(0, 240, 255, 0.85);
  }
}

@keyframes scanlines {
  from { background-position: 0 0; }
  to   { background-position: 0 100px; }
}

/* ---------- Games ---------- */

.games {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.games h2 {
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--fg);
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.games h2::before,
.games h2::after {
  content: "//";
  color: var(--neon);
  margin: 0 0.6em;
  text-shadow: 0 0 6px var(--neon);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  display: block;
  position: relative;
  background: #0f0f1c;
  border: 2px solid #1f1f3a;
  border-radius: 4px;
  overflow: hidden;
  color: var(--fg);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--neon-2);
  box-shadow:
    0 0 0 1px var(--neon-2),
    0 0 18px rgba(255, 0, 234, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.6);
  outline: none;
}

.game-card .shot {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
  opacity: 0;
  transition: opacity 400ms ease;
}

.game-card .shot.loaded {
  opacity: 1;
}

.game-card .meta {
  padding: 1rem 1.1rem 1.2rem;
  border-top: 1px solid #1f1f3a;
}

.game-card h3 {
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--fg);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.game-card:hover h3 {
  color: var(--neon-2);
  text-shadow: 0 0 8px rgba(255, 0, 234, 0.7);
}

.game-card p {
  font-size: 1.1rem;
  color: var(--fg-dim);
  line-height: 1.4;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--fg-dim);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  border-top: 1px solid #1f1f3a;
}

.footer .heart {
  display: inline-block;
  color: var(--neon-2);
  text-shadow: 0 0 6px var(--neon-2);
  margin: 0 0.15em;
}
