:root {
  --porcelain: #f3f5f2;
  --paper: #fbfcfa;
  --carbon: #17201e;
  --cobalt: #2448c8;
  --cobalt-dark: #1f43c7;
  --copper: #a8492b;
  --mineral: #a8b5b0;
  --mist: #dce3df;
  --muted: #52605c;
  --display: "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", "Aptos Narrow", sans-serif;
  --body: "Segoe UI Variable", "Aptos", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --page-pad: clamp(1.2rem, 4vw, 4.5rem);
  --rule: 1px solid color-mix(in srgb, var(--carbon) 20%, transparent);
  color-scheme: light;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--porcelain);
  color: var(--carbon);
  font-family: var(--body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--mineral) 18%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--mineral) 14%, transparent) 1px, transparent 1px);
  background-size: 4rem 4rem;
  content: "";
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  background: var(--carbon);
  color: white;
  font-family: var(--mono);
  font-size: 0.78rem;
  transform: translateY(-180%);
}

#systems,
#principles,
#notes {
  scroll-margin-top: 4.5rem;
}

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

/* Language entrance */

.language-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(5rem, 0.3fr) minmax(18rem, 0.8fr) minmax(22rem, 1.4fr);
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  overflow: auto;
  background: var(--carbon);
  color: var(--paper);
  transition: opacity 360ms ease, visibility 360ms ease;
}

body[data-state="site"] .language-gate {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body[data-state="gate"] {
  height: 100dvh;
  overflow: hidden;
}

body[data-state="gate"] .site-shell {
  height: 0;
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
}

html[data-preview="site"] .language-gate {
  display: none;
}

.gate-mark {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 4rem) 1.2rem;
  border-right: 1px solid rgb(255 255 255 / 18%);
  color: var(--mineral);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.gate-copy {
  align-self: center;
  padding: clamp(2rem, 5vw, 6rem);
}

.gate-kicker,
.eyebrow,
.inspection-index,
.project-state,
.principle-code,
.board-label,
.node-kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.4;
}

.gate-kicker {
  color: var(--mineral);
}

.gate-copy h1 {
  max-width: 9ch;
  margin: 1.2rem 0;
  font-family: var(--display);
  font-size: clamp(3.5rem, 7vw, 8rem);
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.86;
  text-transform: uppercase;
}

.gate-copy p:last-child {
  max-width: 30rem;
  color: #c7d0cc;
  font-size: 1rem;
}

.language-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100%;
}

.gate-copy,
.language-choices,
.hero-copy,
.hero-board,
.section-heading > *,
.systems-workspace,
.constellation,
.inspection-panel,
.note-coordinate,
.note-content,
.publication-list,
.publication {
  min-width: 0;
}

.language-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 3.2vw, 3.5rem);
  overflow: hidden;
  border: 0;
  border-left: 1px solid rgb(255 255 255 / 18%);
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
}

.language-choice::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cobalt);
  content: "";
  transform: translateY(101%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.language-choice:last-child::before {
  background: var(--copper);
}

.language-choice:hover::before,
.language-choice:focus-visible::before {
  transform: translateY(0);
}

.choice-index {
  position: absolute;
  top: clamp(1.5rem, 4vw, 4rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.choice-name {
  font-family: var(--display);
  font-size: clamp(2.4rem, 3.6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}

.choice-note {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.73rem;
}

.gate-footnote {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.8rem var(--page-pad);
  border-top: 1px solid rgb(255 255 255 / 18%);
  color: var(--mineral);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-align: right;
}

/* Site shell */

.site-shell {
  min-height: 100vh;
  opacity: 0;
  transition: opacity 420ms ease 180ms;
}

html[data-preview="site"] .site-shell {
  opacity: 1;
}

body[data-state="site"] .site-shell {
  opacity: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.2rem;
  padding: 0 var(--page-pad);
  border-bottom: var(--rule);
  background: color-mix(in srgb, var(--porcelain) 90%, transparent);
  backdrop-filter: blur(14px);
}

.identity-mark {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.identity-cluster {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.identity-name {
  margin-left: 0.75rem;
  white-space: nowrap;
}

.identity-initials {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: var(--carbon);
  color: white;
}

.identity-slash {
  margin: 0 0.6rem;
  color: var(--copper);
}

.mentor-index-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.mentor-index-link strong {
  color: var(--copper);
  font-size: 0.65rem;
}

.mentor-index-link:hover {
  color: var(--cobalt);
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.site-nav a,
.github-link,
.language-switch,
.footer-links {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a,
.github-link {
  text-decoration: none;
}

.github-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav a:hover,
.github-link:hover,
.footer-links a:hover,
.footer-links button:hover {
  color: var(--cobalt);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.language-switch button,
.footer-links button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.55rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.language-switch button.active {
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(25rem, 0.9fr);
  min-height: calc(100dvh - 4.2rem);
  border-bottom: var(--rule);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 9vw, 9rem) var(--page-pad);
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--cobalt);
}

.hero h1 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 8.1vw, 9.4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.82;
  text-transform: uppercase;
}

.hero h1 em {
  display: block;
  color: var(--copper);
  font-size: 0.68em;
  font-style: normal;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.hero h1,
.section-heading h2,
.notes-section h2,
.publication h3,
.footer-thesis {
  overflow-wrap: anywhere;
}

.hero-lead {
  max-width: 43rem;
  margin: 2.5rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.primary-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(100%, 23rem);
  padding: 1rem 1.2rem;
  border: 1px solid var(--carbon);
  background: var(--carbon);
  color: white;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.primary-action:hover {
  background: var(--cobalt);
}

.mentor-ledger {
  width: min(100%, 43rem);
  margin: 2.2rem 0;
  scroll-margin-top: 5rem;
}

.mentor-ledger-label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mentor-records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.mentor-record {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  min-height: 4.4rem;
  padding: 0.65rem 0.85rem 0.65rem 0;
  color: inherit;
  text-decoration: none;
}

.mentor-record + .mentor-record {
  padding-left: 0.85rem;
  border-left: var(--rule);
}

.mentor-record:hover strong {
  color: var(--cobalt);
}

.mentor-portrait {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--carbon) 42%, transparent);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.mentor-portrait img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.mentor-copy {
  display: grid;
  min-width: 0;
}

.mentor-copy strong {
  font-size: 0.78rem;
  transition: color 160ms ease;
}

.mentor-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mentor-external {
  color: var(--copper);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.hero-coordinates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 43rem;
  margin: auto 0 0;
  border-top: var(--rule);
}

.hero-coordinates div {
  padding: 1.3rem 1rem 0 0;
}

.hero-coordinates div + div {
  padding-left: 1.5rem;
  border-left: var(--rule);
}

.hero-coordinates dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-coordinates dd {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-weight: 650;
}

.hero-board {
  position: relative;
  min-height: 36rem;
  overflow: hidden;
  border-left: var(--rule);
  background: var(--mist);
}

.hero-board::before,
.hero-board::after {
  position: absolute;
  width: 70%;
  height: 1px;
  top: 50%;
  left: 15%;
  background: var(--mineral);
  content: "";
}

.hero-board::after {
  transform: rotate(90deg);
}

.board-label {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
}

.board-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid var(--mineral);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: min(72%, 34rem);
  aspect-ratio: 1;
}

.orbit-two {
  width: min(44%, 20rem);
  aspect-ratio: 1;
  border-color: var(--cobalt);
}

.board-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.7rem;
  align-items: center;
  width: min(82%, 31rem);
  padding: 1rem;
  border: 1px solid var(--carbon);
  background: var(--porcelain);
  font-family: var(--mono);
  font-size: clamp(0.58rem, 1vw, 0.75rem);
  letter-spacing: 0.11em;
  text-align: center;
  transform: translate(-50%, -50%);
}

.board-core strong {
  color: var(--copper);
  font-size: 1.4rem;
}

.board-coordinate {
  position: absolute;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
}

.coordinate-a { right: 1.4rem; top: 1.4rem; }
.coordinate-b { left: 1.4rem; bottom: 1.4rem; }
.coordinate-c { right: 1.4rem; bottom: 1.4rem; color: var(--cobalt); }

.site-shell.entering .orbit-one {
  animation: orbit-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-shell.entering .orbit-two {
  animation: orbit-in 900ms 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes orbit-in {
  from { opacity: 0; scale: 0.55; }
  to { opacity: 1; scale: 1; }
}

/* Systems workspace */

.systems-section,
.principles-section {
  padding: clamp(5rem, 10vw, 9rem) var(--page-pad);
  border-bottom: var(--rule);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-heading h2,
.notes-section h2 {
  max-width: 17ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.5vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-transform: uppercase;
}

.section-heading > p {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.systems-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.55fr);
  min-height: 41rem;
  border: 1px solid var(--carbon);
  background: var(--paper);
}

.constellation {
  position: relative;
  min-height: 41rem;
  overflow: hidden;
  background-image:
    radial-gradient(circle at center, transparent 0 29%, color-mix(in srgb, var(--mineral) 35%, transparent) 29.2% 29.4%, transparent 29.6%),
    linear-gradient(to right, color-mix(in srgb, var(--mineral) 18%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--mineral) 18%, transparent) 1px, transparent 1px);
  background-size: 100% 100%, 3.2rem 3.2rem, 3.2rem 3.2rem;
}

.connection-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mobile-system-route {
  display: contents;
}

.connection-map line {
  vector-effect: non-scaling-stroke;
  stroke: var(--mineral);
  stroke-width: 1;
  stroke-dasharray: 2.5 2.5;
  transition: stroke 220ms ease, stroke-width 220ms ease, opacity 220ms ease;
}

.connection-map line.dimmed {
  opacity: 0.25;
}

.connection-map line.highlighted {
  stroke: var(--cobalt);
  stroke-width: 2;
  stroke-dasharray: none;
}

.site-shell.entering .connection-map line {
  animation: trace-in 1.1s ease both;
}

@keyframes trace-in {
  from { opacity: 0; stroke-dashoffset: 30; }
  to { opacity: 1; stroke-dashoffset: 0; }
}

.system-node {
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: 3;
  display: grid;
  gap: 0.25rem;
  min-width: 8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--carbon);
  background: var(--paper);
  text-align: left;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.system-node::before,
.system-node::after {
  position: absolute;
  background: var(--carbon);
  content: "";
}

.system-node::before {
  top: 50%;
  left: -0.45rem;
  width: 0.4rem;
  height: 1px;
}

.system-node::after {
  top: -0.45rem;
  left: 50%;
  width: 1px;
  height: 0.4rem;
}

.system-node strong {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1;
  text-transform: uppercase;
}

.node-kind {
  color: var(--muted);
  font-size: 0.55rem;
}

.system-node:hover {
  box-shadow: 5px 5px 0 var(--mist);
  transform: translate(-50%, -50%) translate(-2px, -2px);
}

.system-node.active {
  background: var(--cobalt);
  color: white;
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--cobalt) 22%, var(--mist));
}

.system-node.active .node-kind {
  color: white;
}

.map-legend {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 1.4rem;
  padding-top: 0.7rem;
  border-top: var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-legend > span {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.mobile-map-hint {
  display: none !important;
}

.legend-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--cobalt);
}

.legend-line {
  display: inline-block;
  width: 1.2rem;
  border-top: 1px dashed var(--mineral);
}

.inspection-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  border-left: 1px solid var(--carbon);
  background: var(--carbon);
  color: white;
}

.inspection-panel.refreshing > * {
  animation: content-refresh 260ms ease both;
}

@keyframes content-refresh {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: translateY(0); }
}

.inspection-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgb(255 255 255 / 22%);
}

.inspection-index {
  color: #aab7b2;
}

.inspection-header h3 {
  max-width: 9ch;
  margin: 0.5rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 3.8vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 0.88;
  text-transform: uppercase;
}

.project-state {
  align-self: flex-start;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 35%);
  color: #c7d0cc;
  font-size: 0.54rem;
  white-space: nowrap;
}

.project-thesis {
  margin: 2rem 0;
  color: white;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.45;
}

.project-facts {
  display: grid;
  gap: 1.3rem;
  margin: 0;
}

.project-facts div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgb(255 255 255 / 16%);
}

.project-facts dt {
  color: #96a49f;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0;
  color: #d8dfdc;
  font-size: 0.86rem;
  line-height: 1.55;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 2rem;
}

.project-links a {
  display: inline-flex;
  justify-content: space-between;
  gap: 1rem;
  min-width: 8rem;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 42%);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-links a:hover {
  border-color: var(--copper);
  background: var(--copper);
}

/* Principles and note */

.compact-heading {
  grid-template-columns: 1fr;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--carbon);
  border-bottom: 1px solid var(--carbon);
}

.principles-grid article {
  min-height: 24rem;
  padding: 2rem 2rem 3rem 0;
}

.principles-grid article + article {
  padding-left: 2rem;
  border-left: 1px solid var(--carbon);
}

.principle-code {
  color: var(--copper);
}

.principles-grid h3 {
  max-width: 12ch;
  margin: 5rem 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
}

.principles-grid p {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
}

.notes-section {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1.65fr);
  min-height: 43rem;
  border-bottom: var(--rule);
  background: var(--cobalt);
  color: white;
}

.note-coordinate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--page-pad);
  border-right: 1px solid rgb(255 255 255 / 35%);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.note-coordinate strong {
  font-family: var(--display);
  font-size: clamp(5rem, 12vw, 14rem);
  letter-spacing: -0.08em;
  line-height: 0.7;
}

.note-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 9vw, 9rem) var(--page-pad);
}

.note-content .eyebrow {
  color: white;
}

.notes-section h2 {
  max-width: 16ch;
}

.note-content > p:not(.eyebrow) {
  max-width: 47rem;
  margin: 2rem 0;
  color: white;
  font-size: 1.03rem;
}

.publication-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2rem 0 2.5rem;
  border-top: 1px solid rgb(255 255 255 / 45%);
  border-left: 1px solid rgb(255 255 255 / 45%);
}

.publication {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 16rem;
  padding: 1.4rem 3.3rem 1.4rem 1.4rem;
  border-right: 1px solid rgb(255 255 255 / 45%);
  border-bottom: 1px solid rgb(255 255 255 / 45%);
  color: white;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.publication:hover,
.publication:focus-visible {
  background: white;
  color: var(--cobalt);
}

.featured-publication {
  grid-column: 1 / -1;
  min-height: 18rem;
}

.publication-meta {
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.09em;
}

.publication h3 {
  max-width: 17ch;
  margin: auto 0 1rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 3.3rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
}

.featured-publication h3 {
  max-width: 22ch;
  font-size: clamp(2.3rem, 4vw, 4.6rem);
}

.publication p {
  max-width: 42rem;
  margin: 0;
  color: white;
  font-size: 0.82rem;
  line-height: 1.5;
}

.publication:hover p,
.publication:focus-visible p {
  color: var(--cobalt-dark);
}

.publication-arrow {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  font-size: 1.1rem;
}

/* Paper documents */

.paper-document {
  transform-origin: 50% 48%;
}

.paper-document::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(31deg, transparent 0 43%, rgb(255 255 255 / 34%) 44%, transparent 45% 100%),
    linear-gradient(147deg, transparent 0 56%, rgb(23 32 30 / 20%) 57%, transparent 58% 100%),
    linear-gradient(78deg, transparent 0 67%, rgb(255 255 255 / 23%) 68%, transparent 69% 100%),
    linear-gradient(212deg, transparent 0 35%, rgb(23 32 30 / 14%) 36%, transparent 37% 100%);
  content: "";
  opacity: 0.06;
  pointer-events: none;
}

.paper-motion-ready .paper-document:not(.paper-open) {
  clip-path: polygon(42% 3%, 61% 0, 70% 18%, 94% 25%, 82% 47%, 98% 67%, 73% 72%, 64% 100%, 43% 84%, 20% 94%, 22% 69%, 0 57%, 17% 38%, 8% 18%, 35% 21%);
  filter: brightness(0.78) contrast(1.18);
  opacity: 0.34;
  transform: perspective(900px) rotateX(20deg) rotateZ(-3deg) scale(0.58);
}

.paper-motion-ready .paper-document:not(.paper-open)::before {
  opacity: 0.72;
}

.paper-motion-ready .paper-document.paper-open {
  animation: paper-unfold 880ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--paper-index, 0) * 85ms);
}

.paper-motion-ready .paper-document.paper-open::before {
  animation: crease-release 880ms ease both;
  animation-delay: calc(var(--paper-index, 0) * 85ms);
}

@keyframes paper-unfold {
  0% {
    clip-path: polygon(42% 3%, 61% 0, 70% 18%, 94% 25%, 82% 47%, 98% 67%, 73% 72%, 64% 100%, 43% 84%, 20% 94%, 22% 69%, 0 57%, 17% 38%, 8% 18%, 35% 21%);
    filter: brightness(0.78) contrast(1.18);
    opacity: 0.34;
    transform: perspective(900px) rotateX(20deg) rotateZ(-3deg) scale(0.58);
  }

  48% {
    clip-path: polygon(5% 2%, 96% 0, 98% 45%, 94% 96%, 51% 99%, 3% 95%, 0 54%);
    filter: brightness(0.94) contrast(1.08);
    opacity: 0.88;
    transform: perspective(900px) rotateX(-3deg) rotateZ(0.7deg) scale(1.015, 0.96);
  }

  72% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    filter: none;
    opacity: 1;
    transform: perspective(900px) rotateX(1deg) rotateZ(-0.2deg) scale(0.995, 1.008);
  }

  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    filter: none;
    opacity: 1;
    transform: none;
  }
}

@keyframes crease-release {
  from { opacity: 0.72; }
  55% { opacity: 0.28; }
  to { opacity: 0.06; }
}

.archive-link {
  margin-top: 0.5rem;
}

.archive-link,
.footer-links a,
.footer-links button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.text-link {
  width: fit-content;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid white;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link:hover {
  color: #ffd5c7;
  border-color: #ffd5c7;
}

/* CV renderer */

.cv-section {
  padding: clamp(5rem, 10vw, 9rem) var(--page-pad);
  border-bottom: var(--rule);
  background: var(--mist);
}

.cv-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 3rem;
  align-items: end;
  max-width: 86rem;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
}

.cv-section-heading > * {
  min-width: 0;
}

.cv-section-heading h2 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.5vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-transform: uppercase;
}

.cv-section-heading > p {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.cv-renderer {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: var(--carbon);
}

.cv-controls {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgb(255 255 255 / 20%);
  color: white;
}

.cv-control-toggle {
  display: none;
}

.cv-control-panel {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  width: 100%;
}

.cv-control-panel > div {
  display: grid;
  gap: 0.25rem;
}

.cv-controls > div {
  display: grid;
  gap: 0.25rem;
}

.cv-control-label,
.cv-control-note,
.cv-download {
  font-family: var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cv-control-label {
  font-size: 0.68rem;
}

.cv-control-note {
  color: #9eaaa6;
  font-size: 0.58rem;
}

.cv-download {
  display: inline-flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  min-width: 14rem;
  min-height: 44px;
  padding: 0.8rem 1rem;
  border: 1px solid white;
  background: white;
  color: var(--carbon);
  font-size: 0.64rem;
  cursor: pointer;
}

.cv-download:hover {
  border-color: var(--copper);
  background: var(--copper);
  color: white;
}

.cv-paper-shell {
  --cv-frame-height: 68rem;

  position: relative;
  display: block;
  width: min(100%, 52rem);
  min-height: var(--cv-frame-height);
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1.4rem 4rem rgb(0 0 0 / 30%);
  transition: min-height 180ms ease;
}

.cv-paper-shell iframe {
  display: block;
  width: 100%;
  height: var(--cv-frame-height);
  border: 0;
  background: white;
}

.cv-end-sentinel {
  display: block;
  width: 100%;
  height: 1px;
}

.cv-standalone-fallback {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 1rem;
  color: var(--carbon);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  align-items: flex-end;
  padding: clamp(4rem, 8vw, 7rem) var(--page-pad) 2rem;
  background: var(--carbon);
  color: white;
  flex-wrap: wrap;
}

.footer-integrity {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  color: #b7c2be;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.footer-integrity strong {
  color: white;
  font-size: 0.78rem;
}

.footer-integrity a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: 0.3rem;
  color: #b7c2be;
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-integrity a:hover {
  color: white;
}

.footer-thesis {
  max-width: 20ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}

.footer-note {
  max-width: 37rem;
  margin: 1.5rem 0 0;
  color: #9eaaa6;
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  white-space: nowrap;
}

.footer-links a,
.footer-links button {
  color: white;
}

.noscript-content {
  max-width: 60rem;
  margin: 4rem auto;
  padding: 2rem;
}

/* Responsive */

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-board {
    min-height: 30rem;
    border-top: var(--rule);
    border-left: 0;
  }

  .systems-workspace {
    grid-template-columns: 1fr;
  }

  .inspection-panel {
    min-height: 34rem;
    border-top: 1px solid var(--carbon);
    border-left: 0;
  }
}

@media (max-width: 800px) {
  .language-gate {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .gate-mark {
    grid-row: 1 / 3;
    padding: 1.2rem 0.7rem;
  }

  .gate-copy {
    align-self: auto;
    padding: clamp(1.2rem, 5dvh, 2rem) 1.15rem 1rem;
  }

  .gate-copy h1 {
    max-width: 10ch;
    margin: 0.75rem 0;
    font-size: clamp(2.45rem, 12vw, 4.2rem);
  }

  .gate-copy p:last-child {
    margin-bottom: 0;
    font-size: 0.88rem;
  }

  .language-choices {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .language-choice {
    min-height: 0;
    padding: 1rem 1.15rem;
    border-top: 1px solid rgb(255 255 255 / 18%);
    border-left: 0;
  }

  .choice-index {
    top: 1.2rem;
    right: 1.2rem;
  }

  .choice-name {
    font-size: clamp(2.2rem, 11vw, 4rem);
  }

  .gate-footnote {
    grid-column: 1 / -1;
    text-align: left;
  }

  .identity-mode,
  .github-link {
    display: none;
  }

  .identity-name {
    font-size: 0.66rem;
  }

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

  .site-header {
    background: var(--porcelain);
    backdrop-filter: none;
  }

  .header-actions {
    gap: 0.7rem;
  }

  .identity-mark {
    min-width: 44px;
    min-height: 44px;
  }

  .language-switch {
    gap: 0;
  }

  .language-switch > span {
    display: none;
  }

  .language-switch button {
    min-width: 44px;
    min-height: 44px;
    padding: 0.6rem;
  }

  .hero-copy {
    min-height: auto;
    padding-top: clamp(4rem, 13dvh, 7rem);
    padding-bottom: clamp(4rem, 11dvh, 6rem);
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(3.15rem, 15vw, 5.4rem);
  }

  .hero h1 em {
    font-size: 0.62em;
  }

  .hero-lead {
    margin: 2rem 0;
    font-size: 1rem;
  }

  .mentor-records {
    grid-template-columns: 1fr;
  }

  .mentor-record + .mentor-record {
    padding-left: 0;
    border-top: var(--rule);
    border-left: 0;
  }

  .hero-coordinates,
  .section-heading,
  .principles-grid,
  .notes-section {
    grid-template-columns: 1fr;
  }

  .hero-coordinates div + div {
    padding-left: 0;
    border-left: 0;
  }

  .section-heading {
    gap: 1.5rem;
  }

  .systems-section,
  .principles-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .section-heading h2,
  .notes-section h2 {
    max-width: 100%;
    font-size: clamp(2.65rem, 11.5vw, 4rem);
  }

  .constellation {
    display: block;
    min-height: 10.5rem;
    padding: 0 0 0.9rem;
    overflow: hidden;
    background-size: 2.5rem 2.5rem;
  }

  .mobile-system-route {
    display: flex;
    gap: 0.8rem;
    padding: 1rem 1rem 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 1rem;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--cobalt) transparent;
    scrollbar-width: thin;
  }

  .connection-map {
    display: none;
  }

  .system-node {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 0 clamp(9.5rem, 46vw, 12rem);
    min-width: 9.5rem;
    min-height: 5.6rem;
    transform: none;
    scroll-snap-align: start;
  }

  .system-node:hover {
    transform: translate(-2px, -2px);
  }

  .map-legend {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    min-width: 0;
    margin: 0 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .desktop-map-relation {
    display: none !important;
  }

  .mobile-map-hint {
    display: inline-flex !important;
    color: var(--cobalt);
  }

  .inspection-panel {
    min-height: 0;
  }

  .project-links a {
    align-items: center;
    min-height: 44px;
    padding-block: 0.8rem;
  }

  .principles-grid {
    border-bottom: 0;
  }

  .principles-grid article,
  .principles-grid article + article {
    min-height: 0;
    padding: 2rem 0 3rem;
    border-right: 0;
    border-bottom: 1px solid var(--carbon);
    border-left: 0;
  }

  .principles-grid h3 {
    margin-top: 3rem;
  }

  .note-coordinate {
    flex-direction: row;
    align-items: end;
    min-height: 6.5rem;
    padding: 1.25rem var(--page-pad);
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 35%);
  }

  .note-coordinate strong {
    font-size: 4.8rem;
  }

  .note-content {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .publication-list {
    grid-template-columns: 1fr;
  }

  .featured-publication {
    grid-column: auto;
  }

  .publication,
  .featured-publication {
    min-height: 12.5rem;
    padding: 1.2rem 3rem 1.2rem 1.2rem;
  }

  .publication h3,
  .featured-publication h3 {
    max-width: 15ch;
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .archive-link,
  .footer-links a,
  .footer-links button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .cv-section {
    padding: 4.5rem var(--page-pad);
  }

  .cv-section-heading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cv-section-heading h2 {
    max-width: 100%;
    font-size: clamp(2.65rem, 11.5vw, 4rem);
  }

  .cv-renderer {
    margin-inline: calc(var(--page-pad) * -1);
    padding: 1rem var(--page-pad) var(--page-pad);
  }

  .cv-controls {
    position: fixed;
    right: var(--page-pad);
    bottom: 1rem;
    z-index: 4;
    display: none;
    width: max-content;
    max-width: 100%;
    margin: 0 0 1rem auto;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 22%);
    background: rgb(23 32 30 / 94%);
    box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 22%);
    backdrop-filter: blur(12px);
  }

  .cv-controls.is-active {
    display: block;
  }

  .cv-control-toggle {
    display: inline-flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    min-width: 8rem;
    min-height: 44px;
    padding: 0.75rem 0.9rem;
    border: 0;
    background: white;
    color: var(--carbon);
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .cv-controls > .cv-control-panel {
    display: none;
  }

  .cv-controls[data-expanded="true"] {
    width: 100%;
    padding: 0.75rem;
  }

  .cv-controls[data-expanded="true"] .cv-control-toggle {
    width: 100%;
    margin-bottom: 0.75rem;
    border: 1px solid rgb(23 32 30 / 18%);
  }

  .cv-controls[data-expanded="true"] .cv-control-toggle span:last-child {
    transform: rotate(180deg);
  }

  .cv-controls[data-expanded="true"] > .cv-control-panel {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .cv-download {
    width: 100%;
  }

  .cv-paper-shell {
    --cv-frame-height: 82rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 3.7rem;
  }

  .identity-initials {
    width: 1.8rem;
    height: 1.8rem;
  }

  .identity-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .identity-slash {
    display: none;
  }

  .identity-cluster {
    gap: 0.45rem;
  }

  .mentor-index-link {
    min-width: 44px;
    justify-content: center;
  }

  .footer-integrity {
    flex-wrap: wrap;
  }

  .hero {
    min-height: calc(100dvh - 3.7rem);
  }

  .hero-board {
    min-height: 19rem;
  }

  .hero-coordinates {
    display: none;
  }

  .project-facts div {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .paper-document,
  .paper-document::before {
    clip-path: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
