:root {
  --bg: #0b0f14;
  --panel: #0f1621;
  --panel-2: #0c121b;
  --text: #e6f1ff;
  --muted: #97a8c3;
  --accent: #5fffd7;
  --accent-2: #38bdf8;
  --danger: #ff5f56;
  --warn: #ffbd2e;
  --ok: #27c93f;
  --glow: 0 0 24px rgba(95, 255, 215, 0.3);
  --radius: 14px;
  --scanline-opacity: 0.3;
  --crt-opacity: 0;
  --bg-glow-1: rgba(56, 189, 248, 0.15);
  --bg-glow-2: rgba(95, 255, 215, 0.12);
}

body.theme-matrix {
  --accent: #3bff72;
  --accent-2: #1aff4d;
  --glow: 0 0 26px rgba(59, 255, 114, 0.35);
  --bg-glow-1: rgba(59, 255, 114, 0.14);
  --bg-glow-2: rgba(26, 255, 77, 0.1);
}

body.theme-amber {
  --accent: #ffb454;
  --accent-2: #ffd28a;
  --glow: 0 0 26px rgba(255, 180, 84, 0.35);
  --bg-glow-1: rgba(255, 180, 84, 0.18);
  --bg-glow-2: rgba(255, 210, 138, 0.12);
}

body.theme-cyan {
  --accent: #5eead4;
  --accent-2: #38bdf8;
  --glow: 0 0 26px rgba(94, 234, 212, 0.35);
  --bg-glow-1: rgba(56, 189, 248, 0.16);
  --bg-glow-2: rgba(94, 234, 212, 0.12);
}

body.theme-rose {
  --accent: #fb7185;
  --accent-2: #fda4af;
  --glow: 0 0 26px rgba(251, 113, 133, 0.35);
  --bg-glow-1: rgba(251, 113, 133, 0.18);
  --bg-glow-2: rgba(253, 164, 175, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: radial-gradient(1200px circle at 10% 10%, var(--bg-glow-1), transparent 55%),
              radial-gradient(800px circle at 90% 20%, var(--bg-glow-2), transparent 45%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.25;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(500px circle at 70% 80%, rgba(56, 189, 248, 0.16), transparent 60%);
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: soft-light;
  pointer-events: none;
  opacity: var(--scanline-opacity);
}

.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 700px at 50% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
              radial-gradient(800px 400px at 50% 100%, rgba(0, 0, 0, 0.4), transparent 70%);
  opacity: var(--crt-opacity);
  mix-blend-mode: screen;
}

.terminal {
  background: linear-gradient(180deg, rgba(15, 22, 33, 0.92), rgba(10, 15, 24, 0.92));
  border: 1px solid rgba(95, 255, 215, 0.15);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), var(--glow);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(20, 30, 44, 0.9), rgba(12, 18, 27, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: var(--danger); }
.dot.amber { background: var(--warn); }
.dot.green { background: var(--ok); }

.title {
  margin-left: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
}

.terminal-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero {
  position: relative;
}

.hero .terminal-body {
  gap: 18px;
}

.prompt {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
}

.meta-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(95, 255, 215, 0.15);
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.panel p,
.panel li {
  color: var(--text);
  line-height: 1.65;
  font-size: 14.5px;
}

.panel p {
  margin: 0;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-list li {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.entry {
  padding: 12px 0 0;
  border-top: 1px dashed rgba(95, 255, 215, 0.18);
}

.entry:first-child {
  border-top: none;
  padding-top: 0;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.role {
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}

.org {
  color: var(--accent-2);
  font-weight: 600;
}

.dates {
  color: var(--muted);
  font-style: italic;
}

ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.footer {
  text-align: left;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(95, 255, 215, 0.4);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: var(--glow);
  background: rgba(95, 255, 215, 0.06);
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(95, 255, 215, 0.12);
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.typed {
  color: var(--text);
}

.cursor {
  color: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.live-terminal .terminal-body {
  gap: 16px;
}

.terminal-screen {
  min-height: 160px;
  background: rgba(3, 8, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  overflow-y: auto;
  max-height: 320px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5);
}

.terminal-output {
  margin: 0 0 12px 0;
  white-space: pre-wrap;
}

.terminal-output .cmd {
  color: var(--accent);
  font-weight: 600;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(95, 255, 215, 0.16);
  border-radius: 10px;
  padding: 8px 12px;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.terminal-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.chip {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--accent-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.chip:hover {
  background: rgba(56, 189, 248, 0.16);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 2px);
  opacity: 0.08;
  mix-blend-mode: soft-light;
}

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

@media (max-width: 720px) {
  .terminal-body {
    padding: 18px;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .page {
    padding: 24px 14px 60px;
  }
}
