html, body { margin: 0; background: #020402; }
::selection { background: #41ff6e; color: #020402; }

@keyframes blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@keyframes flicker { 0%, 100% { opacity: 1 } 50% { opacity: .965 } 52% { opacity: .99 } }
@keyframes roll { from { transform: translateY(-30vh) } to { transform: translateY(110vh) } }

.crt {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 45%, #061407 0%, #030803 65%, #010201 100%);
  color: #41ff6e;
  font-family: 'VT323', monospace;
  font-size: clamp(17px, 2.3vw, 24px);
  line-height: 1.2;
  overflow: hidden;
  animation: flicker 5s infinite;
}

.term {
  --gutter: clamp(16px, 5vw, 64px);
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: clamp(18px, 4vw, 48px) var(--gutter) 0;
  text-shadow: 0 0 1px #41ff6e, 0 0 6px rgba(65, 255, 110, .55), 0 0 18px rgba(65, 255, 110, .2);
}

.screen { flex: 1; max-width: 80ch; width: 100%; }

.line { white-space: pre-wrap; min-height: 1.2em; }
.line.dim { color: #27b34a; }
.line.bright { color: #b6ffc4; }

.banner { display: flex; }
/* Cells shrink together on narrow screens so the banner never clips. */
.banner span { display: block; flex: 0 1 1ch; min-width: 0; height: 1.2em; }
.banner .on { background: #6dff8f; box-shadow: 0 0 6px rgba(65, 255, 110, .6); }

.cursor {
  display: inline-block;
  width: .55em;
  height: .95em;
  vertical-align: -.12em;
  background: #41ff6e;
  box-shadow: 0 0 8px rgba(65, 255, 110, .7);
  animation: blink 1.06s steps(1) infinite;
}

/* The email "link" is a copy button, not a mail link. */
.email {
  font: inherit;
  color: #b6ffc4;
  text-shadow: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  user-select: text;
}
.email:hover, .email:focus-visible { background: #41ff6e; color: #020402; text-decoration: none; outline: none; }
.note { color: #27b34a; }

.bar {
  display: flex;
  flex-wrap: wrap;
  margin: 32px calc(-1 * var(--gutter)) 0;
  background: #41ff6e;
  color: #031003;
  text-shadow: none;
  box-shadow: 0 0 18px rgba(65, 255, 110, .35);
}
.bar-title { padding: 2px 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.bar button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-left: 2px solid #031003;
  padding: 2px 14px;
  background: #41ff6e;
  color: #031003;
}
.bar button[aria-pressed="true"] { background: #031003; color: #41ff6e; }
.bar button:focus-visible { outline: 2px dashed #031003; outline-offset: -4px; }

.scanlines, .roll, .vignette { position: fixed; pointer-events: none; }
.scanlines {
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .35) 3px, rgba(0, 0, 0, 0) 4px);
}
.roll {
  left: 0;
  right: 0;
  top: 0;
  height: 25vh;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(65, 255, 110, .035), transparent);
  animation: roll 9s linear infinite;
}
.vignette {
  inset: 0;
  z-index: 3;
  border-radius: 28px;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .85), inset 0 0 40px rgba(0, 0, 0, .6), 0 0 0 40px #020402;
}

@media (prefers-reduced-motion: reduce) {
  .crt, .roll { animation: none; }
  .roll { display: none; }
}
