:root {
  color-scheme: dark;
  --bg: #04060b;
  --ink: #e8edf3;
  --dim: #6b7888;
  --cyan: #65f5ff;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.7), transparent 60%),
    linear-gradient(180deg, #060912 0%, var(--bg) 60%, #01020a 100%);
  color: var(--ink);
  font-family:
    ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code",
    "Fira Code", Menlo, Consolas, monospace;
  font-feature-settings: "calt" 0, "liga" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Aurora — soft drifting blurred color fields */
.aurora {
  position: fixed;
  inset: -20vmax;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  filter: blur(70px) saturate(1.25);
}

.aurora__blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  opacity: 0.55;
}

.aurora__blob--1 {
  background: radial-gradient(closest-side, #65f5ff, transparent 70%);
  top: -10vmax;
  left: -10vmax;
  animation: aurora-1 28s ease-in-out infinite alternate;
}

.aurora__blob--2 {
  background: radial-gradient(closest-side, #7c5cff, transparent 70%);
  bottom: -18vmax;
  right: -10vmax;
  animation: aurora-2 34s ease-in-out infinite alternate;
  opacity: 0.45;
}

.aurora__blob--3 {
  background: radial-gradient(closest-side, #ff4fd8, transparent 70%);
  top: 35%;
  left: 38%;
  width: 38vmax;
  height: 38vmax;
  animation: aurora-3 42s ease-in-out infinite alternate;
  opacity: 0.28;
}

.aurora__blob--4 {
  background: radial-gradient(closest-side, #2dffb0, transparent 70%);
  top: 55%;
  left: -8vmax;
  width: 32vmax;
  height: 32vmax;
  animation: aurora-4 38s ease-in-out infinite alternate;
  opacity: 0.22;
}

@keyframes aurora-1 {
  to { transform: translate(22vmax, 18vmax) scale(1.12); }
}
@keyframes aurora-2 {
  to { transform: translate(-18vmax, -12vmax) scale(0.92); }
}
@keyframes aurora-3 {
  to { transform: translate(-22vmax, -28vmax) rotate(40deg); }
}
@keyframes aurora-4 {
  to { transform: translate(28vmax, -18vmax) scale(1.18); }
}

/* SVG film grain over everything for texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.09;
  mix-blend-mode: overlay;
}

/* faint vignette to focus the eye on the terminal */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0,0,0,0.55) 90%);
}

.stage {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
}

.terminal {
  width: min(440px, 92vw);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12,16,25,0.92) 0%, rgba(7,9,15,0.92) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 28px 80px -28px rgba(0,0,0,0.9),
    0 0 90px -28px rgba(101, 245, 255, 0.28);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(101,245,255,0.05), transparent 30%);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.4);
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dim);
  user-select: none;
}

.terminal__body {
  margin: 0;
  padding: 16px 18px 22px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre;
  min-height: 5em;
  font-family: inherit;
}

#screen .prompt { color: var(--dim); }
#screen .cmd { color: var(--ink); }
#screen .cmd.italic { font-style: italic; }
#screen .out {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(101, 245, 255, 0.55);
}

.caret {
  display: inline-block;
  width: 0.6ch;
  background: var(--cyan);
  color: transparent;
  vertical-align: -0.1em;
  margin-left: 1px;
  box-shadow: 0 0 10px rgba(101, 245, 255, 0.6);
  animation: blink 1.05s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (max-width: 380px) {
  .terminal__body { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora__blob { animation: none; }
  .caret { animation: none; opacity: 0.7; }
}
