:root {
  color-scheme: dark;
  --cave-bg: #080704;
  --cave-panel: #0f0c07;
  --cave-text: #e1d8ca;
  --cave-muted: #9e9181;
  --cave-gold: #b68a3b;
  --cave-line: rgba(182, 138, 59, 0.34);
  --cave-serif: Iowan Old Style, Baskerville, "Times New Roman", "Songti SC", SimSun, serif;
  --cave-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cave-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -12rem, rgba(122, 80, 24, 0.18), transparent 36rem),
    var(--cave-bg);
  color: var(--cave-text);
  font-family: var(--cave-serif);
  font-size: clamp(1rem, 0.96rem + 0.14vw, 1.12rem);
  line-height: 1.82;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
  background: #17120b;
}

[hidden] {
  display: none !important;
}

.cave-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(92rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.6rem 0;
  color: var(--cave-muted);
  font-family: var(--cave-sans);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.cave-primary-nav,
.cave-language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.cave-header a {
  text-decoration-color: transparent;
  text-underline-offset: 0.35em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.cave-header a:hover,
.cave-header a:focus-visible,
.cave-header a[aria-current="page"] {
  color: var(--cave-text);
  text-decoration-color: var(--cave-gold);
}

.cave-header a:focus-visible,
.fold-toggle:focus-visible {
  outline: 2px solid var(--cave-gold);
  outline-offset: 0.35rem;
}

.cave-hero {
  position: relative;
  display: grid;
  min-height: min(88vh, 62rem);
  place-items: end start;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.cave-hero-media,
.cave-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cave-hero-media {
  margin: 0;
}

.cave-hero-media img {
  object-fit: cover;
  filter: brightness(0.56) saturate(0.82);
}

.cave-hero-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 2, 1, 0.08), rgba(2, 2, 1, 0.24) 48%, rgba(2, 2, 1, 0.92));
  content: "";
}

.cave-hero figcaption {
  position: absolute;
  right: 1.5rem;
  bottom: 1rem;
  z-index: 1;
  max-width: 24rem;
  color: rgba(225, 216, 202, 0.68);
  font-size: 0.78rem;
  text-align: right;
}

.cave-hero-copy {
  position: relative;
  z-index: 1;
  width: min(56rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(8rem, 20vh, 16rem) 0 5rem;
}

.cave-kicker,
.section-kicker,
.person-index {
  margin: 0 0 1rem;
  color: var(--cave-gold);
  font-family: var(--cave-sans);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
}

.cave-hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 10vw, 9rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.cave-subtitle {
  margin: 1.5rem 0 0;
  color: var(--cave-muted);
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
}

.cave-hero blockquote {
  max-width: 44rem;
  margin: 2.5rem 0 0;
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  font-style: italic;
}

.hero-scroll {
  display: inline-block;
  margin-top: 2rem;
  color: var(--cave-muted);
  font-family: var(--cave-sans);
  font-size: 0.72rem;
  text-decoration: none;
}

.cave-section {
  width: min(74rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 10rem) 0;
  border-bottom: 1px solid rgba(182, 138, 59, 0.14);
}

.cave-section-narrow {
  width: min(54rem, calc(100% - 3rem));
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-heading h2,
.person-card h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.08;
}

.section-description,
.person-excerpt,
.person-note,
.gallery-note {
  margin: 0;
  color: var(--cave-muted);
}

.statement-layout,
.preface-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.cave-figure {
  margin: 0;
}

.cave-figure img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #050504;
}

.cave-figure figcaption {
  margin-top: 0.85rem;
  color: var(--cave-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.fold-shell {
  --fold-collapsed-height: 29rem;
}

.statement-fold {
  --fold-collapsed-height: 21rem;
}

.preface-fold {
  --fold-collapsed-height: 25rem;
}

[data-fold-body] {
  position: relative;
}

[data-fold-body] p {
  margin: 0 0 1.4em;
}

[data-fold-body] p:last-child {
  margin-bottom: 0;
}

.fold-body--two-column {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.fold-column {
  min-width: 0;
}

[data-fold-body][data-fold-state="collapsed"] {
  max-height: var(--fold-collapsed-height);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

.fold-toggle {
  width: 100%;
  margin-top: 1.8rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--cave-line);
  border-radius: 999px;
  background: transparent;
  color: var(--cave-text);
  cursor: pointer;
  font: 0.76rem/1.5 var(--cave-sans);
  letter-spacing: 0.08em;
  text-align: start;
}

.fold-toggle:hover {
  border-color: var(--cave-gold);
}

.highlight-quote,
.person-quote {
  margin: 2.5rem 0;
  color: #cdbfae;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  font-style: italic;
}

.people-intro {
  padding-bottom: 3rem;
}

.people-grid {
  display: grid;
  width: min(88rem, calc(100% - 3rem));
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 0 clamp(1.5rem, 3vw, 3.25rem);
  border-bottom: 1px solid rgba(182, 138, 59, 0.14);
}

.person-card {
  width: min(54rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0;
  border-bottom: 1px solid rgba(182, 138, 59, 0.14);
}

.people-grid .person-card {
  width: 100%;
  margin: 0;
  padding: clamp(3.5rem, 6vw, 6rem) 0;
}

.people-grid .person-card h2 {
  font-size: clamp(2rem, 3.4vw, 3.4rem);
}

.people-grid > .context-section {
  width: 100%;
  margin: 0;
  padding: clamp(3.5rem, 6vw, 6rem) 0;
}

.people-grid > .context-section h2 {
  font-size: clamp(2rem, 3.4vw, 3.4rem);
}

.person-header {
  margin-bottom: 2.5rem;
}

.person-excerpt {
  margin-top: 1.6rem;
}

.person-note {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--cave-line);
  font-size: 0.9rem;
}

.context-section {
  background: linear-gradient(90deg, transparent, rgba(182, 138, 59, 0.05), transparent);
}

.cinematic-strip {
  width: 100%;
  margin: 0;
  padding: 0;
}

.cinematic-scene {
  position: relative;
  display: grid;
  min-height: clamp(34rem, 88svh, 62rem);
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.cinematic-scene figure {
  margin: 0;
}

.cinematic-scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cinematic-scene-bg::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 2, 1, 0.36), rgba(2, 2, 1, 0.12) 45%, rgba(2, 2, 1, 0.72)),
    radial-gradient(circle at 50% 45%, transparent 20%, rgba(2, 2, 1, 0.42) 100%);
  content: "";
}

.cinematic-scene-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68) saturate(0.78);
}

.cinematic-scene-bg figcaption {
  position: absolute;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  max-width: 28rem;
  color: rgba(225, 216, 202, 0.72);
  font-size: 0.82rem;
  line-height: 1.65;
  text-align: right;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.82);
}

.cinematic-scene-float {
  position: relative;
  z-index: 2;
  width: min(27vw, 24rem);
  margin-inline: clamp(2rem, 9vw, 9rem);
  box-shadow: 0 1.8rem 5rem rgba(0, 0, 0, 0.45);
}

.cinematic-scene-float img {
  max-height: 64svh;
  object-fit: contain;
}

.cinematic-scene--01 .cinematic-scene-float {
  justify-self: end;
  transform: translateY(8%);
}

.cinematic-scene--03 .cinematic-scene-float {
  justify-self: start;
  transform: translateY(-6%);
}

.gallery-grid,
.signature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.gallery-grid {
  margin-top: 3rem;
  align-items: start;
}

.gallery-grid figure,
.signature-grid figure {
  margin: 0;
}

.gallery-grid img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #050504;
}

.gallery-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.gallery-open:focus-visible {
  outline: 2px solid var(--cave-gold);
  outline-offset: 0.25rem;
}

body.is-cave-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 2.5rem 5rem;
  background: rgba(0, 0, 0, 0.96);
}

.gallery-lightbox-figure {
  max-width: 100%;
  margin: 0;
}

.gallery-lightbox-figure img {
  width: auto;
  max-width: calc(100vw - 10rem);
  height: auto;
  max-height: calc(100svh - 6rem);
  margin: 0 auto;
  object-fit: contain;
  background: transparent;
}

.gallery-lightbox button {
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 7, 4, 0.72);
  color: var(--cave-text);
  cursor: pointer;
  font: 2rem/1 var(--cave-sans);
}

.gallery-lightbox button:hover,
.gallery-lightbox button:focus-visible {
  border-color: var(--cave-gold);
  color: #fff;
  outline: none;
}

.gallery-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}

.gallery-lightbox-previous {
  left: 1rem;
}

.gallery-lightbox-next {
  right: 1rem;
}

.gallery-lightbox-status {
  margin-top: 0.8rem;
  color: rgba(225, 216, 202, 0.72);
  font: 0.76rem/1.5 var(--cave-sans);
  letter-spacing: 0.12em;
  text-align: center;
}

.gallery-grid figcaption,
.signature-grid figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.signature-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 3rem;
}

.signature-grid img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #e7dfd1;
}

.coda-full {
  position: relative;
  display: grid;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.coda-full-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}

.coda-full-bg::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 3, 2, 0.82) 0%, rgba(4, 3, 2, 0.28) 35%, rgba(4, 3, 2, 0.66) 78%, rgba(4, 3, 2, 0.94) 100%),
    radial-gradient(circle at 54% 42%, transparent 16%, rgba(2, 2, 1, 0.58) 100%);
  content: "";
}

.coda-full-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.48);
}

.coda-full-bg figcaption {
  position: absolute;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: 1.25rem;
  z-index: 2;
  max-width: 26rem;
  color: rgba(225, 216, 202, 0.58);
  font-size: 0.75rem;
  line-height: 1.55;
  text-align: right;
}

.coda-inner {
  position: relative;
  z-index: 2;
  width: min(74rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(7rem, 14vw, 12rem) 0;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7);
}

.coda-heading h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  font-weight: 400;
  line-height: 1;
}

.coda-bq {
  max-width: 32ch;
  margin: clamp(2rem, 5vw, 4rem) 0;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.5;
}

.visual-bridge {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  color: var(--cave-muted);
}

.cave-footer {
  width: min(74rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
  color: var(--cave-muted);
  font-family: var(--cave-sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

html[lang="bo"] body {
  font-family: Kailasa, "Noto Serif Tibetan", "Microsoft Himalaya", Jomolhari, "Tibetan Machine Uni", serif;
  line-height: 2;
}

html[lang="bo"] * {
  letter-spacing: normal;
  text-transform: none;
}

html[lang="bo"] .fold-shell {
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
}

html[lang="bo"] .people-grid {
  grid-template-columns: 1fr;
}

html[lang="bo"] .people-grid .person-card,
html[lang="bo"] .people-grid > .context-section {
  width: 100%;
}

@media (min-width: 1100px) {
  html[lang="bo"] .people-grid {
    width: min(74rem, calc(100% - 3rem));
    grid-template-columns: 1fr;
  }

  html[lang="bo"] .person-card,
  html[lang="bo"] .context-section {
    width: min(74rem, calc(100% - 3rem));
  }

  html[lang="bo"] .fold-shell--two-column {
    max-width: none;
  }

  html[lang="bo"] .fold-body--two-column {
    grid-template-columns: repeat(2, minmax(24rem, 1fr));
    column-gap: clamp(2.5rem, 4vw, 4rem);
  }
}

@media (min-width: 761px) and (max-width: 1099px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html[lang="bo"] .cave-header,
html[lang="bo"] .cave-kicker,
html[lang="bo"] .section-kicker,
html[lang="bo"] .person-index,
html[lang="bo"] .fold-toggle,
html[lang="bo"] .cave-footer {
  font-family: Kailasa, "Noto Serif Tibetan", "Microsoft Himalaya", Jomolhari, "Tibetan Machine Uni", serif;
  letter-spacing: normal;
  text-transform: none;
}

html[lang="bo"] p,
html[lang="bo"] blockquote,
html[lang="bo"] h1,
html[lang="bo"] h2,
html[lang="bo"] a,
html[lang="bo"] button {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 760px) {
  .cave-header,
  .section-heading,
  .statement-layout,
  .preface-layout,
  .visual-bridge {
    grid-template-columns: 1fr;
  }

  .cave-header {
    display: grid;
    width: min(100% - 2rem, 42rem);
  }

  .cave-language-nav {
    justify-content: flex-start;
  }

  .cave-hero-copy,
  .cave-section,
  .cave-section-narrow,
  .person-card,
  .cave-footer {
    width: min(100% - 2rem, 42rem);
  }

  .people-grid {
    width: min(100% - 2rem, 42rem);
    grid-template-columns: 1fr;
  }

  .people-grid .person-card,
  .people-grid > .context-section {
    width: 100%;
  }

  .cave-hero figcaption {
    display: none;
  }

  .cinematic-scene {
    min-height: 72svh;
  }

  .cinematic-scene-float {
    width: min(46vw, 16rem);
    margin-inline: 1.25rem;
  }

  .cinematic-scene-bg figcaption {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    max-width: none;
  }

  .coda-inner {
    width: calc(100% - 2rem);
    padding: 6rem 0 7rem;
  }

  .coda-full-bg figcaption {
    right: 1rem;
    bottom: 0.75rem;
    left: 1rem;
    max-width: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-lightbox {
    padding: 3.5rem 1rem 4rem;
  }

  .gallery-lightbox-figure img {
    max-width: calc(100vw - 2rem);
    max-height: calc(100svh - 8rem);
  }

  .gallery-lightbox-nav {
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }

  .gallery-lightbox-previous {
    left: calc(50% - 4rem);
  }

  .gallery-lightbox-next {
    right: calc(50% - 4rem);
  }

  .fold-shell {
    --fold-collapsed-height: 24rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
