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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Press Start 2P', cursive;
  background: #000000;
  color: #ffffff;
  line-height: 2;
  letter-spacing: 1px;
}

/* =========================
   STARFIELD CANVAS
========================= */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: #000000;
  display: block;
}

/* Everything else sits above canvas */
header, section, .logo-saturn {
  position: relative;
  z-index: 1;
}

/* =========================
   GALAGA TITLE
========================= */
.galaga-title {
  position: relative;
  margin-bottom: 40px;
  display: inline-block;
}

/* Main glitch text */
.title-glitch {
  font-size: clamp(2rem, 7vw, 4.5rem);
  letter-spacing: 6px;
  word-spacing: -0.2em;
  position: relative;
  display: inline-block;

  animation: titleFlicker 6s steps(1) infinite;

  /* Original brand gradient */
  background: linear-gradient(90deg, #CD4243, #426E71, #86B0B8, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glitch pseudo-layers */
.title-glitch::before,
.title-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

.title-glitch::before {
  background: linear-gradient(90deg, #CD4243, #426E71, #86B0B8, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: #ff003c;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  animation: glitchTop 4s steps(1) infinite;
  opacity: 0;
}

.title-glitch::after {
  -webkit-text-fill-color: #00f5ff;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
  animation: glitchBot 4s steps(1) infinite;
  opacity: 0;
}

@keyframes glitchTop {
  0%, 90%, 100% { opacity: 0; transform: translateX(0); }
  91%            { opacity: 1; transform: translateX(-4px); }
  93%            { opacity: 1; transform: translateX(4px); }
  95%            { opacity: 0; }
}

@keyframes glitchBot {
  0%, 88%, 100% { opacity: 0; transform: translateX(0); }
  89%            { opacity: 1; transform: translateX(4px); }
  92%            { opacity: 1; transform: translateX(-4px); }
  94%            { opacity: 0; }
}

@keyframes titleFlicker {
  0%, 97%, 100%  { opacity: 1; }
  98%            { opacity: 0.1; }
  99%            { opacity: 1; }
}

/* Scanline overlay across title */
.title-scanline {
  position: absolute;
  top: 0; left: -10%; right: -10%; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.25) 2px,
    rgba(0,0,0,0.25) 4px
  );
  pointer-events: none;
  z-index: 2;
  border-radius: 4px;
}

/* INSERT COIN blinking subtitle */
.title-sub {
  font-size: 0.55rem;
  letter-spacing: 4px;
  color: #ffeb3b;
  text-align: center;
  margin-top: 14px;
  animation: insertCoin 1.2s steps(1) infinite;
}

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

.coin-blink {
  color: #ff9800;
  animation: coinSpin 1s linear infinite;
  display: inline-block;
}

@keyframes coinSpin {
  0%   { transform: scaleX(1); }
  50%  { transform: scaleX(0.1); }
  100% { transform: scaleX(1); }
}

/* remove all link underlines */
a,
a:visited,
a:hover,
a:active {
  text-decoration: none;
  color: inherit;
}

/* =========================
   SATURN LOGO (TOP LEFT)
========================= */
.logo-saturn {
  position: fixed;
  top: 18px;
  left: 18px;

  width: 70px;
  height: auto;

  z-index: 9999;

  filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));

  transition: transform 0.3s ease;
}

.logo-saturn:hover {
  transform: scale(1.1) rotate(8deg);
}

/* =========================
   HERO
========================= */
header {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  padding: 60px 20px;

  background: transparent;
}

.hero h1,
h2 {
  background: linear-gradient(
    90deg,
    #CD4243,
    #426E71,
    #86B0B8,
    #000000
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* HERO TEXT */
.hero p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 50px;
}


/* =========================
   BUTTONS
========================= */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  font-size: 0.6rem;
  letter-spacing: 2px;
  transition: 0.25s ease;
  display: inline-block;
  text-decoration: none;
  background: none;
  border: none;
  padding: 4px 0;
}

.btn-primary,
.btn-secondary {
  color: rgba(255,255,255,0.75);
}

.btn:hover {
  color: #ffffff;
  transform: translateY(-3px);
}

/* =========================
   SECTIONS
========================= */
section {
  padding: 120px 20px;
}

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

/* =========================
   PORTFOLIO
========================= */
.section-title {
  text-align: center;
  margin-bottom: 70px;
}

.section-title h2 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.section-title p {
  font-size: 0.65rem;
  color: #ffffff;
}

.video-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));

  gap: 45px;
}

.video-card {
  background: rgba(15,23,42,0.85);

  border: 1px solid rgba(255,255,255,0.15);

  border-radius: 16px;

  overflow: hidden;

  transition: 0.3s ease;
}

.video-card:hover {
  transform: translateY(-8px);

  box-shadow: 0 0 18px rgba(255,255,255,0.15);
}

.video-card iframe {
  width: 100%;
  height: 260px;
}

.video-content {
  padding: 25px;
}

.video-content h3 {
  font-size: 0.7rem;
  margin-bottom: 18px;
}

.video-content p {
  font-size: 0.6rem;
  color: #ffffff;
}

/* =========================
   ABOUT
========================= */
.about-section {
  background: rgba(5, 7, 13, 0.7);
}

.about-container {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.about-container h2 {
  margin-bottom: 30px;
}

.about-container p {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.75);
  line-height: 2.2;
}

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

.stat-card {
  background: rgba(15,23,42,0.7);

  border: 1px solid rgba(255,255,255,0.12);

  border-radius: 14px;

  padding: 28px;
}

.stat-card h3 {
  margin-bottom: 18px;
}

.stat-card p {
  font-size: 0.6rem;
  color: #ffffff;
}

/* =========================
   CONTACT
========================= */
.contact-section {
  text-align: center;
}

.contact-section h2 {
  margin-bottom: 30px;
}

.contact-section p {
  font-size: 0.65rem;
  margin-bottom: 45px;
  color: #ffffff;
}

/* =========================
   MOBILE
========================= */
@media(max-width: 768px) {

  .hero h1 {
    font-size: 2rem;
  }

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

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

  .btn {
    font-size: 0.55rem;
  }
}