:root {
  color-scheme: dark;
  --black: #050305;
  --black-soft: #0b070b;
  --paper: #f4edf3;
  --paper-dim: #b8aeb6;
  --magenta: #ff2777;
  --magenta-dim: #9b1f4e;
  --green: #00ff4c;
  --green-dim: #087a2c;
  --line: rgba(255, 39, 119, 0.42);
  --content-width: 920px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 39, 119, 0.04), transparent 38rem),
    var(--black);
  color: var(--paper);
  font-family: "Courier New", Consolas, "Lucida Console", monospace;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
  background: rgba(255, 255, 255, 0.012);
}

a {
  color: inherit;
}

::selection {
  background: var(--magenta);
  color: var(--black);
}

.signal-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: auto;
  opacity: 0.16;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      rgba(0, 0, 0, 0.08) 1px,
      rgba(0, 0, 0, 0.08) 3px
    ),
    radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.38) 100%);
}

.site-shell {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) 0 34px;
}

.js.booting .site-shell {
  visibility: hidden;
  opacity: 0;
}

.js.ready .site-shell {
  animation: signal-lock 380ms steps(3, end) both;
}

.site-header {
  position: relative;
  padding: 0 0 clamp(36px, 6vw, 62px);
}

.site-header::before {
  position: absolute;
  top: -22px;
  left: 0;
  width: 46px;
  height: 6px;
  content: "";
  background: var(--magenta);
  box-shadow: 52px 0 0 var(--magenta-dim);
}

.eyebrow,
.tagline,
.era,
.terminal-note,
.site-footer p,
.boot-label {
  margin: 0;
}

.eyebrow {
  margin-bottom: 19px;
  color: var(--paper-dim);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  color: var(--magenta);
  font-family: "Lucida Console", Consolas, Monaco, monospace;
  font-size: clamp(3rem, 10vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.88;
  text-shadow: 0 0 7px rgba(255, 39, 119, 0.34);
}

h1 span {
  color: var(--paper);
  text-shadow: 0 0 5px rgba(244, 237, 243, 0.18);
}

.tagline {
  margin-top: 19px;
  color: var(--paper);
  font-size: clamp(0.88rem, 2.2vw, 1.05rem);
  letter-spacing: 0.04em;
}

.tagline span,
.era span,
.site-footer span {
  color: var(--magenta);
}

.era {
  margin-top: 8px;
  color: var(--paper-dim);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.system-rule {
  height: 1px;
  margin-bottom: clamp(42px, 7vw, 74px);
  background: var(--magenta-dim);
}

h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.prompt {
  color: var(--magenta);
  font-weight: 700;
  text-shadow: 0 0 5px rgba(255, 39, 119, 0.36);
}

.service-list {
  display: grid;
  gap: 12px;
  margin-top: 25px;
}

.service-row {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 9px;
}

.service-row code {
  flex: 0 0 auto;
  color: var(--paper);
  font: inherit;
}

.dot-leader {
  flex: 1 1 auto;
  min-width: 18px;
  height: 0.8em;
  border-bottom: 2px dotted rgba(184, 174, 182, 0.38);
}

.service-status {
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.status-online {
  color: var(--green);
  text-shadow: 0 0 6px rgba(0, 255, 76, 0.3);
}

a.status-online:hover,
a.status-online:focus-visible {
  color: var(--black);
  background: var(--green);
  outline: 3px solid var(--green);
  text-shadow: none;
}

.status-restricted {
  color: var(--paper-dim);
}

.terminal-section {
  margin-top: clamp(55px, 9vw, 92px);
}

.terminal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--magenta);
}

.sound-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--magenta);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.2;
  cursor: pointer;
}

.sound-toggle.is-on {
  color: var(--green);
  text-shadow: 0 0 5px rgba(0, 255, 76, 0.24);
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  color: var(--black);
  background: var(--green);
  outline: 3px solid var(--green);
  text-shadow: none;
}

.terminal-frame {
  position: relative;
  min-height: 324px;
  overflow: hidden;
  border: 1px solid var(--magenta);
  background: rgba(3, 2, 3, 0.9);
  box-shadow:
    5px 5px 0 rgba(155, 31, 78, 0.26),
    inset 0 0 28px rgba(255, 39, 119, 0.022);
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 11px 6px;
  border-bottom: 1px solid var(--magenta-dim);
  background: rgba(255, 39, 119, 0.075);
  color: var(--paper-dim);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.terminal-output {
  height: 284px;
  overflow: hidden;
  padding: 17px 18px 22px;
  color: var(--paper);
  font-size: clamp(0.72rem, 2.3vw, 0.88rem);
  line-height: 1.52;
  white-space: pre-wrap;
}

.term-line {
  min-height: 1.52em;
}

.term-positive {
  color: var(--green);
  text-shadow: 0 0 5px rgba(0, 255, 76, 0.26);
}

.term-muted {
  color: var(--paper-dim);
}

.term-accent {
  color: var(--magenta);
}

.cursor {
  display: inline-block;
  width: 0.62em;
  height: 1em;
  margin-left: 0.18em;
  vertical-align: -0.14em;
  background: var(--green);
  box-shadow: 0 0 5px rgba(0, 255, 76, 0.36);
  animation: cursor-blink 1.05s steps(1, end) infinite;
}

.terminal-note {
  margin-top: 12px;
  color: var(--paper-dim);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: right;
}

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(55px, 9vw, 95px);
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 0 5px rgba(0, 255, 76, 0.2);
}

.site-footer .footer-code {
  color: var(--paper-dim);
  font-size: inherit;
  font-weight: 400;
  text-shadow: none;
}

.boot-screen {
  display: none;
}

.js.booting .boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--black);
}

.boot-window {
  width: min(100%, 650px);
}

.boot-label {
  margin-bottom: 22px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--magenta-dim);
  color: var(--magenta);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.boot-label span {
  float: right;
  color: var(--paper-dim);
}

.boot-log {
  min-height: 262px;
  color: var(--paper);
  font-size: clamp(0.68rem, 2.6vw, 0.88rem);
  line-height: 1.5;
}

.boot-line {
  min-height: 1.5em;
}

.boot-line .ok {
  color: var(--green);
  text-shadow: 0 0 5px rgba(0, 255, 76, 0.24);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@keyframes signal-lock {
  0% { opacity: 0; transform: translateY(2px); }
  48% { opacity: 0.72; }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 28px), var(--content-width));
    padding-top: 64px;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4.4rem);
  }

  .service-list {
    gap: 18px;
  }

  .service-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
  }

  .service-row code {
    grid-column: 1;
  }

  .dot-leader {
    display: none;
  }

  .service-status {
    grid-column: 2;
  }

  .terminal-frame {
    min-height: 346px;
  }

  .terminal-output {
    height: 306px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .site-footer {
    display: block;
  }

  .site-footer .footer-code {
    margin-top: 6px;
  }
}

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

  .signal-noise {
    display: none;
  }

  .crt-overlay {
    opacity: 0.72;
  }

  .cursor {
    opacity: 1;
  }
}

@media (forced-colors: active) {
  .crt-overlay,
  .signal-noise,
  body::before {
    display: none;
  }

  .status-online,
  .term-positive,
  .prompt,
  h1 {
    color: LinkText;
    text-shadow: none;
  }
}
