@import url("https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #050506;
  --text: #e6e6e6;
  --muted: #9aa0a6;
  --rule: rgba(230, 230, 230, 0.1);
  --aurora-1: #00e0b7;
  --aurora-2: #00d0b1;
  --aurora-3: #00a1a1;
  --aurora-4: #008c9a;
  --aurora-5: #007783;
  --aurora-6: #00444b;
  font-family: "Space Mono", "IBM Plex Mono", "Courier New", monospace;
}

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgba(4, 12, 12, 0.4), transparent 55%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 36px 24px 56px;
  line-height: 1.7;
}

.aurora-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(5, 7, 7, 0.7);
  border: 1px solid rgba(230, 230, 230, 0.08);
  backdrop-filter: blur(8px);
  margin-bottom: 28px;
}

.aurora-toggle__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.aurora-toggle__btn:hover,
.aurora-toggle__btn:focus-visible {
  color: var(--text);
}

.aurora-toggle__btn.is-active {
  color: #041311;
  background: linear-gradient(120deg, rgba(0, 224, 183, 0.75), rgba(0, 161, 161, 0.65));
}

.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.bg-network {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.bg-network svg {
  width: 100%;
  height: 120%;
  display: block;
  transform-origin: center;
  animation: network-drift 28s ease-in-out infinite;
}

.bg-network__lines path {
  stroke: rgba(230, 230, 230, 0.08);
  stroke-width: 1;
  fill: none;
}

.bg-network__nodes circle {
  fill: rgba(230, 230, 230, 0.14);
}

.bg-network__pulses circle {
  fill: url(#energy);
  opacity: 0.45;
  filter: blur(2.2px) drop-shadow(0 0 8px rgba(0, 224, 183, 0.35));
}

body[data-aurora="stronger"] .bg-aurora:not(.bg-aurora--arcs),
body[data-aurora="subtler"] .bg-aurora--arcs,
body[data-aurora="network"] .bg-network {
  opacity: 1;
}

.bg-aurora__layer {
  position: absolute;
  inset: -20% -10% 10% -10%;
  background: radial-gradient(60% 40% at 20% 20%, rgba(0, 224, 183, 0.35), transparent 70%),
    radial-gradient(50% 40% at 80% 10%, rgba(0, 160, 161, 0.25), transparent 65%),
    radial-gradient(50% 60% at 50% 80%, rgba(0, 119, 131, 0.22), transparent 70%);
  filter: blur(44px);
  opacity: 0.06;
  mix-blend-mode: screen;
  animation: aurora-drift-a 70s ease-in-out infinite,
    aurora-pulse 26s ease-in-out infinite;
}

.bg-aurora__layer--one {
  inset: -25% -15% 0 -10%;
  background: radial-gradient(60% 40% at 15% 30%, rgba(0, 224, 183, 0.35), transparent 70%),
    radial-gradient(50% 45% at 65% 20%, rgba(0, 208, 177, 0.25), transparent 65%),
    radial-gradient(55% 60% at 40% 80%, rgba(0, 119, 131, 0.18), transparent 70%);
  animation: aurora-drift-b 86s ease-in-out infinite alternate,
    aurora-pulse 30s ease-in-out infinite;
  animation-delay: -12s, -6s;
  opacity: 0.09;
}

.bg-aurora__layer--two {
  inset: -30% -20% 5% -5%;
  background: radial-gradient(70% 45% at 70% 30%, rgba(0, 161, 161, 0.26), transparent 70%),
    radial-gradient(60% 50% at 30% 10%, rgba(0, 140, 154, 0.22), transparent 68%),
    radial-gradient(55% 70% at 55% 85%, rgba(0, 68, 75, 0.22), transparent 75%);
  animation: aurora-drift-c 96s ease-in-out infinite alternate-reverse,
    aurora-pulse 34s ease-in-out infinite;
  animation-delay: -18s, -12s;
  opacity: 0.08;
}

.bg-aurora__layer--three {
  inset: -15% -25% 15% -15%;
  background: radial-gradient(60% 45% at 40% 15%, rgba(0, 224, 183, 0.2), transparent 70%),
    radial-gradient(55% 55% at 85% 35%, rgba(0, 208, 177, 0.18), transparent 65%),
    radial-gradient(55% 70% at 30% 80%, rgba(0, 68, 75, 0.24), transparent 75%);
  animation: aurora-drift-a 110s ease-in-out infinite alternate,
    aurora-pulse 28s ease-in-out infinite;
  animation-delay: -30s, -4s;
  opacity: 0.06;
}

.bg-aurora__layer--four {
  inset: -35% -10% 0 -25%;
  background: radial-gradient(65% 45% at 35% 25%, rgba(0, 161, 161, 0.22), transparent 70%),
    radial-gradient(55% 50% at 75% 40%, rgba(0, 224, 183, 0.2), transparent 68%),
    radial-gradient(60% 70% at 20% 80%, rgba(0, 119, 131, 0.22), transparent 75%);
  animation: aurora-drift-b 122s ease-in-out infinite alternate-reverse,
    aurora-pulse 32s ease-in-out infinite;
  animation-delay: -45s, -18s;
  opacity: 0.05;
}

.bg-aurora__arc {
  position: absolute;
  inset: -20% -15% 0 -15%;
  filter: blur(34px);
  opacity: 0.16;
  mix-blend-mode: screen;
}

.bg-aurora__arc--one {
  inset: -25% -20% -10% -20%;
  background: linear-gradient(180deg, transparent 10%, rgba(0, 224, 183, 0.28) 35%, transparent 70%),
    linear-gradient(200deg, transparent 15%, rgba(0, 140, 154, 0.24) 45%, transparent 75%);
  animation: arc-drift 120s ease-in-out infinite;
  opacity: 0.3;
}

.bg-aurora__arc--two {
  inset: -15% -25% -15% -15%;
  background: linear-gradient(160deg, transparent 20%, rgba(0, 208, 177, 0.22) 46%, transparent 72%),
    linear-gradient(210deg, transparent 25%, rgba(0, 68, 75, 0.28) 60%, transparent 82%);
  animation: arc-drift 140s ease-in-out infinite alternate;
  opacity: 0.26;
}


.terminal {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 1;
  padding: 28px 32px;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

body[data-aurora="none"] .terminal {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-aurora="none"] .terminal__header,
body[data-aurora="none"] .terminal__footer {
  border-color: transparent;
}

.terminal__header {
  padding-bottom: 12px;
}

h1 {
  font-size: clamp(1.8rem, 3.8vw, 2.4rem);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.terminal__cursor {
  display: inline-block;
  width: 0.5ch;
  height: 1em;
  background: var(--text);
  margin-right: 0.4ch;
  transform: translateY(0.1em);
  animation: cursor-blink 1.1s steps(2, start) infinite;
}

h2 {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

.terminal__content p + p {
  margin-top: 16px;
}

.terminal__footer {
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes aurora-drift-a {
  0% {
    transform: translate3d(-4%, -2%, 0) scale(1);
  }
  35% {
    transform: translate3d(2%, -4%, 0) scale(1.05);
  }
  70% {
    transform: translate3d(4%, 2%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(-4%, -2%, 0) scale(1);
  }
}

@keyframes aurora-drift-b {
  0% {
    transform: translate3d(3%, -3%, 0) scale(1.02);
  }
  30% {
    transform: translate3d(-2%, -5%, 0) scale(1.06);
  }
  65% {
    transform: translate3d(-5%, 1%, 0) scale(1.01);
  }
  100% {
    transform: translate3d(3%, -3%, 0) scale(1.02);
  }
}

@keyframes aurora-drift-c {
  0% {
    transform: translate3d(-2%, 1%, 0) scale(1.03);
  }
  40% {
    transform: translate3d(4%, -2%, 0) scale(1.05);
  }
  75% {
    transform: translate3d(1%, 4%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-2%, 1%, 0) scale(1.03);
  }
}

@keyframes aurora-pulse {
  0% {
    opacity: 0.78;
    filter: blur(46px) hue-rotate(0deg);
  }
  50% {
    opacity: 0.84;
    filter: blur(48px) hue-rotate(2deg);
  }
  100% {
    opacity: 0.78;
    filter: blur(46px) hue-rotate(0deg);
  }
}

@keyframes arc-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(4%, -3%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes network-drift {
  0% {
    transform: translateY(-5vh) scale(1.08);
  }
  50% {
    transform: translateY(-2vh) scale(1.1);
  }
  100% {
    transform: translateY(-5vh) scale(1.08);
  }
}

@media (max-width: 600px) {
  body {
    padding: 40px 20px;
  }

  .bg-aurora__layer {
    filter: blur(36px);
    opacity: 0.06;
  }

  .aurora-toggle {
    flex-wrap: wrap;
    justify-content: center;
  }
}
