/* Styles only for the retro landing page (index.html). Kept separate from
   style.css so the other pages (aboutMe, globe, games) are unaffected. */

:root {
  --neon-pink: #ff2d95;
  --neon-orange: #ff7a18;
  --neon-cyan: #00e5ff;
  --bg-deep: #050110;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(ellipse 120% 80% at 50% 15%, #0e0318 0%, #000000 45%, var(--bg-deep) 100%);
  color: #fff;
  overflow-x: hidden;
}

/* Background scene: sun + grid horizon + scanlines, all fixed behind everything */
.retro-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.sun {
  position: absolute;
  left: 50%;
  bottom: 14vh;
  width: min(38vw, 360px);
  height: min(38vw, 360px);
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe38a 0%, var(--neon-orange) 45%, var(--neon-pink) 100%);
  box-shadow: 0 0 90px 12px rgba(255, 122, 24, 0.45);
  overflow: hidden;
}

/* Cuts horizontal gaps into the lower half of the sun, classic retrowave look */
.sun::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: repeating-linear-gradient(180deg, transparent 0 5px, var(--bg-deep) 5px 11px);
}

.grid-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42vh;
  background-image: linear-gradient(rgba(0, 229, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.5) 1px, transparent 1px);
  background-size: 56px 42px;
  transform: perspective(280px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, black 15%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, black 15%, transparent 85%);
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.18) 2px 4px);
  mix-blend-mode: multiply;
}

.landing {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
  text-align: center;
}

.logo {
  width: min(92vw, 600px);
  height: auto;
  filter: drop-shadow(0 0 6px var(--neon-pink)) drop-shadow(0 0 16px var(--neon-cyan));
}

.draw-line {
  /* color comes from each path's own stroke="#..." attribute in index.html, not from here */
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* Hidden from the very first paint, before landing.js has even run - this is what stops
     the "flash of a fully-drawn line" bug. 1000 is just a value bigger than any path on this
     logo could ever be; JS replaces it with the path's exact length once it measures it. */
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  /* Duration is set per-portion from JS (longer lines take longer to draw at a constant
     speed), so only the property + easing curve are declared here. */
  transition-property: stroke-dashoffset;
  transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Subtle neon-sign flicker once the logo has fully drawn in */
.logo.is-complete .draw-line {
  animation: flicker 3.4s ease-in-out infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; }
  20%, 22%, 55% { opacity: 0.65; }
}

.tagline {
  font-family: "Orbitron", monospace;
  letter-spacing: 0.35em;
  font-size: 0.85rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Override the shared #navbar look (brown bar) with something that fits the retro scene */
.landing #navbar {
  background: rgba(13, 2, 33, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.landing #navbar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing #navbar a,
.landing #navbar #name,
.landing #navbar #pipeSeparate {
  color: #f5f5ff;
}

.landing #navbar a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

@media (prefers-reduced-motion: reduce) {
  .draw-line {
    transition: none;
  }
  .logo.is-complete .draw-line {
    animation: none;
  }
  .tagline,
  .landing #navbar {
    transition: none;
  }
}
