/* ============================================================================
   A SPACE TOO BIG TO SEARCH — foundations
   Design tokens, reset, typography. Dark by default; the whole essay is set
   in a void, because that is what the subject is.
   ========================================================================= */

:root {
  /* ── Ground ──────────────────────────────────────────────────────────── */
  --void:        #04060b;
  --deep:        #070b13;
  --raised:      #0c111c;
  --raised-2:    #121927;
  --hairline:    #1c2536;
  --hairline-lit:#2a3752;

  /* ── Ink ─────────────────────────────────────────────────────────────── */
  --ink:         #e9eff8;
  --ink-soft:    #b9c5d6;
  --ink-dim:     #7d8ca3;
  --ink-faint:   #4d596d;

  /* ── Signal ──────────────────────────────────────────────────────────── */
  --key:         #57a8ff;   /* cryptography, key material, the defended thing */
  --key-deep:    #2b6fd6;
  --space:       #2ee6c8;   /* combinatorial space, the big world */
  --space-deep:  #12a894;
  --human:       #ffb347;   /* human scale, the bounded agent */
  --human-deep:  #d98a1f;
  --broken:      #ff5f70;   /* the graveyard */
  --broken-deep: #c8323f;

  /* ── Type ────────────────────────────────────────────────────────────── */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Charter, Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, "Inter", system-ui, -apple-system,
          "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco,
          "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  /* ── Measure & rhythm ────────────────────────────────────────────────── */
  --measure: 34rem;
  --wide: 60rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-gap: clamp(5rem, 14vh, 10rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  background: var(--void);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.72;
  color: var(--ink-soft);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.35em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--key);
  text-decoration-color: color-mix(in srgb, var(--key) 40%, transparent);
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
a:hover { color: var(--space); text-decoration-color: var(--space); }

:focus-visible {
  outline: 2px solid var(--space);
  outline-offset: 3px;
  border-radius: 2px;
}

code, kbd, samp, .mono { font-family: var(--mono); font-size: 0.88em; }

strong, b { color: var(--ink); font-weight: 600; }
em { font-style: italic; color: var(--ink); }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-lit), transparent);
  margin: 3rem 0;
}

::selection { background: color-mix(in srgb, var(--space) 30%, transparent); color: #fff; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--key); color: #041018; padding: 0.65rem 1rem;
  font-family: var(--sans); font-weight: 600; border-radius: 6px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }
