:root {
  color-scheme: light;
  --paper: #f1f0eb;
  --ink: #1f211e;
  --muted: #6a6b66;
  --line: #d9d6cf;
  --blue: #1e6076;
  --red: #a64d34;
  --green: #5f7044;
  --plum: #6b5278;
  --gold: #9b7a2c;
  --cream: #fffdf8;
  --shadow: 0 18px 55px rgba(33, 28, 19, 0.1);
  --body-background: linear-gradient(180deg, rgba(255, 254, 250, 0.9), rgba(241, 240, 235, 0.96));
  --focus-outline: rgba(60, 62, 57, 0.28);
  --brand-mark-color: #55554f;
  --brand-mark-background: rgba(255, 253, 248, 0.72);
  --panel: rgba(255, 253, 248, 0.96);
  --panel-border: rgba(80, 86, 82, 0.2);
  --panel-shadow: 0 12px 34px rgba(33, 28, 19, 0.14);
  --soft-overlay: rgba(251, 250, 246, 0.68);
  --label-halo: rgba(251, 250, 246, 0.92);
  --readout-shadow: rgba(255, 255, 255, 0.7);
  --copy: #303633;
  --map-ring: #9aa7b5;
  --map-hierarchy: #8c9daf;
  --map-link: #b8752e;
  --map-folder: #557d9b;
  --map-note: #a2abb7;
  --map-root: #2e6f9f;
  --map-active: #245f8a;
  --map-text: #263238;
  --map-muted-text: #66727a;
  --map-node-stroke: rgba(255, 255, 255, 0.92);
  --spinner-border: rgba(30, 96, 118, 0.2);
  --academic-background: linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(241, 240, 235, 0.92));
  --academic-copy: #30322f;
  --academic-secondary: #40423e;
  --academic-subtle: #85857f;
  --academic-link-hover: #17495a;
  --academic-link-decoration: rgba(30, 96, 118, 0.3);
  --academic-photo-shadow: 0 12px 35px rgba(33, 28, 19, 0.08);
  --academic-chip-copy: #555650;
  --academic-chip-background: rgba(255, 253, 248, 0.52);
  --academic-item-accent: #e2aa79;
  --academic-heading: #282a27;
  --academic-meta: #71726c;
  --life-surface: var(--paper);
}

:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #111512;
  --ink: #e8e7e0;
  --muted: #a3a59f;
  --line: #343a35;
  --blue: #70aabd;
  --red: #d27a61;
  --green: #94a978;
  --plum: #ab8dba;
  --gold: #c7a65a;
  --cream: #1a1f1b;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  --body-background: linear-gradient(180deg, rgba(25, 30, 26, 0.97), rgba(17, 21, 18, 0.99));
  --focus-outline: rgba(204, 218, 209, 0.44);
  --brand-mark-color: var(--muted);
  --brand-mark-background: rgba(27, 32, 28, 0.8);
  --panel: rgba(27, 32, 28, 0.98);
  --panel-border: rgba(211, 221, 214, 0.18);
  --panel-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  --soft-overlay: rgba(17, 21, 18, 0.74);
  --label-halo: rgba(17, 21, 18, 0.94);
  --readout-shadow: rgba(0, 0, 0, 0.76);
  --copy: #d1d3ce;
  --map-ring: #536577;
  --map-hierarchy: #637b91;
  --map-link: #d99a59;
  --map-folder: #75a7c8;
  --map-note: #9aabba;
  --map-root: #78bce8;
  --map-active: #8cc9ed;
  --map-text: #edf1ee;
  --map-muted-text: #aab4b5;
  --map-node-stroke: rgba(15, 19, 16, 0.94);
  --spinner-border: rgba(112, 170, 189, 0.28);
  --academic-background: var(--body-background);
  --academic-copy: var(--copy);
  --academic-secondary: #c4c8c2;
  --academic-subtle: var(--muted);
  --academic-link-hover: #9bc7d5;
  --academic-link-decoration: rgba(112, 170, 189, 0.45);
  --academic-photo-shadow: 0 12px 35px rgba(0, 0, 0, 0.32);
  --academic-chip-copy: #c8cbc5;
  --academic-chip-background: rgba(255, 255, 255, 0.04);
  --academic-item-accent: #a97855;
  --academic-heading: var(--ink);
  --academic-meta: var(--muted);
  --life-surface: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background:
    var(--body-background),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
.ascii-map:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 4px;
}

.page {
  width: calc(100% - 40px);
  max-width: 1220px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 32px;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.92rem;
}

.masthead > nav {
  width: auto;
  padding-bottom: 0;
}

.masthead-primary {
  justify-content: flex-start;
}

.home-link {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.home-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.about-compact {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
}

.brand img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  color: var(--brand-mark-color);
  background: var(--brand-mark-background);
  box-shadow: var(--shadow);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

nav a {
  border-bottom: 1px solid transparent;
}

nav a:hover,
nav a[aria-current="page"],
nav summary:hover,
nav summary[aria-current="page"] {
  color: var(--ink);
  border-color: currentColor;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  list-style: none;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  display: grid;
  gap: 8px;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.theme-switcher {
  position: relative;
  flex: 0 0 auto;
}

.theme-switcher summary {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  list-style: none;
}

.theme-switcher summary::-webkit-details-marker {
  display: none;
}

.theme-switcher summary:hover,
.theme-switcher[open] summary {
  border-color: var(--muted);
  color: var(--ink);
}

.theme-icon {
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

:root[data-theme-preference="day"] .theme-icon {
  background: currentColor;
  box-shadow: inset 0 0 0 2.5px var(--paper);
}

:root[data-theme-preference="night"] .theme-icon {
  border-color: transparent;
  background: currentColor;
  box-shadow: 3px -2px 0 0 var(--paper) inset;
}

.theme-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.theme-options button {
  position: relative;
  width: 100%;
  padding: 7px 26px 7px 9px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.theme-options button:hover,
.theme-options button:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  outline: 0;
}

.theme-options button.is-selected {
  color: var(--ink);
}

.theme-options button.is-selected::after {
  position: absolute;
  top: 50%;
  right: 9px;
  content: "✓";
  transform: translateY(-50%);
}

main {
  flex: 1;
}

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

.meta-main {
  display: flex;
  align-items: center;
  padding: 22px 0 18px;
}

.meta-stage,
.cosmos-frame,
.cosmos-shell {
  width: 100%;
}

.cosmos-frame {
  margin: 0;
}

.cosmos-shell {
  position: relative;
}

.worldmodel-diagram {
  width: 100%;
  min-height: 690px;
  height: clamp(690px, calc(100vh - 135px), 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(6px, 0.5vw, 10px);
  overflow: hidden;
}

.ascii-stage {
  position: relative;
  isolation: isolate;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: transparent;
}

.ascii-map {
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  color: rgba(31, 33, 30, 0.56);
  font: 700 0.68rem/0.94 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  letter-spacing: 0;
  user-select: none;
  white-space: pre;
  cursor: crosshair;
  transform-origin: center;
}

.ascii-cell {
  display: inline-block;
  width: 0.61em;
  min-height: 1em;
  color: rgba(31, 33, 30, 0.1);
  transition: none;
}

.ascii-run {
  width: calc(var(--ascii-run-length) * 0.61em);
  letter-spacing: calc(0.61em - 1ch);
}

.ascii-cell.is-universe {
  color: rgba(38, 48, 78, 0.42);
}

.ascii-cell.is-universe.tone-sky-silver {
  color: rgba(91, 106, 130, 0.62);
}

.ascii-cell.is-universe.tone-sky-blue,
.ascii-cell.is-universe.tone-sky-star {
  color: rgba(36, 83, 170, 0.62);
}

.ascii-cell.is-universe.tone-sky-gold {
  color: rgba(199, 133, 24, 0.76);
}

.ascii-cell.is-universe.tone-sky-violet {
  color: rgba(104, 78, 169, 0.66);
}

.ascii-cell.is-firework {
  color: #d38a18;
}

.ascii-cell.is-firework.tone-firework-gold {
  color: #d38a18;
  text-shadow:
    0 0 5px rgba(211, 138, 24, 0.38),
    0 0 14px rgba(211, 138, 24, 0.24);
}

.ascii-cell.is-firework.tone-firework-red {
  color: #c94b35;
  text-shadow:
    0 0 5px rgba(201, 75, 53, 0.34),
    0 0 14px rgba(201, 75, 53, 0.2);
}

.ascii-cell.is-firework.tone-firework-blue {
  color: #2d70bf;
  text-shadow:
    0 0 5px rgba(45, 112, 191, 0.34),
    0 0 14px rgba(45, 112, 191, 0.2);
}

.ascii-cell.is-firework.tone-firework-violet {
  color: #7654b8;
  text-shadow:
    0 0 5px rgba(118, 84, 184, 0.34),
    0 0 14px rgba(118, 84, 184, 0.2);
}

.ascii-cell.is-earth {
  color: rgba(42, 66, 76, 0.56);
}

.ascii-cell.is-self {
  color: rgba(31, 33, 30, 0.72);
}

.ascii-cell.is-author {
  color: rgba(144, 81, 48, 0.82);
}

.ascii-cell.is-worldmodel {
  color: rgba(31, 33, 30, 0.42);
}

.ascii-cell.is-earth.tone-earth-deep-sea {
  color: rgba(28, 67, 94, 0.5);
}

.ascii-cell.is-earth.tone-earth-shallow-sea {
  color: rgba(36, 94, 119, 0.54);
}

.ascii-cell.is-earth.tone-earth-coast {
  color: rgba(82, 103, 108, 0.68);
}

.ascii-cell.is-earth.tone-earth-rainforest {
  color: rgba(75, 91, 94, 0.67);
}

.ascii-cell.is-earth.tone-earth-forest {
  color: rgba(71, 86, 90, 0.65);
}

.ascii-cell.is-earth.tone-earth-grass {
  color: rgba(79, 94, 96, 0.63);
}

.ascii-cell.is-earth.tone-earth-dry {
  color: rgba(82, 85, 82, 0.62);
}

.ascii-cell.is-earth.tone-earth-mountain {
  color: rgba(86, 94, 98, 0.72);
}

.ascii-cell.is-earth.tone-earth-tundra {
  color: rgba(92, 111, 111, 0.62);
}

.ascii-cell.is-earth.tone-earth-ice {
  color: rgba(128, 154, 160, 0.66);
}

.ascii-cell.is-earth.tone-earth-rim {
  color: rgba(117, 132, 136, 0.78);
}

.ascii-cell.is-earth.tone-earth-city-hot {
  color: rgba(242, 166, 26, 0.98);
}

.ascii-cell.is-earth.tone-earth-city-dense {
  color: rgba(235, 177, 48, 0.96);
}

.ascii-cell.is-earth.tone-earth-city-light {
  color: rgba(220, 142, 20, 0.9);
}

.ascii-cell.is-earth.tone-earth-city-glow {
  color: rgba(213, 144, 23, 0.78);
}

.ascii-cell.is-author.tone-author-pin {
  color: rgba(171, 55, 36, 0.94);
}

.worldmodel-diagram[data-active-region="universe"] .ascii-cell.is-universe {
  opacity: 1;
  color: #3157b7;
  text-shadow:
    0 0 8px rgba(49, 87, 183, 0.28),
    0 0 24px rgba(49, 87, 183, 0.18);
}

.worldmodel-diagram[data-active-region="universe"] .ascii-cell.is-universe.tone-sky-silver {
  color: #6f7f93;
  text-shadow:
    0 0 8px rgba(111, 127, 147, 0.26),
    0 0 22px rgba(111, 127, 147, 0.18);
}

.worldmodel-diagram[data-active-region="universe"] .ascii-cell.is-universe.tone-sky-blue,
.worldmodel-diagram[data-active-region="universe"] .ascii-cell.is-universe.tone-sky-star {
  color: #2558b8;
  text-shadow:
    0 0 8px rgba(37, 88, 184, 0.3),
    0 0 24px rgba(37, 88, 184, 0.18);
}

.worldmodel-diagram[data-active-region="universe"] .ascii-cell.is-universe.tone-sky-gold {
  color: #c9871b;
  text-shadow:
    0 0 8px rgba(201, 135, 27, 0.32),
    0 0 24px rgba(201, 135, 27, 0.2);
}

.worldmodel-diagram[data-active-region="universe"] .ascii-cell.is-universe.tone-sky-violet {
  color: #664fa9;
  text-shadow:
    0 0 8px rgba(102, 79, 169, 0.28),
    0 0 24px rgba(102, 79, 169, 0.18);
}

.worldmodel-diagram[data-active-region="firework"] .ascii-cell.is-firework {
  opacity: 1;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth {
  opacity: 1;
  color: #8ba1a7;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-deep-sea {
  color: #2d6f99;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-shallow-sea {
  color: #4aa7c2;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-coast {
  color: #b9c4c5;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-rainforest {
  color: #a6b5b8;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-forest {
  color: #9faeb1;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-grass {
  color: #adb7b7;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-dry {
  color: #a8a29a;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-mountain {
  color: #c2c5c2;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-tundra {
  color: #b8c8c7;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-ice {
  color: #e5f4f6;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-rim {
  color: rgba(114, 130, 134, 0.82);
  text-shadow: none;
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-city-hot {
  color: #f2a61a;
  text-shadow:
    0 0 5px rgba(242, 166, 26, 0.34),
    0 0 12px rgba(242, 166, 26, 0.18);
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-city-dense {
  color: #ebb130;
  text-shadow:
    0 0 5px rgba(235, 177, 48, 0.3),
    0 0 12px rgba(235, 177, 48, 0.16);
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-city-light {
  color: #dc9418;
  text-shadow:
    0 0 5px rgba(220, 148, 24, 0.3),
    0 0 12px rgba(220, 148, 24, 0.16);
}

.worldmodel-diagram[data-active-region="earth"] .ascii-cell.is-earth.tone-earth-city-glow {
  color: rgba(213, 144, 23, 0.78);
  text-shadow: none;
}

.worldmodel-diagram[data-active-region="self"] .ascii-cell.is-self,
.worldmodel-diagram[data-active-region="self"] .ascii-cell.is-worldmodel {
  opacity: 1;
  color: #b63f33;
  text-shadow:
    0 0 8px rgba(182, 63, 51, 0.28),
    0 0 24px rgba(182, 63, 51, 0.18);
}

.worldmodel-diagram[data-active-region="author"] .ascii-cell.is-author {
  opacity: 1;
  color: #c44828;
  text-shadow:
    0 0 8px rgba(196, 72, 40, 0.32),
    0 0 20px rgba(196, 72, 40, 0.2);
}

.worldmodel-diagram[data-active-region="worldmodel"] .ascii-cell.is-worldmodel,
.worldmodel-diagram[data-active-region="worldmodel"] .ascii-cell.is-self {
  opacity: 1;
  color: #7352b8;
  text-shadow:
    0 0 8px rgba(115, 82, 184, 0.28),
    0 0 24px rgba(115, 82, 184, 0.18);
}

.diagram-readout {
  position: absolute;
  left: 50%;
  top: 22px;
  width: min(620px, 46vw);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: inherit;
  line-height: inherit;
  text-align: center;
  overflow-wrap: anywhere;
  white-space: normal;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  text-shadow: 0 1px 0 var(--readout-shadow);
}

.diagram-readout::before {
  color: #6a6b66;
  content: "> ";
}

.diagram-readout[data-active-region="universe"]::before {
  color: #3157b7;
}

.diagram-readout[data-active-region="earth"]::before {
  color: #1e5f9f;
}

.diagram-readout[data-active-region="author"]::before {
  color: #c44828;
}

.diagram-readout[data-active-region="self"]::before {
  color: #b63f33;
}

.diagram-readout[data-active-region="worldmodel"]::before {
  color: #7352b8;
}

.diagram-readout.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.content-main {
  padding-top: 82px;
}

.placeholder {
  max-width: 760px;
  padding: 8px 0 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.1rem;
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: 0;
}

.lede {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--copy);
  font-size: 1.24rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.note {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  overflow-wrap: break-word;
}

.text-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
  color: var(--muted);
}

.text-links a {
  border-bottom: 1px solid currentColor;
}

.text-links a:hover {
  color: var(--ink);
}
