:root {
  --bg: #060807;
  --bg-soft: #0a0e0b;
  --panel: #0c110d;
  --lime: #b4ff3a;
  --lime-soft: rgba(180, 255, 58, 0.55);
  --lime-dim: rgba(180, 255, 58, 0.16);
  --ink: #e6eae2;
  --ink-dim: #8b9588;
  --red: #ff5c5c;
  --yellow: #ffd75c;
  --green: #7dff9c;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- background ---------- */

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.14) 2px 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.6;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- layout ---------- */

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 34px;
  animation: fade-in 1.2s ease both;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 0 18px var(--lime-dim);
}

.logo span {
  color: var(--lime);
  text-shadow: 0 0 14px var(--lime-soft);
}

.sys {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.sys-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

.stage {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 90px;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 34px;
  animation: fade-up 1s 0.15s ease both;
}

.eyebrow span {
  color: var(--lime);
}

.glitch {
  position: relative;
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: lowercase;
  margin-bottom: 26px;
  animation: fade-up 1s 0.3s ease both;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
}

.glitch::before {
  color: var(--lime);
  transform: translate(3px, -2px);
  animation: glitch-a 3.2s infinite steps(1);
  opacity: 0.85;
}

.glitch::after {
  color: var(--red);
  transform: translate(-3px, 2px);
  animation: glitch-b 3.2s infinite steps(1);
  opacity: 0.6;
}

.sub {
  font-size: 0.95rem;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
  margin-bottom: 44px;
  animation: fade-up 1s 0.45s ease both;
}

/* ---------- terminal ---------- */

.terminal {
  width: min(560px, 92vw);
  background: var(--panel);
  border: 1px solid rgba(180, 255, 58, 0.18);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 18px 60px rgba(0, 0, 0, 0.55),
    0 0 46px rgba(180, 255, 58, 0.05);
  text-align: left;
  animation: fade-up 1s 0.6s ease both;
}

.term-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(180, 255, 58, 0.12);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px 12px 0 0;
}

.term-head span[class^="t-"] {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.t-red    { background: var(--red); }
.t-yellow { background: var(--yellow); }
.t-green  { background: var(--green); }

.t-title {
  margin-left: 8px;
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.term-body {
  padding: 20px 22px 24px;
  font-size: 0.86rem;
  line-height: 1.9;
}

.term-body p { white-space: pre-wrap; }

.prompt {
  color: var(--lime);
  font-weight: 700;
}

.cmd { color: var(--ink); }

.out { color: var(--ink-dim); }
.out.dim { color: rgba(139, 149, 136, 0.7); }
.ok { color: var(--lime); }

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  vertical-align: text-bottom;
  margin-left: 3px;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime-soft);
  animation: blink 1.1s steps(2, jump-none) infinite;
}

.hint {
  margin-top: 34px;
  font-size: 0.78rem;
  color: rgba(139, 149, 136, 0.75);
  letter-spacing: 0.04em;
  animation: fade-up 1s 0.8s ease both;
}

.foot {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 24px 26px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(139, 149, 136, 0.6);
  animation: fade-in 1.6s 1s ease both;
}

.foot-sep { color: var(--lime); opacity: 0.7; }

/* ---------- animations ---------- */

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.78); }
}

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

@keyframes glitch-a {
  0%   { clip-path: inset(0 0 100% 0); }
  8%   { clip-path: inset(12% 0 62% 0); }
  10%  { clip-path: inset(0 0 100% 0); }
  46%  { clip-path: inset(64% 0 8% 0); }
  48%  { clip-path: inset(30% 0 52% 0); }
  50%  { clip-path: inset(0 0 100% 0); }
  100% { clip-path: inset(0 0 100% 0); }
}

@keyframes glitch-b {
  0%   { clip-path: inset(0 0 100% 0); }
  6%   { clip-path: inset(58% 0 22% 0); }
  8%   { clip-path: inset(0 0 100% 0); }
  44%  { clip-path: inset(18% 0 70% 0); }
  46%  { clip-path: inset(0 0 100% 0); }
  74%  { clip-path: inset(48% 0 34% 0); }
  76%  { clip-path: inset(0 0 100% 0); }
  100% { clip-path: inset(0 0 100% 0); }
}

@media (max-width: 560px) {
  .topbar { padding: 18px 20px; }
  .term-body { font-size: 0.78rem; padding: 16px 16px 20px; }
  .glitch { letter-spacing: -0.01em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}