:root {
  --bg: #050805;
  --green: #33ff33;
  --green-bright: #39ff14;
  --green-dim: #1f8f1f;
  --glow: 0 0 2px currentColor, 0 0 8px rgba(51, 255, 51, 0.5);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--green);
  min-height: 100%;
}

body {
  font-family: "JetBrains Mono", "IBM Plex Mono", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.5;
  text-shadow: var(--glow);
  overflow-x: hidden;
  animation: flicker 7s infinite ease-in-out;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Screen overlays */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0.25) 2px,
    rgba(0, 0, 0, 0.25) 3px
  );
  mix-blend-mode: multiply;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.terminal {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 8vh 20px 6vh;
}

/* Banner */
.banner {
  margin: 0 0 1.5em;
  color: var(--green-bright);
  text-align: center;
}

.banner-full {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(6px, 1.2vw, 14px);
  line-height: 1.0;
  white-space: pre;
  display: block;
  overflow-x: auto;
  letter-spacing: 0;
  text-shadow: none;
}

.banner-compact {
  display: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin: 0 0 1em;
}

@media (max-width: 600px) {
  .banner-full {
    display: none;
  }
  .banner-compact {
    display: block;
  }
}

/* Boot lines */
.boot-lines .line {
  margin: 0.3em 0;
  min-height: 1.5em;
  white-space: pre-wrap;
  word-break: break-word;
}

.listing {
  margin: 0.6em 0 1.2em;
}

.listing-line {
  margin: 0;
  min-height: 1.5em;
}

.prompt-arrow {
  color: var(--green-dim);
}

.project-link {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.project-link:hover,
.project-link:focus {
  color: var(--green-bright);
  text-shadow: 0 0 2px currentColor, 0 0 12px rgba(57, 255, 20, 0.8);
  border-bottom-color: currentColor;
}

.cursor-line {
  margin: 0.3em 0;
}

.cursor {
  display: inline-block;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  42% { opacity: 1; }
  43% { opacity: 0.94; }
  44% { opacity: 1; }
  71% { opacity: 1; }
  72% { opacity: 0.96; }
  73% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  .cursor {
    animation: none;
    opacity: 1;
  }
}
