:root {
  --bg: #03070f;
  --cyan: #00f0ff;
  --blue: #2a7fff;
  --text: #eaf8ff;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

main {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 16px 26vh;
  text-align: center;
}

/* ---- logo ---- */

.logo {
  width: clamp(120px, 26vmin, 220px);
  height: auto;
  filter:
    drop-shadow(0 0 6px rgba(0, 240, 255, .55))
    drop-shadow(0 0 22px rgba(42, 127, 255, .35));
  animation: hover 6s ease-in-out infinite, flicker 7s steps(1) infinite;
}

@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  41%      { opacity: .55; }
  42%      { opacity: 1; }
  43%      { opacity: .3; }
  44%      { opacity: 1; }
  87%      { opacity: .7; }
  88%      { opacity: 1; }
}

/* ---- wordmark with RGB-split glitch ---- */

.wordmark {
  position: relative;
  font-family: "Orbitron", "Share Tech Mono", ui-monospace, monospace;
  font-weight: 900;
  font-size: clamp(2rem, 8.5vw, 5.5rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow:
    0 0 4px rgba(255, 255, 255, .6),
    0 0 18px rgba(0, 240, 255, .6),
    0 0 42px rgba(42, 127, 255, .45);
  white-space: nowrap;
}

.wordmark::before,
.wordmark::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: none;
  opacity: .85;
}

.wordmark::before {
  color: var(--cyan);
  mix-blend-mode: screen;
  animation: split-a 4.2s infinite linear;
}

.wordmark::after {
  color: var(--blue);
  mix-blend-mode: screen;
  animation: split-b 3.4s infinite linear;
}

@keyframes split-a {
  0%, 88%, 100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
  89% { transform: translate(-6px, 0);  clip-path: inset(12% 0 60% 0); }
  91% { transform: translate(5px, 0);   clip-path: inset(55% 0 20% 0); }
  93% { transform: translate(-3px, 0);  clip-path: inset(30% 0 45% 0); }
  95% { transform: translate(7px, 0);   clip-path: inset(70% 0 5% 0); }
  97% { transform: translate(0);        clip-path: inset(0 0 100% 0); }
}

@keyframes split-b {
  0%, 84%, 100% { transform: translate(0); clip-path: inset(100% 0 0 0); }
  85% { transform: translate(6px, 0);   clip-path: inset(40% 0 35% 0); }
  87% { transform: translate(-7px, 0);  clip-path: inset(5% 0 75% 0); }
  89% { transform: translate(4px, 0);   clip-path: inset(62% 0 12% 0); }
  91% { transform: translate(0);        clip-path: inset(100% 0 0 0); }
}

/* ---- blinking prompt ---- */

.prompt {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, .8);
  height: 1.5em;
}

.prompt::before { content: "> "; opacity: .8; }

.prompt a {
  color: var(--text);
  text-decoration: none;
  margin-right: .2em;
  /* dark halo keeps it legible over the skyline windows */
  text-shadow:
    0 0 2px #000,
    0 0 4px #000,
    0 0 12px rgba(0, 240, 255, .55);
}

.prompt a:hover,
.prompt a:focus-visible {
  outline: none;
  color: #fff;
  text-shadow:
    0 0 2px #000,
    0 0 8px var(--cyan),
    0 0 18px var(--cyan);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.caret {
  display: inline-block;
  width: .6em;
  height: 1.05em;
  vertical-align: -0.15em;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---- CRT overlays ---- */

.scanlines,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, .22) 3px
  );
  animation: roll 8s linear infinite;
}

@keyframes roll {
  from { background-position: 0 0; }
  to   { background-position: 0 300px; }
}

.vignette {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .75) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .logo, .wordmark::before, .wordmark::after, .scanlines, .caret { animation: none; }
}
