:root {
  color-scheme: dark;
  --screen-blue: #4031b5;
  --screen-blue-dark: #25118f;
  --border-blue: #7869ff;
  --outer-blue: #18105f;
  --paper: #6f69d8;
  --ink: #d8d6ff;
  --ink-bright: #ffffff;
  --ink-dim: #b7b2ff;
  --inverse-ink: #201070;
  --pink: #ff94df;
  --warning: #ffe17a;
  --shadow: rgba(0, 0, 24, 0.72);
  --font-system: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #080622;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at center, rgba(120, 105, 255, 0.22), transparent 38rem),
    linear-gradient(180deg, #0d0936 0%, #070518 100%);
  font-family: var(--font-system);
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: uppercase;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 4;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.055) 0,
      rgba(255, 255, 255, 0.055) 1px,
      rgba(0, 0, 0, 0.12) 2px,
      rgba(0, 0, 0, 0.12) 4px
    );
  mix-blend-mode: screen;
}

body::after {
  z-index: 3;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.34) 100%);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--warning);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 6;
  padding: 0.65rem 0.85rem;
  color: var(--inverse-ink);
  background: var(--warning);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.computer-frame {
  position: relative;
  width: min(1180px, calc(100% - 1rem));
  min-height: calc(100vh - 1rem);
  margin: 0.5rem auto;
  border: clamp(14px, 3vw, 34px) solid var(--border-blue);
  outline: 8px solid var(--outer-blue);
  background: var(--screen-blue);
  box-shadow:
    0 0 0 2px #a8a0ff inset,
    0 22px 70px var(--shadow),
    0 0 46px rgba(120, 105, 255, 0.38);
}

.computer-frame::before {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  content: "";
  border: 2px solid rgba(216, 214, 255, 0.52);
}

.crt-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 2.2vw, 2rem) 0;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.25rem;
  min-height: 18vh;
  padding-block: clamp(1rem, 3vw, 2.25rem);
}

.kicker,
.memory,
.prompt,
.line-number,
.screen-row,
.tape,
.site-footer {
  color: var(--ink-bright);
}

.kicker,
.memory,
.prompt,
.line-number,
.tape {
  margin: 0 0 0.35rem;
  font-size: clamp(0.82rem, 1.7vw, 1rem);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  width: fit-content;
  margin: 0.35rem 0 0;
  padding: 0.04em 0.12em 0.02em;
  color: var(--screen-blue-dark);
  background: var(--paper);
  font-size: clamp(3.2rem, 11vw, 8.4rem);
  line-height: 0.95;
}

.subtitle {
  max-width: 46rem;
  margin: 0.85rem 0 0;
  color: var(--ink-bright);
  font-size: clamp(0.95rem, 2.3vw, 1.25rem);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.top-nav a,
.command-link,
.easter-button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  color: var(--inverse-ink);
  background: var(--paper);
  font: 700 0.95rem/1 var(--font-system);
  text-decoration: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.78rem 0.9rem;
}

.boot-panel,
.directory,
.about-panel {
  margin-bottom: clamp(1.1rem, 3vw, 2rem);
  border: 0;
  border-radius: 0;
  background: var(--screen-blue-dark);
  box-shadow:
    0 0 0 2px var(--ink) inset,
    0 0 0 8px var(--screen-blue-dark),
    0 0 0 10px var(--ink);
}

.boot-panel,
.about-panel {
  padding: clamp(1rem, 3vw, 2rem);
}

.boot-panel h2,
.about-panel h2,
.error-shell h1 {
  max-width: 840px;
  margin: 1rem 0 0.75rem;
  color: var(--ink-bright);
  background: transparent;
  padding: 0;
  font-size: clamp(1.45rem, 4vw, 2.85rem);
  line-height: 1.15;
}

.boot-panel p,
.about-panel p {
  max-width: 740px;
  margin: 0.65rem 0;
  color: var(--ink-dim);
}

.screen-row {
  min-height: 1.5rem;
  font-weight: 700;
}

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

.tape {
  display: inline-block;
  margin-top: 1.3rem;
  color: var(--pink);
}

.section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 2px solid var(--ink);
}

.section-heading h2 {
  margin: 0;
  color: var(--ink-bright);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.service-list {
  display: grid;
  gap: 0;
}

.service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 7.75rem;
  padding: clamp(1rem, 3vw, 1.45rem);
  border-bottom: 2px solid rgba(216, 214, 255, 0.42);
  background: var(--screen-blue-dark);
}

.service-card:last-child {
  border-bottom: 0;
}

.service-card h3 {
  width: fit-content;
  margin: 0.1rem 0 0;
  padding: 0.08rem 0.25rem;
  color: var(--inverse-ink);
  background: var(--paper);
  font-size: clamp(1.25rem, 3.6vw, 2rem);
  line-height: 1.05;
}

.service-card p {
  margin: 0.35rem 0 0;
  color: var(--ink-dim);
}

.service-card.active {
  background:
    linear-gradient(90deg, rgba(147, 247, 255, 0.14), transparent 45%),
    var(--screen-blue-dark);
}

.command-link,
.easter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.command-link::before,
.easter-button::before {
  content: "> ";
}

.command-link:hover,
.top-nav a:hover,
.easter-button:hover {
  color: var(--screen-blue-dark);
  background: var(--ink-bright);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 0.85rem;
  color: var(--warning);
  background: transparent;
  font-weight: 700;
}

.status-badge::before {
  content: "?";
  margin-right: 0.2rem;
}

.easter-button {
  margin-top: 1rem;
}

.easter-output {
  min-height: 1.55rem;
  color: var(--warning) !important;
}

.site-footer {
  padding: 1rem 0 2rem;
  font-size: 0.9rem;
}

.cursor {
  display: inline-block;
  width: 0.75em;
  height: 1em;
  margin-left: 0.35em;
  background: currentColor;
  vertical-align: -0.15em;
  animation: blink 1.05s steps(2, start) infinite;
}

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

.error-page {
  display: grid;
  place-items: center;
}

.error-frame {
  min-height: auto;
}

.error-shell {
  width: min(820px, calc(100% - 2rem));
}

.home-link {
  margin-top: 1rem;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .computer-frame {
    width: calc(100% - 0.5rem);
    min-height: calc(100vh - 0.5rem);
    margin: 0.25rem auto;
    border-width: 14px;
    outline-width: 4px;
  }

  .site-header,
  .section-heading,
  .service-card {
    display: block;
  }

  .top-nav {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .command-link,
  .status-badge {
    width: 100%;
    margin-top: 1rem;
  }

  .service-card {
    min-height: 0;
  }
}

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