/* css/style.css */
@font-face {
  font-family: Inter;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #202422;
  --text: #464c49;
  --muted: #686e6b;
  --line: #e4e8e5;
  --accent: #28634d;
  --paper: #ffffff;
  --page: 1120px;
  --measure: 680px;
  --gutter: clamp(22px, 5vw, 64px);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; font-size: 1rem; }
/* Keep the reading viewport fixed horizontally, including the oversized sky
   and decorative glows. Clip avoids introducing a nested scrolling container. */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}
main { min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
  html, body { touch-action: pan-y pinch-zoom; }
}
::selection { background: #d7e6dc; color: var(--ink); }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }

.skip { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; color: white; background: var(--accent); }
.skip:focus { top: 12px; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 20; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

.site-header {
  width: min(var(--page), calc(100% - var(--gutter) * 2));
  min-height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.name { font-size: 1.125rem; font-weight: 600; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.name > span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 32px; }
.site-header nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .875rem; color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: 1.33fr 1fr;
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  width: min(var(--page), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) 0 0;
}
.hero-copy { min-width: 0; }
h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.55vw, 3.75rem);
  font-weight: 550;
  line-height: 1.09;
  letter-spacing: -.05em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1 > span { color: var(--accent); }
.founder-photo { min-width: 0; }
.founder-photo img { width: 100%; border-radius: 8px; }

.article-shell { width: min(var(--measure), calc(100% - var(--gutter) * 2)); margin: 0 auto; padding: 48px 0 72px; }
.prose { color: var(--text); font-size: 1.125rem; font-weight: 400; line-height: 1.85; letter-spacing: -.013em; overflow-wrap: break-word; }
.prose > p { margin: 0 0 28px; }
.prose > p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 550; }
.gaps { margin: 30px 0; padding-left: 22px; }
.gaps li { padding-left: 8px; margin-bottom: 19px; }
.gaps li::marker { color: var(--accent); font-size: .8em; }
.gaps li:last-child { margin-bottom: 0; }
.prose .decision { color: var(--ink); font-weight: 550; }
.decision a { color: var(--accent); text-decoration-thickness: 1px; }

.sophia-portrait {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  margin: 52px 0 56px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sophia-portrait > img { width: 100%; border-radius: 8px; }
.portrait-label { font-size: .8125rem; color: var(--ink); font-weight: 550; line-height: 1.6; margin-bottom: 21px; }
.portrait-label > span { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.portrait-quote { margin: 0; font-size: 1.25rem; font-weight: 450; line-height: 1.65; letter-spacing: -.032em; color: var(--ink); }

.continuum { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 28px; margin: 48px 0; }
.continuum > div { display: flex; flex-direction: column; border-top: 2px solid #cfd6d1; padding-top: 18px; min-width: 0; }
.continuum span { font-size: .8125rem; line-height: 1.6; color: var(--muted); letter-spacing: -.01em; }
.continuum strong { margin-top: 5px; font-size: 1.125rem; line-height: 1.4; font-weight: 500; letter-spacing: -.035em; }
.continuum > .active { border-top-color: var(--accent); }
.continuum > .active strong { color: var(--accent); }

.signature { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding-top: 36px; margin-top: 48px; border-top: 1px solid var(--line); }
.signature > span { color: var(--ink); font-size: 1rem; font-weight: 500; }
.signature a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--accent); text-decoration: none; font-size: .875rem; }
.signature a:hover { text-decoration: underline; }
.site-footer { width: min(var(--page), calc(100% - var(--gutter) * 2)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; min-height: 76px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); }

@media (min-width: 1500px) {
  .prose { font-size: 1.125rem; }
}
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1.12fr 1fr; gap: 32px; }
  h1 { font-size: 2.75rem; }
}
@media (max-width: 760px) {
  .site-header { min-height: 80px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 0; }
  h1 { font-size: clamp(2.125rem, 7.65vw, 3.25rem); line-height: 1.1; letter-spacing: -.058em; }
  .founder-photo { width: 100%; }
  .article-shell { padding-top: 32px; padding-bottom: 48px; }
  .sophia-portrait { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
  .portrait-quote { font-size: 1.125rem; }
}
@media (max-width: 520px) {
  .site-header nav { gap: 18px; }
  .site-header nav a { font-size: .875rem; }
  .name { font-size: 1rem; }
  .prose { line-height: 1.85; }
  .prose > p { margin-bottom: 24px; }
  .sophia-portrait { grid-template-columns: 1fr; gap: 24px; margin: 40px 0; padding: 28px 0; }
  .sophia-portrait > img { width: min(240px, 75%); margin-inline: auto; }
  .portrait-label { margin-bottom: 14px; }
  .portrait-label > span { display: inline; margin-left: 8px; }
  .portrait-quote { font-size: 1.125rem; }
  .continuum { gap: 16px; grid-template-columns: 1fr; margin: 36px 0; }
  .continuum > div { display: grid; grid-template-columns: 1fr; gap: 1px; padding-top: 12px; }
  .continuum strong { margin: 0; }
  .signature { margin-top: 32px; padding-top: 24px; }
}
@media print {
  :root { --gutter: 0px; }
  .skip, .reading-progress, .site-header nav, .signature a { display: none; }
  .hero { padding: 24px 0; }
  .article-shell { width: 100%; padding: 24px 0; }
  .prose { font-size: 11pt; line-height: 1.65; }
  .sophia-portrait, .continuum, .founder-photo { break-inside: avoid; }
  p { orphans: 3; widows: 3; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Separate pages share the same type, spacing, and natural image proportions. */
.site-header nav a[aria-current="page"] { color: var(--accent); }
.site-header nav { gap: clamp(16px, 3vw, 32px); }
.portrait-visual { width: 100%; }
.portrait-visual img { width: 100%; border-radius: 8px; }
.portrait-label { margin: 14px 0 0; text-align: center; }
.portrait-label > span { display: block; margin: 2px 0 0; }
.essay-preview { padding-bottom: 88px; }
.continue-block { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding-top: 6px; }
.continue-link, .text-link { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; font-size: .9375rem; font-weight: 500; color: var(--accent); text-decoration: none; }
.continue-link { border-bottom: 1px solid var(--accent); }
.continue-link > span, .text-link > span { transition: transform 180ms ease; }
.continue-link:hover > span, .text-link:hover > span { transform: translateX(3px); }
.text-link:hover { text-decoration: underline; }
.story-section, .essays-page { width: min(var(--page), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.story-section { scroll-margin-top: 30px; }
.story-intro { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); align-items: end; gap: clamp(32px, 5vw, 64px); padding: 56px 0 64px; }
.story-intro h1 { margin: 0; color: var(--ink); font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.15; font-weight: 500; letter-spacing: -.045em; text-wrap: balance; }
.story-cover { min-width: 0; }
.story-cover img { width: 100%; height: auto; border-radius: 5px; }
.story-layout { min-width: 0; padding-bottom: 64px; }
.chapters { min-width: 0; max-width: 904px; margin-inline: auto; }
.chapter { scroll-margin-top: 8rem; margin-bottom: 64px; }
.chapter > header, .chapter > .chapter-prose { max-width: var(--measure); margin-inline: auto; }
.chapter > .story-photo, .campaign-pair, .phone-gallery { margin-inline: auto; }
.chapter h2 { margin: 0 0 20px; max-width: 25ch; font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.25; letter-spacing: -.04em; font-weight: 500; text-wrap: balance; }
.chapter-prose { max-width: var(--measure); font-size: 1.125rem; line-height: 1.85; color: var(--text); letter-spacing: -.013em; }
.chapter-prose p { margin: 0 0 22px; }
.chapter-prose p:last-child { margin-bottom: 0; }
.story-photo { margin-top: 32px; min-width: 0; }
.story-photo img { width: 100%; height: auto; border-radius: 5px; }
.story-photo figcaption { font-size: .8125rem; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.van-photo { max-width: 480px; margin-top: 34px; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.cricket-pair { grid-template-columns: 1.77fr 1fr; }
.action-photo { max-width: 550px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.community-pair { margin-top: 4px; }
.chapter-after { margin-top: 32px; }
.campaign-pair { max-width: 680px; }
.product-main { max-width: 680px; }
.product-pair .story-photo { margin-top: 24px; }
.phone-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 24px; max-width: 680px; padding: 0; }
.phone-gallery .story-photo figcaption { max-width: 21ch; }
.now-layout { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: start; gap: 32px; max-width: var(--measure); margin-inline: auto; }
.now-portrait { margin-top: 4px; }
.now-portrait figcaption { text-align: center; }
.now-portrait figcaption strong { display: block; color: var(--ink); font-size: .9375rem; font-weight: 550; }
.now-portrait figcaption span { display: block; margin-top: 2px; }
.chapter-now { margin-bottom: 0; border-bottom: 0; }
.chapter-now .text-link { margin-top: 24px; }
.resume-note { font-size: .8125rem; color: var(--muted); padding: 16px 0; margin-bottom: 20px; border-top: 1px solid var(--line); line-height: 1.6; }
.resume-note:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.resume-note a { color: var(--accent); }
#continue-reading { scroll-margin-top: 40px; }
#continue-reading:focus { outline: none; }
.essays-page { padding-bottom: 80px; }
.essays-heading { padding: 72px 0 40px; }
.essays-heading h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 550; }
.essay-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.essay-list li { border-bottom: 1px solid var(--line); }
.essay-list h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.4; letter-spacing: -.035em; font-weight: 500; }
.essay-list a { display: block; padding: 28px 0; text-decoration: none; transition: color 180ms ease; }
.essay-list a:hover { color: var(--accent); }
/* Reveals run in JS without hiding content in the default or no-JS layout. */
@media (max-width: 1000px) {
  .now-layout { grid-template-columns: minmax(0, 1fr) 180px; gap: 30px; }
}
@media (max-width: 760px) {
  .story-intro { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 40px; }
  .story-layout { padding-bottom: 48px; }
  .chapter { margin-bottom: 48px; }
  .chapter h2 { font-size: clamp(1.5rem, 4.8vw, 1.875rem); }
  .chapter-now { margin-bottom: 0; }
  .essay-preview { padding-bottom: 56px; }
  .sophia-portrait .portrait-visual { max-width: 240px; margin-inline: auto; }
  .portrait-label { margin-top: 14px; margin-bottom: 0; }
  .portrait-label > span { display: block; margin-left: 0; }
  .essays-heading { padding: 48px 0 32px; }
  .essay-list a { padding: 24px 0; }
}
@media (max-width: 520px) {
  .site-header { gap: 10px; }
  .site-header nav { gap: 16px; }
  .site-header nav a { font-size: .875rem; }
  .site-header .name { font-size: 1.0625rem; }
  .story-photo { margin-top: 26px; }
  .photo-pair { gap: 14px; }
  .cricket-pair { gap: 14px; }
  .collection-grid { gap: 10px; }
  .collection-grid figcaption { font-size: .75rem; }
  .community-pair, .product-pair { grid-template-columns: 1fr; }
  .phone-gallery { gap: 12px; }
  .phone-gallery figcaption { font-size: .75rem; }
  .now-layout { display: flex; flex-direction: column; gap: 32px; }
  .now-portrait { width: 210px; align-self: center; margin: 0; }
  .chapter h2 br { display: none; }
  .sophia-portrait { gap: 26px; }
  .sophia-portrait .portrait-quote { text-align: left; }
  .continue-block { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .continue-block, .resume-note { display: none !important; }
  .story-layout { display: block; }
  .chapter { padding: 20px 0; margin: 0; }
  .chapter-prose { font-size: 11pt; }
  .story-cover, .story-photo, .chapter header { break-inside: avoid; }
}


/* A quiet ending to the story leads into the essays. */
.speaking-photo { max-width: 680px; }
.story-ending { width: min(var(--measure), calc(100% - var(--gutter) * 2)); margin: 0 auto 56px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.story-ending a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: .9375rem; text-decoration: none; }
.story-ending a:hover { text-decoration: underline; }
.story-ending .back-to-start { font-size: .8125rem; color: var(--muted); }
@media print { .story-ending { display: none; } }

/* css/atmosphere.css */
/* One continuous night surface. Content geometry stays in style.css. */
:root {
  --sky-image: url('/static/images/milky-way-lettering-1280.2414b91cb3.webp');
  color-scheme: dark;
  --paper: #05070e;
  --ink: #d0d4e1;
  --text: #c3c7d3;
  --muted: #a4acbd;
  --line: rgba(176, 187, 212, .16);
  --accent: #b2bfdc;
  --sky-drift: 0px;
  --sky-travel: 0px;
  --sky-x: 50%;
  background: var(--paper);
}
body { position: relative; isolation: isolate; min-height: 100svh; }
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -28px -12px auto;
  height: calc(100vh + var(--sky-travel) + 56px);
  height: calc(100lvh + var(--sky-travel) + 56px);
  pointer-events: none;
  background-image: linear-gradient(rgba(5, 7, 14, .82), rgba(5, 7, 14, .82)), var(--sky-image), url('/assets/desert-horizon.webp');
  background-blend-mode: normal, screen, normal;
  background-size: cover;
  background-position: var(--sky-x) center;
  transform: translate3d(0, var(--sky-drift), 0);
  will-change: transform, translate;
}
::selection { color: #e0e4ef; background: #35405a; -webkit-text-fill-color: #e0e4ef; }
a:focus-visible { outline-color: var(--accent); }
.skip { color: var(--ink); background: var(--paper); }

.site-header .name { color: var(--ink); }
.site-header .name > span { color: var(--accent); }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); }

/* The sky is visible only inside the letters, over a guaranteed silver base.
   Paragraphs keep a uniform colour so the eye never has to work around texture. */
.hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a { color: var(--ink); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a {
    background-color: #bbc4d8;
    background-image: linear-gradient(rgba(187, 196, 216, .32), rgba(187, 196, 216, .32)), var(--sky-image);
    background-blend-mode: normal, screen;
    background-size: auto, 520px auto;
    background-position: center, center 44%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .essay-list h2 a:hover, .essay-list h2 a:focus-visible {
    background-image: none;
    background-color: #d2d9e9;
  }
}

/* Transparent sections retain their existing widths, gutters, and vertical gaps. */
.hero { padding-bottom: 24px; }
.article-shell { padding-top: 24px; }
.reading-surface, .story-layout, .site-footer { background: transparent; }
.story-section { width: 100%; }
.story-intro { width: min(var(--page), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.story-layout { padding-inline: var(--gutter); }
.chapter { scroll-margin-top: 32px; }


.essay-index { display: flex; flex-direction: column; }
.essay-index .site-header { flex-shrink: 0; }
.essays-page { display: flex; flex-direction: column; flex: 1; width: 100%; padding-bottom: 0; }
.essays-heading, .essay-list { width: min(var(--page), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.essay-index .reading-surface { flex: 1; }

.reading-progress { height: 1px; }
.reading-progress span { background: #8f9fc5; box-shadow: none; }
.continuum > div { border-top-color: var(--line); }
.continuum > .active { border-top-color: var(--accent); }
.continue-link { border-bottom-color: #71809f; }
.continue-link:hover, .text-link:hover, .site-footer a:hover, .signature a:hover { color: var(--ink); }
.founder-photo img, .story-cover img, .story-photo img, .portrait-visual img { box-shadow: none; filter: none; }

.site-footer {
  position: relative;
  width: 100%;
  padding-inline: max(var(--gutter), calc((100% - var(--page)) / 2));
  border-top: 0;
}
.site-footer::before { content: ""; position: absolute; top: 0; left: max(var(--gutter), calc((100% - var(--page)) / 2)); right: max(var(--gutter), calc((100% - var(--page)) / 2)); height: 1px; background: var(--line); }


/* Long, coordinated tides give the sky and lettering life without moving prose. */
.living-sky body::before {
  animation: sky-current 56s ease-in-out infinite alternate, sky-hues 48s ease-in-out infinite;
}
.living-sky :is(.hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a) { animation: starlit-letters 48s ease-in-out infinite; }
.living-sky :is(.prose, .chapter-prose) { animation: reading-light 48s ease-in-out infinite; }
.living-sky .site-header .name { animation: silver-light 48s ease-in-out infinite; }
.living-sky :is(.story-photo figcaption, .portrait-label > span, .continuum span) { animation: quiet-light 48s ease-in-out infinite; }
.sky-paused body::before, .sky-paused :is(.hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a, .prose, .chapter-prose, .site-header .name, .story-photo figcaption, .portrait-label > span, .continuum span) { animation-play-state: paused; }

@keyframes sky-current {
  /* Independent translation keeps ambient drift visible at any crop.
     The transform above remains dedicated to scroll movement. */
  from { translate: -8px -5px; }
  to { translate: 8px 5px; }
}
@keyframes sky-hues {
  0%, 100% { filter: hue-rotate(-12deg) saturate(1.2); }
  33% { filter: hue-rotate(38deg) saturate(1.3); }
  66% { filter: hue-rotate(-48deg) saturate(1.25); }
}
@keyframes starlit-letters {
  0%, 100% { color: #c8d3ec; background-color: #bbc9e4; background-position: center, center 44%; }
  33% { color: #dbcbe5; background-color: #d0bedb; background-position: center, 54% 48%; }
  66% { color: #c5dfd8; background-color: #b9d1ce; background-position: center, 48% 40%; }
}
@keyframes reading-light {
  0%, 100% { color: #c3c7d3; }
  33% { color: #cdc3cf; }
  66% { color: #bed0cd; }
}
@keyframes silver-light {
  0%, 100% { color: #c8d3ec; }
  33% { color: #dbcbe5; }
  66% { color: #c5dfd8; }
}
@keyframes quiet-light {
  0%, 100% { color: #a4acbd; }
  33% { color: #b4a7b8; }
  66% { color: #a3bab5; }
}

/* The essay title stays uniformly readable over the night sky. */
.living-sky body.essay-page .hero h1,
body.essay-page .hero h1,
.living-sky .essay-list h2 a,
.essay-list h2 a {
  color: #dce3f1;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

@media (max-width: 760px) {
  :root { --sky-image: url('/static/images/milky-way-lettering-720.7fc3ccb7e3.webp'); }
  :root { --sky-x: 12%; }
  .hero { padding-bottom: 16px; }
  .article-shell { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .living-sky body::before, .living-sky :is(.hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a, .prose, .chapter-prose, .site-header .name, .story-photo figcaption, .portrait-label > span, .continuum span) { animation: none; }
  body::before { transform: none; translate: none; will-change: auto; }
}
@media (prefers-contrast: more) {
  :root { --text: #d5d9e5; --muted: #c4cbdc; --line: #657086; }
  body::before { display: none; }
  .hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a { background: none; -webkit-text-fill-color: currentColor; }
}
@media (forced-colors: active) {
  .living-sky body.essay-page .hero h1, body.essay-page .hero h1,
  .living-sky .essay-list h2 a, .essay-list h2 a { color: CanvasText; }
  body::before { display: none; }
  .essay-page .hero h1, .hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a, .site-header .name, .site-header nav a { color: CanvasText; background: none; -webkit-text-fill-color: currentColor; }
}
@media print {
  .living-sky body.essay-page .hero h1, body.essay-page .hero h1,
  .living-sky .essay-list h2 a, .essay-list h2 a { color: var(--ink); }
  :root { color-scheme: light; --paper: #ffffff; --ink: #202832; --text: #434b56; --muted: #65707e; --line: #e1e5eb; --accent: #465f86; }
  body::before { display: none; }
  .essay-page .hero h1, .hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a { color: var(--ink); background: none; -webkit-text-fill-color: currentColor; }
  .hero { padding-bottom: 0; }
  .story-layout { padding-inline: 0; }
  .essay-index, .essays-page { display: block; }
}

@media (prefers-contrast: more), (forced-colors: active), print {
  .living-sky body::before, .living-sky :is(.hero h1, .story-intro h1, .essays-heading h1, .chapter h2, .essay-list h2 a, .prose, .chapter-prose, .site-header .name, .story-photo figcaption, .portrait-label > span, .continuum span) { animation: none; }
}

.motion-toggle { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { color: var(--ink); }
.motion-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.essay-index .site-footer { justify-content: flex-end; }
@media print { .motion-toggle { display: none; } }

/* css/audio.css */
.essay-listener { margin: 0 0 26px; font-size: .875rem; color: var(--text); scroll-margin-top: 32px; }
.essay-listener [hidden] { display: none !important; }
.essay-listener audio { width: 100%; color-scheme: dark; }
.listen-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0 18px; min-height: 44px; }
.listen-button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; font-weight: 500; }
.listen-button svg { fill: currentColor; flex: 0 0 auto; }
.pause-shape { display: none; }
[data-playing="true"] .play-shape { display: none; }
[data-playing="true"] .pause-shape { display: block; }
.listen-button:hover { color: var(--ink); }
.listen-button:focus-visible, .audio-speed:focus-visible, .audio-seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.audio-note { font-size: .75rem; color: var(--muted); }
.listening-controls { padding-top: 8px; }
.audio-seek { display: block; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.playback-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.audio-time { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.audio-speed { min-height: 44px; min-width: 66px; border: 0; border-radius: 0; background: var(--paper); color: var(--text); font: inherit; padding: 0 4px; cursor: pointer; }
.audio-status { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.essay-list .essay-listen-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin: -16px 0 12px; color: var(--accent); font-size: .875rem; background: none; -webkit-text-fill-color: currentColor; }
.essay-list .essay-listen-link:hover { color: var(--ink); text-decoration: underline; }
@media print { .essay-listener, .essay-listen-link { display: none !important; } }

.resume-note [data-audio-start] { display: inline-flex; align-items: center; min-height: 44px; }
.resume-note [data-audio-start][hidden] { display: none; }
.resume-note:not([hidden]) + #continue-reading { scroll-margin-top: 8rem; }


/* css/image-viewer.css */
/* Native buttons and a modal dialog progressively enhance every photograph. */
.image-zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.image-zoom:focus-visible { outline: 2px solid #b9cdf0; outline-offset: 5px; }
.image-zoom img { transition: filter .25s ease; }
@media (hover: hover) { .image-zoom:hover img { filter: brightness(1.05); } }
html.image-viewer-open { overflow: hidden; }
.image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #eef1f7;
  overflow: hidden;
  cursor: zoom-out;
  touch-action: manipulation;
}
.image-viewer[open] { display: grid; place-items: center; }
.image-viewer::backdrop { background: transparent; }
.image-viewer-shade { position: absolute; inset: 0; background: rgba(2, 4, 10, .94); backdrop-filter: blur(12px); }
.image-viewer-photo {
  position: relative;
  display: block;
  max-width: calc(100vw - 40px);
  max-height: calc(100dvh - 112px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .35);
  transform-origin: center;
  user-select: none;
}
.image-viewer-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(238, 241, 247, .3);
  border-radius: 50%;
  color: #eef1f7;
  background: rgba(12, 17, 28, .85);
  cursor: pointer;
}
.image-viewer-close svg { width: 20px; height: 20px; }
.image-viewer-close:focus-visible { outline: 2px solid #b9cdf0; outline-offset: 4px; }
.image-viewer-hint {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  margin: 0;
  width: 100%;
  padding: 0 16px;
  font: 400 13px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #b9c2d3;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) { .image-zoom img { transition: none; } }
@media print { .image-viewer { display: none !important; } }
