@font-face {
  font-family: "IBM Plex Mono Term";
  src: url("/yerkure/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono Term";
  src: url("/yerkure/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #070b08;
  --panel: #0c1410;
  --phosphor: #7dff9a;
  --phosphor-dim: rgba(125, 255, 154, 0.55);
  --phosphor-faint: rgba(125, 255, 154, 0.18);
  --amber: #e0b36a;
  --amber-dim: rgba(224, 179, 106, 0.65);
  --frost: #8aa7b6;
  --line: rgba(125, 255, 154, 0.16);
  --danger: #ff6b6b;
  --mono: "IBM Plex Mono Term", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--phosphor);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 40;
}
.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* CRT atmosphere — restrained, not purple glow */
body {
  background:
    radial-gradient(90% 70% at 70% 20%, rgba(125, 255, 154, 0.06), transparent 55%),
    radial-gradient(70% 60% at 20% 80%, rgba(224, 179, 106, 0.07), transparent 50%),
    linear-gradient(180deg, #050806 0%, #0a120e 45%, #070b08 100%);
}

.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.14),
      rgba(0, 0, 0, 0.14) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}

.term-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.term-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 8, 0.88);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--phosphor-dim);
}

.term-bar-left,
.term-bar-right,
.term-bar-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.term-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
  background: var(--phosphor);
  box-shadow: 0 0 6px rgba(125, 255, 154, 0.45);
}

.term-path {
  color: var(--amber);
}

.term-bar a {
  color: var(--phosphor-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.term-bar a:hover,
.term-bar a:focus-visible {
  color: var(--phosphor);
  border-color: var(--phosphor);
  outline: none;
}

.term-sep {
  opacity: 0.35;
}

.stage {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.copy {
  padding: 1rem clamp(0.9rem, 3vw, 1.6rem) 0.5rem;
  max-width: 36rem;
  animation: boot-in 0.7s steps(18, end) both;
}

.prompt-line {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--phosphor-dim);
}
.prompt {
  color: var(--amber);
  margin-right: 0.35rem;
}

.brand {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--phosphor);
  text-shadow: 0 0 18px rgba(125, 255, 154, 0.18);
}

.headline {
  margin: 0.7rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.01em;
}

.lede {
  margin: 0.55rem 0 0;
  color: var(--phosphor-dim);
  font-size: 0.86rem;
  max-width: 32rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.cta button {
  appearance: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--phosphor);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s linear, border-color 0.15s linear, color 0.15s linear;
}
.cta-primary {
  background: rgba(125, 255, 154, 0.12);
  border-color: rgba(125, 255, 154, 0.45);
  color: var(--phosphor);
}
.cta button:hover,
.cta button:focus-visible {
  border-color: var(--phosphor);
  background: rgba(125, 255, 154, 0.1);
  outline: 1px solid var(--phosphor);
  outline-offset: 2px;
}

.disclosure {
  margin: 0.75rem 0 0;
  font-size: 0.68rem;
  color: rgba(125, 255, 154, 0.35);
}

/* Terminal readout / explainer */
.readout {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 20, 16, 0.95), rgba(7, 11, 8, 0.92));
  padding: 0.75rem 0.85rem 0.85rem;
  max-width: 34rem;
}
.readout.is-live {
  border-color: rgba(224, 179, 106, 0.45);
  box-shadow: inset 0 0 0 1px rgba(224, 179, 106, 0.12);
}
.readout:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 2px;
}

.readout-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}
.readout-tag {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  border: 1px solid rgba(224, 179, 106, 0.35);
  padding: 0.1rem 0.35rem;
}
.readout-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--phosphor);
  letter-spacing: -0.01em;
}
.readout-id {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  color: var(--phosphor-dim);
}
.readout-body {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(125, 255, 154, 0.82);
  line-height: 1.55;
  white-space: pre-wrap;
}
.readout-meta {
  margin: 0.65rem 0 0;
  font-size: 0.65rem;
  color: rgba(125, 255, 154, 0.38);
  letter-spacing: 0.02em;
}

.graph-plane {
  position: relative;
  width: 100%;
  min-height: min(70vh, 780px);
}

#graph {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(70vh, 780px);
  cursor: crosshair;
  touch-action: none;
}
#graph:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: -2px;
}

.graph-hint {
  position: absolute;
  left: clamp(0.9rem, 3vw, 1.5rem);
  bottom: 0.85rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--phosphor-dim);
  pointer-events: none;
}
.graph-hint.is-active {
  color: var(--amber);
}

@keyframes boot-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (min-width: 980px) {
  .stage {
    grid-template-columns: minmax(300px, 34vw) 1fr;
    grid-template-rows: 1fr;
  }
  .copy {
    padding: 1.25rem 1rem 1.25rem 1.25rem;
    align-self: center;
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
  }
  .graph-plane {
    min-height: calc(100vh - 2.2rem);
  }
  #graph {
    min-height: calc(100vh - 2.2rem);
  }
  .graph-hint {
    left: auto;
    right: 1rem;
  }
}

@media (max-width: 720px) {
  .term-bar-nav a:nth-child(n + 3) {
    display: none;
  }
  .brand {
    font-size: clamp(2.1rem, 12vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy {
    animation: none;
  }
  .crt-overlay {
    opacity: 0.18;
  }
}
