:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(3, 10, 20, 0.92);
  --line: #1e293b;
  --text: #cbd5e1;
  --muted: #64748b;
  --green: #86efac;
  --blue: #7dd3fc;
  --yellow: #fde68a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 6vh 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 197, 94, 0.1), transparent 36rem),
    radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.1), transparent 32rem),
    var(--bg);
  font-size: 15px;
  line-height: 1.7;
}
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: repeating-linear-gradient(0deg, #fff 0, #fff 1px, transparent 1px, transparent 3px);
}
.terminal {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid #263449;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 32px 100px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #0f172a;
  color: var(--muted);
  font-size: 12px;
}
.traffic { display: flex; gap: 8px; }
.traffic span { width: 11px; height: 11px; border-radius: 50%; background: #fb7185; }
.traffic span:nth-child(2) { background: #fbbf24; }
.traffic span:nth-child(3) { background: #4ade80; }
.title { flex: 1; text-align: center; }
.status { min-width: 49px; text-align: right; }
.screen { padding: clamp(24px, 4vw, 48px); }
p { margin: 0 0 16px; }
.command-block { margin-bottom: 38px; }
.prompt { margin: 0 0 18px; color: #e2e8f0; overflow-wrap: anywhere; font-size: inherit; font-weight: 400; }
.prompt span { color: var(--green); }
.prompt b { color: var(--blue); font-weight: 400; }
.output { padding-left: 22px; border-left: 1px solid #1b2a3c; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 36px; align-items: start; }
.ascii {
  margin: 0 0 16px;
  color: #f8fafc;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-shadow: 3px 3px 0 rgba(34,197,94,0.25);
}
.role { color: var(--yellow); margin-bottom: 16px; }
.lede { max-width: 630px; font-size: 1.05rem; }
.avatar { margin: 0; }
.avatar img { display: block; width: 100%; height: auto; border-radius: 12px; }
.prose { max-width: 860px; }
.prose p:last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.file { margin: 0; color: var(--blue); font-size: inherit; font-weight: 700; }
.quests { list-style: none; }
.quests li + li { margin-top: 12px; }
.quest-status { color: var(--yellow); }
.grid p { margin: 8px 0 0; font-size: 13px; color: #94a3b8; }
.links { display: flex; flex-wrap: wrap; gap: 14px; }
a {
  color: var(--green);
  text-decoration: none;
  border: 1px solid #24513b;
  padding: 7px 14px;
  background: rgba(34,197,94,0.05);
}
a::before { content: "[ "; color: var(--muted); }
a::after { content: " ]"; color: var(--muted); }
a:hover, a:focus-visible { color: #020617; background: var(--green); outline: none; border-color: var(--green); }
a:hover::before, a:hover::after, a:focus-visible::before, a:focus-visible::after { color: #166534; }
.final { margin-bottom: 0; }
.cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* Motion is opt-in: content remains visible without animation support. */
@media (prefers-reduced-motion: no-preference) {
  .terminal {
    animation: terminal-open 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .command-block > .prompt {
    animation: output-arrive 450ms ease-out both;
    animation-delay: var(--reveal-delay, 100ms);
  }
  .command-block > .output {
    animation: output-arrive 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--reveal-delay, 100ms) + 100ms);
  }
  .command-block:nth-child(2) { --reveal-delay: 220ms; }
  .command-block:nth-child(3) { --reveal-delay: 340ms; }
  .command-block:nth-child(4) { --reveal-delay: 460ms; }
  .command-block:nth-child(5) { --reveal-delay: 580ms; }
  .output { transition: border-color 250ms ease; }
  .command-block:hover > .output { border-color: #3b7656; }
  .avatar img { transition: transform 350ms ease, box-shadow 350ms ease; }
  .grid article { transition: transform 250ms ease; }
  a {
    transition: transform 180ms ease, background-color 180ms ease,
      color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  }
  a::before, a::after { transition: color 180ms ease; }
  a:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(134, 239, 172, 0.12);
  }
  a:active { transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .avatar:hover img {
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  }
  .grid article:hover { transform: translateY(-3px); }
  a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(134, 239, 172, 0.12);
  }
  a:active { transform: translateY(0); }
}
@keyframes terminal-open {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes output-arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
@media (max-width: 720px) {
  body { padding: 16px 10px; font-size: 13px; }
  .topbar { padding: 12px; }
  .status { display: none; }
  .title { text-align: right; font-size: 10px; }
  .screen { padding: 24px 18px; }
  .hero-grid, .grid { grid-template-columns: 1fr; }
  .avatar { max-width: 180px; }
  .output { padding-left: 16px; }
  .lede { font-size: 14px; }
}
