:root {
  --bg: #050807;
  --bg-2: #0e120f;
  --panel: rgba(7, 10, 8, 0.48);
  --panel-2: rgba(20, 24, 18, 0.3);
  --line: rgba(128, 255, 171, 0.2);
  --line-strong: rgba(255, 201, 95, 0.26);
  --text: #d6f5cf;
  --muted: #8aa284;
  --green: #8cff74;
  --amber: #ffc95f;
  --red: #ff7e67;
  --cyan: #7ce7bc;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(140, 255, 116, 0.12), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 201, 95, 0.1), transparent 18%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.video-stage,
.ambient-grid,
.scanlines {
  position: fixed;
  inset: 0;
}

.video-stage {
  overflow: hidden;
  z-index: 0;
}

.video-stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(0.8) contrast(1.05) brightness(0.42);
}

.video-stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(0, 0, 0, 0.1), rgba(2, 5, 3, 0.76)),
    linear-gradient(180deg, rgba(4, 8, 5, 0.15), rgba(4, 8, 5, 0.48));
}

.ambient-grid,
.scanlines {
  pointer-events: none;
}

.ambient-grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(140, 255, 116, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 255, 116, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

.scanlines {
  z-index: 2;
  opacity: 0.16;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.05) 51%,
    transparent 51%,
    transparent 100%
  );
  background-size: 100% 5px;
}

.shell {
  position: relative;
  z-index: 3;
  width: min(1160px, calc(100% - 28px));
  margin: 14px auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 201, 95, 0.07), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(124, 231, 188, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(8, 12, 9, 0.3), rgba(5, 8, 6, 0.44));
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.shell::before {
  content: "spectrascope bulletin board // unauthorized beauty // chicago signal";
  display: block;
  padding: 7px 18px;
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 201, 95, 0.035);
}

.shell__header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.shell__lights {
  display: flex;
  gap: 8px;
}

.shell__lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.shell__lights span:nth-child(1) { background: var(--red); }
.shell__lights span:nth-child(2) { background: var(--amber); }
.shell__lights span:nth-child(3) { background: var(--green); }

.shell__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero,
.columns,
.terminal-wrap,
.footer,
.panel {
  padding: 24px 20px;
}

.hero {
  display: grid;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 201, 95, 0.028), rgba(140, 255, 116, 0.012));
}

.hero__prompt {
  color: var(--green);
  font-size: 0.9rem;
}

.prompt { color: var(--cyan); }
.caret { margin: 0 8px; color: var(--amber); }

.hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(255, 201, 95, 0.07);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill--live {
  color: var(--green);
  border-color: rgba(140, 255, 116, 0.26);
  background: rgba(140, 255, 116, 0.08);
}

h1,
h2 {
  margin: 0;
  font-family: "VT323", "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
}

h1 {
  max-width: 16ch;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.88;
  color: #f5f0bf;
  text-shadow: 0 0 18px rgba(255, 201, 95, 0.16);
}

h2 {
  font-size: 2rem;
  color: var(--amber);
}

.lede,
.panel p,
.footer {
  color: var(--muted);
  line-height: 1.72;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
}

.columns .panel,
.archive-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  position: relative;
  backdrop-filter: blur(14px) saturate(1.02);
  -webkit-backdrop-filter: blur(14px) saturate(1.02);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.columns .panel::before,
.archive-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(140, 255, 116, 0.1);
  pointer-events: none;
}

.panel__label {
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(140, 255, 116, 0.14);
}

.stack-list li:last-child {
  border-bottom: 0;
}

.terminal-wrap {
  border-top: 1px solid var(--line);
}

.terminal {
  position: relative;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(140, 255, 116, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(140, 255, 116, 0.05), transparent 20%),
    radial-gradient(circle at 85% 12%, rgba(255, 201, 95, 0.04), transparent 22%),
    linear-gradient(180deg, rgba(7, 10, 7, 0.3), rgba(12, 16, 12, 0.38));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(1.03);
  -webkit-backdrop-filter: blur(14px) saturate(1.03);
  cursor: text;
}

.terminal__ghost-input {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.terminal:focus {
  outline: 2px solid rgba(140, 255, 116, 0.3);
  outline-offset: 2px;
}

.terminal__output {
  min-height: 380px;
  max-height: 52vh;
  overflow: auto;
  padding-bottom: 12px;
}

.terminal__line {
  margin: 0 0 9px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.58;
}

.terminal__line--ascii {
  white-space: pre;
  word-break: normal;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: clamp(0.5rem, 1vw, 0.82rem);
  line-height: 1.18;
  letter-spacing: 0;
  font-variant-ligatures: none;
  text-shadow: 0 0 10px rgba(140, 255, 116, 0.08);
}

.terminal__line--muted {
  color: var(--muted);
}

.terminal__line--success {
  color: var(--green);
}

.terminal__line--warn {
  color: var(--amber);
}

.terminal__line--error {
  color: #ffb09a;
}

.terminal__line--prompt {
  color: var(--text);
}

.terminal__prompt {
  color: var(--green);
  display: inline-block;
  width: 21ch;
  flex: 0 0 21ch;
}

.terminal__input-row {
  display: grid;
  grid-template-columns: 21ch minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(140, 255, 116, 0.14);
  font-size: 1rem;
  line-height: 1.58;
}

.terminal__input {
  display: inline;
  min-height: 1.58em;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.58;
}

.terminal__cursor {
  display: inline-block;
  width: 10px;
  height: 1.12em;
  vertical-align: text-bottom;
  background: var(--green);
  box-shadow: 0 0 14px rgba(140, 255, 116, 0.45);
  animation: blink 1s steps(1, end) infinite;
}

.terminal__hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.terminal__dock-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding-bottom: 4px;
}

.terminal__dock-chip {
  border: 1px solid rgba(124, 231, 188, 0.24);
  background:
    linear-gradient(180deg, rgba(16, 28, 17, 0.96), rgba(7, 12, 8, 0.96));
  color: #dbffd4;
  border-radius: 3px;
  padding: 9px 12px 8px;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  text-transform: lowercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 4px 10px rgba(0, 0, 0, 0.18);
}

.terminal__dock-chip--signal {
  color: #ffd994;
  border-color: rgba(255, 201, 95, 0.3);
  background:
    linear-gradient(180deg, rgba(58, 42, 16, 0.96), rgba(28, 18, 7, 0.96));
}

.help-menu {
  display: none !important;
}

.help-menu__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  background: rgba(255, 201, 95, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.help-menu__body {
  margin: 0;
  padding: 8px;
  list-style: none;
}

.help-menu__item {
  width: 100%;
  display: grid;
  grid-template-columns: 13ch minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.help-menu__item:hover,
.help-menu__item--active {
  background: rgba(140, 255, 116, 0.1);
}

.help-menu__cmd {
  color: var(--green);
}

.help-menu__detail {
  color: var(--muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.archive-card {
  padding: 18px;
}

.archive-card__tag {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-card p:last-child {
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer a,
.terminal__line a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dotted rgba(124, 231, 188, 0.5);
}

.footer a:hover,
.footer a:focus-visible,
.terminal__line a:hover,
.terminal__line a:focus-visible {
  color: #f7ffd1;
  border-bottom-color: #f7ffd1;
}

code {
  color: var(--amber);
}

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

@media (max-width: 860px) {
  .columns,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    display: grid;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 10px, 1160px);
    margin: 6px auto;
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(8, 11, 9, 0.24), rgba(5, 7, 5, 0.34));
    backdrop-filter: blur(2px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  }

  .shell::before {
    background: rgba(255, 201, 95, 0.02);
  }

  .shell__header {
    background: rgba(255, 255, 255, 0.005);
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(255, 201, 95, 0.015), rgba(140, 255, 116, 0.008));
  }

  .hero,
  .columns,
  .terminal-wrap,
  .footer,
  .panel {
    padding: 18px 14px;
  }

  .terminal {
    min-height: 560px;
    padding: 14px;
    background:
      radial-gradient(circle at top left, rgba(140, 255, 116, 0.03), transparent 20%),
      linear-gradient(180deg, rgba(7, 10, 7, 0.28), rgba(12, 16, 12, 0.36));
  }

  .terminal__prompt {
    width: 17ch;
    flex-basis: 17ch;
  }

  .terminal__input-row {
    grid-template-columns: 17ch minmax(0, 1fr);
  }

  .help-menu {
    inset: 14px;
    width: auto;
  }

  .help-menu__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .columns .panel,
  .archive-card {
    background: linear-gradient(180deg, rgba(7, 10, 8, 0.34), rgba(16, 20, 15, 0.26));
  }

  .video-stage__video {
    opacity: 0.88;
    filter: saturate(0.9) contrast(1.06) brightness(0.58);
  }

  .video-stage__veil {
    background:
      radial-gradient(circle at top, rgba(0, 0, 0, 0.04), rgba(2, 5, 3, 0.38)),
      linear-gradient(180deg, rgba(4, 8, 5, 0.06), rgba(4, 8, 5, 0.18));
  }

  h1 {
    max-width: none;
  }
}
