@import url("https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@400;500&family=DM+Mono:wght@300;400;500&family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,500;6..12,600;6..12,700&display=swap");

:root {
  --paper: #f1f0f7;
  --paper-cool: #e6e7f0;
  --paper-deep: #dadce8;
  --ink: #1f2030;
  --muted: #6f7080;
  --line: rgba(45, 50, 86, 0.22);
  --line-dark: rgba(37, 41, 73, 0.45);
  --indigo: #384582;
  --indigo-deep: #252f66;
  --indigo-black: #171d43;
  --indigo-pale: #cfd5ec;
  --violet: #8882ac;
  --milk: #f9f8fc;

  --accent-cyan: #73a8b8;
  --accent-rose: #bd839f;
  --accent-gold: #c39d58;
  --accent-green: #75988c;
  --accent-lilac: #8f84b6;

  --frame-width: 1180px;
  --frame-height: 820px;
  --radius: 22px;

  --font-main: "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
  --font-data: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-accent: "Afacad Flux", ui-sans-serif, system-ui, sans-serif;
}

/* ============================================================
   RESET / GLOBAL
   ============================================================ */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: #070825;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 69, 130, 0.23), transparent 36rem),
    #070825;
  font-family: var(--font-main);
  letter-spacing: 0.005em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(136, 130, 172, 0.14), transparent 18rem),
    radial-gradient(circle at 83% 75%, rgba(115, 168, 184, 0.08), transparent 22rem);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* Actual prose only. Headings, labels, nav and metadata stay ragged. */
.page-prose p,
.compact-lede,
.archive-heading > p,
.single-heading > p,
.project-copy > p,
.writing-row p,
.log-entry p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ============================================================
   STAR FIELD
   ============================================================ */

#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  background-image:
    radial-gradient(circle at 8% 15%, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.3px),
    radial-gradient(circle at 24% 72%, rgba(255, 255, 255, 0.58) 0 1px, transparent 1.3px),
    radial-gradient(circle at 68% 23%, rgba(255, 255, 255, 0.68) 0 1px, transparent 1.3px),
    radial-gradient(circle at 88% 62%, rgba(255, 255, 255, 0.54) 0 1px, transparent 1.3px),
    radial-gradient(circle at 52% 88%, rgba(255, 255, 255, 0.50) 0 1px, transparent 1.3px);
}

#particles-js canvas {
  display: block;
  /* vertical-align: bottom; */
}

/* ============================================================
   OUTER SITE FRAME
   ============================================================ */

.site-stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 32px;
  pointer-events: none;
}

.site-frame {
  position: relative;
  width: min(var(--frame-width), calc(100vw - 64px));
  height: min(var(--frame-height), calc(100vh - 64px));
  min-height: 520px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  overflow: clip;
  border: 1px solid rgba(249, 248, 252, 0.38);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(249, 248, 252, 0.98), rgba(241, 240, 247, 0.97) 56%, rgba(230, 231, 240, 0.98));
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.38),
    0 0 0 8px rgba(23, 29, 67, 0.28);
  pointer-events: auto;
}

.site-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(115deg, transparent 0 48%, rgba(56, 69, 130, 0.028) 48.15% 48.3%, transparent 48.45%),
    radial-gradient(circle, rgba(56, 69, 130, 0.055) 0 1px, transparent 1.2px);
  background-size: 390px 250px, 47px 47px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 95%);
}

.site-header,
.site-scroll,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--violet) transparent;
  scroll-behavior: smooth;
  view-transition-name: site-content;
}

.site-scroll::-webkit-scrollbar {
  width: 9px;
}

.site-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.site-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--violet);
  background-clip: padding-box;
}

/* ============================================================
   HEADER / DESKTOP NAV
   ============================================================ */

.site-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 248, 252, 0.76);
  backdrop-filter: blur(10px);
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  width: fit-content;
  color: var(--indigo-deep);
  view-transition-name: site-brand;
}

.site-brand .brand-name,
.brand-name {
  font-family: var(--font-main);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.brand-kicker,
.header-coordinates,
.site-footer,
.section-index,
.filter-chip,
.gallery-meta small,
.status-pill,
.tag-row,
.project-index,
.project-link,
.writing-row time,
.writing-kind,
.log-entry time,
.back-link,
.chart-label span,
.panel-heading,
.signal-list time {
  font-family: var(--font-data);
}

.brand-kicker {
  color: var(--violet);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-right {
  justify-self: end;
  view-transition-name: header-navigation;
}

.site-nav,
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.1vw, 31px);
  min-width: 0;
}

.nav-link {
  position: relative;
  flex: 0 0 auto;
  padding: 29px 0 25px;
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 150ms ease, transform 150ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 18px;
  height: 1px;
  background: var(--indigo);
  transition: left 160ms ease, right 160ms ease;
}

.nav-spark {
  position: absolute;
  left: -13px;
  top: 50%;
  color: var(--indigo);
  font-size: 9px;
  opacity: 0;
  transform: translate(5px, -57%) rotate(-22deg) scale(0.65);
  transition: opacity 130ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--indigo-deep);
}

.nav-link:hover,
.nav-link:focus-visible {
  transform: translateY(-1px);
}

.nav-link:hover .nav-spark,
.nav-link:focus-visible .nav-spark {
  opacity: 1;
  transform: translate(0, -57%) rotate(0deg) scale(1);
}

.nav-link.is-active::after {
  left: 0;
  right: 0;
}

.header-coordinates {
  justify-self: end;
  color: var(--violet);
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Home header: no duplicate horizontal nav. */
.home-header-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--violet);
  font-family: var(--font-data);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-header-star {
  color: var(--indigo);
  font-size: 8px;
  transform: rotate(8deg);
}

/* Native <details> mobile menu. No JS required. */
.mobile-menu {
  display: none;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  color: var(--violet);
  background: rgba(230, 231, 240, 0.68);
  font-family: var(--font-data);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.footer-site,
.footer-credits {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-footer a {
  border-bottom: 1px dotted rgba(136, 130, 172, 0.45);
  transition: color 150ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--indigo-deep);
}

.desktop-note,
.footer-site .footer-separator {
  display: none;
}

/* ============================================================
   SHARED PAGE TYPOGRAPHY
   ============================================================ */

.page-pad {
  padding: clamp(34px, 4vw, 54px);
}

.compact-intro,
.archive-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  align-items: end;
  gap: 48px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-dark);
}

.section-index {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.compact-intro h1,
.archive-heading h1,
.single-heading h1 {
  margin: 0;
  color: var(--indigo-black);
  font-family: var(--font-main);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.compact-intro h1 {
  font-size: clamp(32px, 4.3vw, 56px);
  line-height: 1.02;
}

.archive-heading h1 {
  font-size: clamp(42px, 5vw, 66px);
  line-height: 0.98;
}

.compact-lede,
.archive-heading > p,
.single-heading > p,
.page-prose {
  color: var(--muted);
  line-height: 1.75;
}

.compact-lede,
/* .archive-heading > p {
  margin: 0;
  max-width: 430px;
  font-family: var(--font-main);
  font-size: 15px;
} */

.archive-heading > p {
  margin: 0;
  max-width: 430px;

  justify-self: end;
  align-self: end;

  color: var(--muted);

  font-family: var(--font-accent);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;

  letter-spacing: 0.005em;
  text-align: right;

  padding-bottom: 5px;
}

/* ============================================================
   HOME — ORBITAL DIRECTORY
   ============================================================ */

.section-home .site-frame {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.section-home .site-scroll {
  overflow: hidden;
}

.home-orbit-page {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px clamp(18px, 3vw, 38px) 20px;
}

.home-greeting {
  position: relative;
  z-index: 8;
  margin: 0;
  padding: 8px 0 2px;
  text-align: center;
}

.home-greeting-kicker {
  margin: 0 0 3px;
  color: var(--violet);
  font-family: var(--font-data);
  font-size: 7px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.home-greeting h1 {
  margin: 0;
  color: var(--indigo-black);
  font-family: var(--font-main);
  font-size: clamp(23px, 2.35vw, 32px);
  font-weight: 600;
  letter-spacing: -0.032em;
}

.celestial-index {
  --drift-x: 0px;
  --drift-y: 0px;
  --counter-x: 0px;
  --counter-y: 0px;
  position: relative;
  width: min(100%, 1010px);
  height: 100%;
  min-height: 450px;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 51%, rgba(207, 213, 236, 0.38), transparent 31%),
    radial-gradient(circle at 50% 51%, rgba(249, 248, 252, 0.72), transparent 56%);
}

.celestial-index::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 51%;
  width: min(45%, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(56, 69, 130, 0.075);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-trace {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 51%;
  border: 1px solid rgba(56, 69, 130, 0.16);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 220ms ease-out;
}

.orbit-trace-a {
  width: min(68%, 690px);
  height: 38%;
  transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) rotate(-13deg);
}

.orbit-trace-b {
  width: min(58%, 585px);
  height: 67%;
  transform: translate(calc(-50% + var(--counter-x)), calc(-50% + var(--counter-y))) rotate(24deg);
}

.orbit-trace-c {
  width: min(34%, 345px);
  height: 84%;
  border-style: dashed;
  opacity: 0.63;
  transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) rotate(61deg);
}

.constellation-lines {
  position: absolute;
  z-index: -1;
  inset: 6% 8%;
  width: 84%;
  height: 86%;
  pointer-events: none;
  opacity: 0.23;
  transform: translate(var(--counter-x), var(--counter-y));
  transition: transform 220ms ease-out;
}

.constellation-lines polyline {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 0.18;
  stroke-dasharray: 0.75 1.35;
  vector-effect: non-scaling-stroke;
}

.sky-point {
  position: absolute;
  z-index: 0;
  width: 5px;
  height: 5px;
  border: 1px solid var(--indigo);
  border-radius: 50%;
  background: var(--milk);
  box-shadow: 0 0 0 4px rgba(207, 213, 236, 0.23);
}

.point-a { left: 12%; top: 31%; }
.point-b { left: 30%; top: 15%; }
.point-c { right: 31%; top: 14%; }
.point-d { right: 11%; top: 31%; }
.point-e { left: 18%; bottom: 15%; }
.point-f { right: 18%; bottom: 14%; }

.observatory-core {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: clamp(220px, 29%, 300px);
  aspect-ratio: 1;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--indigo);
  border-radius: 50%;
  background: var(--indigo-pale);
  box-shadow:
    0 0 0 5px rgba(56, 69, 130, 0.08),
    0 16px 38px rgba(23, 29, 67, 0.12);
  transform:
    translate(-50%, -50%)
    translate(var(--drift-x), var(--drift-y));
  will-change: transform;
  transition: transform 220ms ease-out, box-shadow 180ms ease;
}

.observatory-core::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(56, 69, 130, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.observatory-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.core-sky span {
  position: absolute;
  z-index: 2;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--milk);
  opacity: 0.82;
}

.core-sky span:nth-child(1) { left: 27%; top: 20%; }
.core-sky span:nth-child(2) { right: 28%; top: 28%; }
.core-sky span:nth-child(3) { left: 20%; top: 44%; }
.core-sky span:nth-child(4) { right: 20%; top: 46%; }
.core-sky span:nth-child(5) { left: 51%; top: 13%; }
.core-sky span:nth-child(6) { left: 38%; top: 33%; width: 2px; height: 2px; }

.orbit-link {
  --link-accent: var(--indigo);
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "no name"
    "no desc";
  column-gap: 9px;
  min-width: 144px;
  padding: 8px 10px 8px 12px;
  border-left: 1px solid var(--line-dark);
  background: linear-gradient(90deg, rgba(241, 240, 247, 0.74), rgba(249, 248, 252, 0.19));
  transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.orbit-link::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 12px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--link-accent);
  border-radius: 50%;
  background: var(--paper);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.orbit-link::after {
  content: "✦";
  position: absolute;
  right: 8px;
  top: 8px;
  color: var(--link-accent);
  font-size: 8px;
  opacity: 0;
  transform: scale(0.55) rotate(-18deg);
  transition: opacity 140ms ease, transform 160ms ease;
}

.orbit-link:hover,
.orbit-link:focus-visible {
  border-color: var(--link-accent);
  background: rgba(249, 248, 252, 0.91);
  transform: translateY(-3px);
}

.orbit-link:hover::before,
.orbit-link:focus-visible::before {
  background: var(--link-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--link-accent) 16%, transparent);
  transform: scale(1.08);
}

.orbit-link:hover::after,
.orbit-link:focus-visible::after {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.orbit-no {
  grid-area: no;
  align-self: start;
  margin-top: 2px;
  color: var(--link-accent);
  font-family: var(--font-data);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.orbit-name {
  grid-area: name;
  color: var(--indigo-deep);
  font-family: var(--font-main);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.05;
  transition: color 150ms ease;
}

.orbit-link:hover .orbit-name,
.orbit-link:focus-visible .orbit-name {
  color: var(--link-accent);
}

.orbit-desc {
  grid-area: desc;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 6.5px;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.accent-about { --link-accent: var(--violet); }
.accent-gallery { --link-accent: var(--accent-cyan); }
.accent-writing { --link-accent: var(--accent-rose); }
.accent-code { --link-accent: var(--accent-green); }
.accent-satellites { --link-accent: var(--accent-gold); }
.accent-log { --link-accent: var(--accent-lilac); }

.orbit-about {
  left: 50%;
  top: 3%;
  min-width: 136px;
  transform: translateX(-50%);
}

.orbit-about:hover,
.orbit-about:focus-visible {
  transform: translate(-50%, -3px);
}

.orbit-gallery { left: 4%; top: 21%; }
.orbit-writing { right: 3%; top: 18%; }
.orbit-code { left: 2%; bottom: 19%; }
.orbit-satellites { right: 2%; bottom: 18%; }

.orbit-log {
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
}

.orbit-log:hover,
.orbit-log:focus-visible {
  transform: translate(-50%, -3px);
}

/* ============================================================
   GALLERY
   ============================================================ */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0 24px;
}

.filter-chip {
  appearance: none;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(249, 248, 252, 0.62);
  font-size: 8px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--milk);
  border-color: var(--indigo);
  background: var(--indigo);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  --accent: var(--accent-cyan);
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: zoom-in;
}

.gallery-item[hidden] {
  display: none;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-cool);
}

.gallery-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -3px 0 var(--accent);
  pointer-events: none;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.hover-star {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--indigo-deep);
  background: rgba(249, 248, 252, 0.88);
  box-shadow: 0 5px 18px rgba(23, 29, 67, 0.12);
  opacity: 0;
  transform: rotate(-25deg) scale(0.7);
  transition: opacity 150ms ease, transform 180ms ease;
}

.gallery-item:hover .gallery-thumb img,
.gallery-item:focus-visible .gallery-thumb img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.gallery-item:hover .hover-star,
.gallery-item:focus-visible .hover-star {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 2px 4px;
}

.gallery-meta > span {
  color: var(--indigo-deep);
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.gallery-meta small {
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gallery-item:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 7px;
  border-radius: 10px;
}

/* Gallery lightbox */
.gallery-lightbox {
  width: min(940px, calc(100vw - 64px));
  max-width: none;
  max-height: calc(100vh - 64px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(249, 248, 252, 0.42);
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  box-shadow:
    0 28px 90px rgba(3, 4, 22, 0.58),
    0 0 0 7px rgba(23, 29, 67, 0.24);
}

.gallery-lightbox::backdrop {
  background: rgba(7, 8, 37, 0.72);
  backdrop-filter: blur(5px);
}

.gallery-lightbox[open] {
  animation: lightbox-in 150ms ease-out;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lightbox-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: calc(100vh - 64px);
  background: linear-gradient(135deg, rgba(249, 248, 252, 0.99), rgba(241, 240, 247, 0.98));
}

.lightbox-image-stage {
  min-height: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 40%, rgba(207, 213, 236, 0.44), transparent 45%),
    var(--paper-cool);
}

.lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 240px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 14px 38px rgba(37, 47, 102, 0.12);
}

.lightbox-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--indigo-deep);
  background: rgba(249, 248, 252, 0.90);
  box-shadow: 0 6px 18px rgba(23, 29, 67, 0.12);
  cursor: pointer;
  line-height: 1;
  transition: transform 140ms ease, background 140ms ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  transform: rotate(8deg) scale(1.04);
  background: var(--milk);
}

.lightbox-caption {
  padding: 18px 24px 21px;
  border-top: 1px solid var(--line);
  background: rgba(249, 248, 252, 0.95);
}

.lightbox-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.lightbox-index,
.lightbox-facts {
  margin: 0;
  color: var(--violet);
  font-family: var(--font-data);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lightbox-title {
  margin: 3px 0 0;
  color: var(--indigo-deep);
  font-family: var(--font-main);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.lightbox-description {
  max-width: 700px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.lightbox-description p {
  margin: 0 0 0.8em;
}

.lightbox-description p:last-child {
  margin-bottom: 0;
}

.lightbox-description a {
  color: var(--indigo);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.lightbox-description a:hover {
  color: var(--indigo-deep);
}

/* ============================================================
   CODE / PROJECTS
   ============================================================ */

.project-stack {
  display: grid;
  gap: 0;
}

.project-card {
  --accent: var(--accent-green);
  display: grid;
  grid-template-columns: minmax(210px, 30%) 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.project-card:first-child {
  padding-top: 30px;
}

.project-thumb {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--paper-cool));
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 4px solid var(--accent);
  pointer-events: none;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.project-thumb:hover img {
  transform: scale(1.025);
}

.project-index {
  position: absolute;
  left: 10px;
  bottom: 9px;
  padding: 4px 6px;
  border-radius: 5px;
  color: var(--milk);
  background: color-mix(in srgb, var(--indigo-black) 78%, transparent);
  font-size: 7px;
}

.project-copy {
  align-self: center;
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.project-topline h2 {
  margin: 0;
  color: var(--indigo-deep);
  font-family: var(--font-main);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.project-topline h2 a:hover {
  color: var(--accent);
}

.status-pill {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 999px;
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-copy > p {
  margin: 14px 0 15px;
  max-width: 650px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.tag-row span {
  padding: 4px 7px;
  border-radius: 5px;
  color: color-mix(in srgb, var(--accent) 82%, var(--ink));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 7px;
}

.project-link {
  padding-bottom: 2px;
  color: var(--indigo);
  border-bottom: 1px solid var(--line-dark);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-link:hover {
  color: var(--accent);
}

/* ============================================================
   WRITING
   ============================================================ */

.writing-ledger {
  border-top: 1px solid var(--line);
}

.writing-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 150ms ease, background 150ms ease;
}

.writing-row:hover {
  padding-left: 8px;
  background: linear-gradient(90deg, rgba(189, 131, 159, 0.06), transparent 62%);
}

.writing-row time {
  padding-top: 6px;
  color: var(--violet);
  font-size: 8px;
}

.writing-row h2 {
  margin: 0;
  color: var(--indigo-deep);
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 500;
}

.writing-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.writing-kind {
  padding-top: 6px;
  color: var(--accent-rose);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   SATELLITES — CLICKABLE IMAGE BANNERS
   No aspect-ratio is applied anywhere.
   ============================================================ */

.satellite-banner-list {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.satellite-banner {
  display: block;
  width: min(100%, 580px);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(56, 69, 130, 0.30);
  border-radius: 8px;
  background: transparent;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.satellite-banner img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 7px;
  object-fit: contain;
  image-rendering: auto;
}

.satellite-banner:hover,
.satellite-banner:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(56, 69, 130, 0.50);
  box-shadow: 0 10px 26px rgba(23, 29, 67, 0.08);
}

/* ============================================================
   LOG
   ============================================================ */

.log-stream {
  position: relative;
  margin-top: 28px;
}

.log-stream::before {
  content: "";
  position: absolute;
  left: 113px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.log-entry {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 42px;
  padding: 0 0 30px;
}

.log-entry time {
  padding-top: 5px;
  color: var(--violet);
  font-size: 8px;
  text-align: right;
}

.log-entry h2 {
  margin: 0;
  color: var(--indigo-deep);
  font-family: var(--font-main);
  font-size: 23px;
  font-weight: 500;
}

.log-entry p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.log-dot {
  position: absolute;
  left: 109px;
  top: 7px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--accent-lilac);
  box-shadow: 0 0 0 1px var(--accent-lilac);
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-wrap {
  padding-top: 34px;

  /* Keeps the container aware of the floated image */
  display: flow-root;
}

.about-mark {
  position: relative;

  /* This is what lets the text wrap beside and then below it */
  float: left;

  width: min(39%, 405px);
  aspect-ratio: 1.23 / 1;

  margin: 0 46px 26px 0;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 14px;

  background: var(--milk);
}

.about-photo {
  position: absolute;
  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.about-label {
  position: absolute;
  z-index: 2;

  left: 18px;
  bottom: 16px;

  padding: 5px 7px;

  color: var(--milk);
  background: rgba(7, 8, 37, 0.58);

  border-radius: 4px;
  backdrop-filter: blur(5px);

  font-family: var(--font-data);
  font-size: 8px;
  letter-spacing: 0.12em;
}

/*
  Normal .page-prose is capped at 720px.
  About needs the prose to eventually occupy the whole width.
*/
.about-prose {
  max-width: none;
  margin-top: 0;
}

.about-prose > :first-child {
  margin-top: 0;
}


/* ============================================================
   SINGLE PAGES
   ============================================================ */

.single-page {
  max-width: 880px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--violet);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--indigo);
}

.single-heading {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-dark);
}

.single-heading h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.single-heading > p {
  max-width: 650px;
  margin: 16px 0 0;
  font-family: var(--font-main);
  font-size: 15px;
}

.page-prose {
  max-width: 720px;
  margin-top: 30px;
  font-family: var(--font-main);
  font-size: 16px;
}

.page-prose p {
  margin: 0 0 1.2em;
}

.page-prose h2 {
  margin: 1.7em 0 0.6em;
  color: var(--indigo-deep);
  font-size: 26px;
  font-weight: 500;
}

.page-prose a {
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */

.page-prose pre {
  position: relative;

  margin: 1.4em 0 1.7em;
  padding: 28px 18px 17px;

  overflow-x: auto;

  border: 1px solid rgba(136, 130, 172, 0.28);
  border-radius: 9px;

  background:
    linear-gradient(
      135deg,
      rgba(23, 29, 67, 0.98),
      rgba(31, 35, 67, 0.98)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 22px rgba(23, 29, 67, 0.07);
}

/* tiny archival label */
/* .page-prose pre::before {
  content: "CODE";

  position: absolute;
  top: 9px;
  left: 17px;

  color: rgba(207, 213, 236, 0.5);

  font-family: var(--font-data);
  font-size: 6.5px;
  letter-spacing: 0.17em;
} */

/* subtle top rule */
/* .page-prose pre::after {
  content: "";

  position: absolute;
  top: 21px;
  left: 17px;
  right: 17px;

  height: 1px;

  background: rgba(207, 213, 236, 0.10);
} */

.page-prose pre {
  padding: 17px 18px;
}

.page-prose pre code {
  display: block;

  padding: 0;
  border: 0;
  background: none;

  color: #e8e9f2;

  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.7;

  white-space: pre;
}

/* inline code, e.g. `main.js` */
.page-prose :not(pre) > code {
  padding: 2px 6px;

  border: 1px solid rgba(56, 69, 130, 0.12);
  border-radius: 4px;

  color: var(--indigo-deep);
  background: rgba(207, 213, 236, 0.35);

  font-family: var(--font-data);
  font-size: 0.86em;
}

/* to override about */

.about-prose {
  max-width: 1030px;
  margin-top: 0;
}

/* ============================================================
   PAGE TRANSITIONS
   Only content + changing header-right animate.
   The rounded frame/header themselves stay out of the snapshot,
   which avoids square-corner flashes.
   ============================================================ */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

::view-transition-old(site-content) {
  animation: content-out 180ms ease both;
}

::view-transition-new(site-content) {
  animation: content-in 320ms 55ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

::view-transition-old(header-navigation) {
  animation: nav-leave 160ms ease both;
}

::view-transition-new(header-navigation) {
  animation: nav-enter 260ms 80ms ease both;
}

@keyframes content-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}

@keyframes content-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nav-leave {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(5px); }
}

@keyframes nav-enter {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 980px) {
  .site-stage {
    padding: 20px;
  }

  .site-frame {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
  }

  .site-header {
    padding-inline: 24px;
  }

  .site-nav,
  .desktop-nav {
    gap: clamp(12px, 2vw, 22px);
  }

  .nav-link {
    padding: 15px 0 17px;
  }

  .nav-link::after {
    bottom: 10px;
  }

  .celestial-index {
    min-height: 430px;
  }

  .orbit-link {
    min-width: 126px;
    padding-right: 7px;
  }

  .orbit-name {
    font-size: 17px;
  }
}

@media (min-width: 701px) and (max-width: 1180px),
       (min-width: 701px) and (max-height: 850px) {

  .section-home .site-scroll {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .section-home .home-orbit-page {
    height: auto;
    min-height: 680px;
  }

  .section-home .celestial-index {
    min-height: 560px;
  }
}

/* ============================================================
   MOBILE / PHONE
   ============================================================ */

@media (max-width: 700px) {
  html,
  body {
    min-height: 100%;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .site-stage {
    position: relative;
    inset: auto;
    display: block;
    min-height: 100dvh;
    padding: 7px;
  }

  .site-frame {
    width: 100%;
    height: auto;
    min-height: calc(100dvh - 14px);
    border-radius: 16px;
    overflow: hidden;
    overflow: clip;
  }

  .site-scroll,
  .section-home .site-scroll {
    overflow: visible;
  }

  /* ---------- Header ---------- */
  .site-header {
    position: relative;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
  }

  .site-brand {
    margin: 0;
    justify-self: auto;
  }

  .site-brand .brand-name {
    font-size: 17px;
    line-height: 1;
  }

  .header-right {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
  }

  /* Home: title + INDEX / 00 remain centered, no burger. */
  .section-home .site-header {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    padding-block: 13px 9px;
  }

  .section-home .site-brand,
  .section-home .header-right {
    justify-self: center;
    margin-left: 0;
  }

  .home-header-mark {
    font-size: 7.5px;
    letter-spacing: 0.13em;
  }

  /* ---------- Native details hamburger ---------- */
  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    position: static;
    display: block;
  }

  .mobile-menu > summary {
    list-style: none;
  }

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

  .mobile-menu-toggle {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(56, 69, 130, 0.20);
    border-radius: 50%;
    background: rgba(249, 248, 252, 0.74);
    cursor: pointer;
    user-select: none;
  }

  .hamburger-lines {
    width: 13px;
    display: grid;
    gap: 3px;
  }

  .hamburger-lines i {
    display: block;
    width: 13px;
    height: 1px;
    background: var(--indigo-deep);
    transform-origin: center;
    transition: transform 180ms ease, opacity 140ms ease;
  }

  .mobile-menu[open] .hamburger-lines i:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  .mobile-menu[open] .hamburger-lines i:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu[open] .hamburger-lines i:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .mobile-nav {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    padding: 7px 18px 11px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(249, 248, 252, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px rgba(23, 29, 67, 0.09);
  }

  .mobile-nav a {
    position: relative;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(45, 50, 86, 0.10);
    color: var(--muted);
    font-family: var(--font-data);
    font-size: 9px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  .mobile-nav a:last-child {
    border-bottom: 0;
  }

  .mobile-nav a:hover,
  .mobile-nav a:focus-visible,
  .mobile-nav a.is-active {
    color: var(--indigo-deep);
  }

  .mobile-nav a.is-active::after {
    content: "✦";
    position: absolute;
    right: 4px;
    color: var(--indigo);
  }

  /* ---------- Home ---------- */
  .home-orbit-page {
    display: block;
    min-height: 0;
    height: auto;
    padding: 26px 18px 38px;
  }

  .home-greeting {
    padding: 0;
    margin-bottom: 24px;
  }

  .home-greeting-kicker {
    margin-bottom: 5px;
    font-size: 8px;
    line-height: 1.35;
    letter-spacing: 0.14em;
  }

  .home-greeting h1 {
    margin-top: 4px;
    font-size: clamp(28px, 9vw, 35px);
  }

  .celestial-index {
    width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    background: none;
  }

  .orbit-trace,
  .constellation-lines,
  .sky-point,
  .celestial-index::before {
    display: none;
  }

  .observatory-core {
    position: relative;
    left: auto;
    top: auto;
    grid-column: 1;
    order: 1;
    justify-self: center;
    width: min(68vw, 240px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 9px auto 24px;
    transform: none !important;
    border: 1px solid rgba(56, 69, 130, 0.36);
    border-radius: 50%;
    overflow: hidden;
    background: var(--indigo-pale);
    box-shadow:
      0 0 0 5px rgba(56, 69, 130, 0.05),
      0 12px 32px rgba(23, 29, 67, 0.10);
  }

  .observatory-core::after {
    inset: 9px;
    border-color: rgba(56, 69, 130, 0.12);
  }

  .observatory-core img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
  }

  .core-sky {
    display: none;
  }

  .orbit-link {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    order: 2;
    width: 100%;
    min-width: 0;
    min-height: 66px;
    padding: 11px 13px;
    transform: none !important;
    border: 1px solid rgba(56, 69, 130, 0.14);
    border-left: 2px solid var(--link-accent);
    border-radius: 8px;
    background: rgba(249, 248, 252, 0.66);
  }

  .orbit-link::before {
    display: none;
  }

  .orbit-link:hover,
  .orbit-link:focus-visible {
    transform: translateY(-2px) !important;
    background: rgba(249, 248, 252, 0.94);
  }

  .orbit-name {
    font-size: 17px;
  }

  .orbit-no {
    font-size: 7px;
  }

  .orbit-desc {
    margin-top: 5px;
    font-size: 7.5px;
    line-height: 1.45;
    letter-spacing: 0.065em;
  }

  /* ---------- General page content ---------- */
  .page-pad {
    padding: 30px 19px 42px;
  }

  .compact-intro,
  .archive-heading {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    padding-bottom: 22px;
  }

  .archive-heading h1 {
    font-size: clamp(40px, 13vw, 54px);
  }

  .archive-heading > p,
  .compact-lede {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.7;
  }

  /* ---------- Gallery ---------- */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .gallery-thumb {
    width: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .gallery-thumb img {
    width: 100%;
    height: auto;
    max-height: 72dvh;
    object-fit: contain;
    background: var(--paper-cool);
  }

  .gallery-lightbox {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .lightbox-shell {
    max-height: calc(100vh - 24px);
  }

  .lightbox-image-stage {
    padding: 14px;
  }

  .lightbox-image {
    max-height: calc(100vh - 230px);
  }

  .lightbox-caption {
    padding: 15px 16px 17px;
  }

  .lightbox-heading-row {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  /* ---------- Code ---------- */
  .project-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-thumb {
    width: 100%;
    min-height: 0;
  }

  .project-thumb img {
    width: 100%;
    height: auto;
    max-height: 70dvh;
    object-fit: contain;
  }

  /* ---------- Writing ---------- */
  .writing-row {
    grid-template-columns: 70px 1fr;
    gap: 15px;
  }

  .writing-kind {
    display: none;
  }

  /* ---------- Satellites ---------- */
  .satellite-banner-list {
    width: 100%;
    padding-top: 26px;
  }

  .satellite-banner {
    width: min(100%, 580px);
    justify-self: center;
    /* Intentionally NO aspect-ratio. */
  }

  .satellite-banner img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* ---------- Log ---------- */
  .log-stream::before {
    left: 78px;
  }

  .log-entry {
    grid-template-columns: 58px 1fr;
    gap: 38px;
  }

  .log-dot {
    left: 74px;
  }

  /* ---------- About ---------- */

  .about-wrap {
    padding-top: 34px;

    /* contains the floated image */
    display: flow-root;
  }

  .about-mark {
    position: relative;

    float: left;

    width: min(39%, 405px);
    aspect-ratio: 1.23 / 1;

    margin:
      0
      46px
      28px
      0;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 14px;

    background: var(--milk);
  }

  .about-photo {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
  }

  .about-label {
    position: absolute;
    z-index: 2;

    left: 18px;
    bottom: 16px;

    padding: 5px 7px;

    color: var(--milk);
    background: rgba(7, 8, 37, 0.58);

    border-radius: 4px;
    backdrop-filter: blur(5px);

    font-family: var(--font-data);
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  /* Override the normal narrower prose width on About */
  .about-prose {
    max-width: none;
    margin-top: 0;
  }

  /* ---------- Footer ---------- */
  .site-footer {
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 14px;
    font-size: 7.5px;
    line-height: 1.55;
    text-align: center;
  }

  .footer-site,
  .footer-credits {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }
}

/* "Best viewed on desktop" only on phone-sized screens. */
@media (max-width: 600px) {
  .desktop-note,
  .footer-site .footer-separator {
    display: inline;
  }
}

@media (max-width: 430px) {
  .home-orbit-page {
    padding-inline: 14px;
  }

  .observatory-core {
    width: min(72vw, 230px);
  }

  .compact-intro h1 {
    font-size: 36px;
  }

  .archive-heading h1 {
    font-size: 48px;
  }

  .project-topline {
    align-items: flex-start;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

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

  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   MOBILE MENU STACKING FIX
   ============================================================ */

@media (max-width: 700px) {

  .archive-heading > p {
    justify-self: start;
    text-align: left;

    max-width: 100%;

    padding-bottom: 0;
  }

  .site-header {
    z-index: 100;
  }

  .site-scroll {
    z-index: 1;
  }

  .site-footer {
    z-index: 1;
  }

  .mobile-menu {
    position: static;
    z-index: 101;
  }

  .mobile-nav {
    position: absolute;
    z-index: 110;

    top: 100%;
    left: 0;
    right: 0;

    width: 100%;

    display: grid;

    padding: 8px 18px 12px;

    /*
      Use an opaque background here.
      Don't let page content visually bleed through.
    */
    background: var(--milk);

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);

    box-shadow:
      0 14px 30px rgba(23, 29, 67, 0.12);
  }

  .mobile-nav a {
    display: block;

    padding: 12px 4px;

    color: var(--muted);

    font-family: var(--font-data);
    font-size: 9px;
    letter-spacing: 0.11em;
    text-transform: uppercase;

    border-bottom:
      1px solid rgba(45, 50, 86, 0.10);
  }

  .mobile-nav a:last-child {
    border-bottom: 0;
  }

  .mobile-nav a:hover,
  .mobile-nav a:focus-visible,
  .mobile-nav a.is-active {
    color: var(--indigo-deep);
  }

  .mobile-nav a.is-active::after {
    content: "✦";

    position: absolute;
    right: 22px;

    color: var(--indigo);
  }

  /* ---------- About ---------- */

  .about-wrap {
    padding-top: 25px;
  }

  .about-mark {
    float: none;

    width: 100%;
    aspect-ratio: 4 / 3;

    margin: 0 0 25px;

    border-radius: 12px;
  }

  .about-label {
    left: 14px;
    bottom: 13px;

    font-size: 7.5px;
  }

  .about-prose {
    width: 100%;
    max-width: none;
    margin-top: 0;
  }
}