:root {
  --ink: #0a1d3d;
  --ink-2: #17345c;
  --gold: #c89a36;
  --gold-light: #e4c36f;
  --snow: #fbfaf6;
  --paper: #f3efe5;
  --stone: #d8d1c3;
  --charcoal: #20242a;
  --muted: #68717b;
  --line: rgba(10,29,61,.15);
  --shadow: 0 18px 50px rgba(10,29,61,.12);
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", Arial, sans-serif;
  --tibetan: "Noto Serif Tibetan", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--snow); color: var(--charcoal); font-family: var(--sans); font-size: 18px; line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: .08em; text-underline-offset: .18em; }
h1,h2,h3 { color: var(--ink); font-family: var(--serif); line-height: 1.08; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 7vw, 6.6rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 4.2rem); }
h3 { font-size: clamp(1.35rem, 2.1vw, 1.8rem); }
p { margin: 0 0 1.2em; }
.sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.skip-link { background: var(--gold); color: var(--ink); left: 1rem; padding: .6rem 1rem; position: fixed; top: -4rem; z-index: 1000; }
.skip-link:focus { top: 1rem; }
.content-wide { margin-inline: auto; max-width: 1320px; padding-inline: clamp(1.1rem, 4vw, 3rem); }
.content-narrow { margin-inline: auto; max-width: 900px; padding-inline: clamp(1.1rem, 4vw, 3rem); }
.content-reading { margin-inline: auto; max-width: 820px; padding: clamp(2rem, 6vw, 5rem) clamp(1.1rem, 4vw, 3rem); }
.center { text-align: center; }

.site-header { background: rgba(251,250,246,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(14px); }
.header-inner { align-items: center; display: flex; gap: 2rem; justify-content: space-between; margin: auto; max-width: 1500px; min-height: 82px; padding: .65rem clamp(1rem, 3vw, 2.5rem); }
.brand img { height: 56px; width: auto; }
.primary-nav > ul { align-items: center; display: flex; gap: clamp(.6rem, 1.2vw, 1.25rem); list-style: none; margin: 0; padding: 0; }
.primary-nav li { position: relative; }
.primary-nav a { color: var(--ink); display: block; font-size: .82rem; font-weight: 650; letter-spacing: .035em; padding: .8rem .15rem; text-decoration: none; }
.primary-nav li.is-active > a, .primary-nav a:hover { color: #8b6415; }
.submenu { background: var(--snow); border: 1px solid var(--line); box-shadow: var(--shadow); display: none; left: -.8rem; list-style: none; margin: 0; min-width: 230px; padding: .5rem .9rem; position: absolute; top: 100%; }
.primary-nav li:hover > .submenu, .primary-nav li:focus-within > .submenu { display: block; }
.submenu a { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.submenu li:last-child a { border: 0; }
.menu-toggle { background: none; border: 0; display: none; padding: .5rem; }
.menu-toggle span:not(.sr-only) { background: var(--ink); display: block; height: 2px; margin: 5px; width: 27px; }

.hero { color: white; min-height: min(78vh, 850px); overflow: hidden; position: relative; }
.hero--middle, .hero--bottom { min-height: min(68vh, 720px); }
.hero-picture, .hero-picture img { height: 100%; inset: 0; position: absolute; width: 100%; }
.hero-picture img { object-fit: cover; }
.hero-shade { background: linear-gradient(90deg, rgba(2,12,30,.82) 0%, rgba(2,12,30,.46) 44%, rgba(2,12,30,.06) 75%); inset: 0; position: absolute; }
.hero-shade--right { background: linear-gradient(270deg, rgba(2,12,30,.84) 0%, rgba(2,12,30,.42) 48%, rgba(2,12,30,.03) 78%); }
.hero-content { display: flex; flex-direction: column; justify-content: center; margin: auto; min-height: inherit; max-width: 1500px; padding: clamp(4rem, 9vw, 8rem) clamp(1.2rem, 6vw, 6rem); position: relative; z-index: 2; }
.hero-content--left { align-items: flex-start; padding-right: 48%; }
.hero-content--right { align-items: flex-start; margin-left: auto; padding-left: 55%; }
.hero h1,.hero h2 { color: white; text-shadow: 0 3px 24px rgba(0,0,0,.32); }.hero-title-tibetan {
  font-family: var(--tibetan);
  font-size: clamp(3.4rem, 7vw, 7rem);
  line-height: 1.35;
  margin-bottom: 0;
}

.hero p.hero-title-english {
  color: white;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .35);
}
.hero p:not(.eyebrow) { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); max-width: 690px; }
.eyebrow { color: #956b18; font-size: .78rem; font-weight: 700; letter-spacing: .18em; margin-bottom: 1rem; text-transform: uppercase; }
.eyebrow--light { color: var(--gold-light); }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { border: 1px solid transparent; display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .05em; padding: .82rem 1.25rem; text-decoration: none; text-transform: uppercase; transition: .2s ease; }
.button--gold { background: var(--gold); color: #07162f; }
.button--gold:hover { background: var(--gold-light); }
.button--ghost { border-color: rgba(255,255,255,.75); color: white; }
.button--ghost:hover { background: white; color: var(--ink); }
.button--dark { background: var(--ink); color: white; }

.section { padding-block: clamp(4rem, 8vw, 8rem); }
.section--soft { background: var(--paper); }
.section--intro .lead { margin-inline: auto; }
.lead { color: #3d4854; font-family: var(--serif); font-size: clamp(1.2rem, 2.3vw, 1.65rem); max-width: 850px; }
.section-heading { align-items: end; display: flex; gap: 3rem; justify-content: space-between; margin-bottom: 2.5rem; }
.section-heading > p { color: var(--muted); max-width: 480px; }
.section-heading h2 { margin-bottom: 0; }
.card-grid { display: grid; gap: clamp(1.2rem, 2.5vw, 2.3rem); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-card { background: white; border: 1px solid var(--line); box-shadow: 0 6px 26px rgba(10,29,61,.06); min-width: 0; }
.card-media { aspect-ratio: 3/2; display: block; overflow: hidden; }
.card-media img { height: 100%; object-fit: cover; transition: transform .5s ease; width: 100%; }
.content-card:hover .card-media img { transform: scale(1.035); }
.card-media--empty { align-items: center; background: linear-gradient(135deg, var(--ink), #234f82); display: flex; justify-content: center; }
.card-symbol { color: var(--gold-light); font-size: 3rem; }
.card-body { padding: 1.4rem 1.45rem 1.6rem; }
.card-body h3 a { text-decoration: none; }
.card-body p { color: var(--muted); font-size: .96rem; }
.text-link { color: #8b6415; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }

.page-intro, .work-header { background: linear-gradient(135deg, #eef1f4, var(--paper)); border-bottom: 1px solid var(--line); padding-block: clamp(4rem, 8vw, 8rem); }
.page-intro h1, .work-header h1 { font-size: clamp(2.7rem, 6vw, 5.7rem); }
.work-header--image {
  align-items: center;
  background-color: #07162f;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 0;
  color: white;
  display: flex;
  min-height: clamp(460px, 62vh, 720px);
  position: relative;
}

.work-header--image::before {
  background:
    linear-gradient(90deg, rgba(3, 12, 29, .88), rgba(3, 12, 29, .58) 58%, rgba(3, 12, 29, .25)),
    linear-gradient(0deg, rgba(3, 12, 29, .35), transparent 50%);
  content: "";
  inset: 0;
  position: absolute;
}

.work-header--image .content-narrow {
  position: relative;
  width: 100%;
  z-index: 1;
}

.work-header--image h1 {
  color: white;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .45);
}

.work-header--image .lead,
.work-header--image .work-meta,
.work-header--image .breadcrumbs,
.work-header--image .breadcrumbs a,
.work-header--image .language-links span {
  color: rgba(255, 255, 255, .84);
}

.work-header--image .eyebrow {
  color: var(--gold-light);
}

.work-header--image .language-links {
  border-top-color: rgba(255, 255, 255, .3);
}

.work-header--image .language-links a {
  background: rgba(7, 22, 47, .55);
  border-color: rgba(255, 255, 255, .55);
  color: white;
}

.work-page[lang="bo"] .work-header h1 {
  font-family: var(--tibetan);
}
.breadcrumbs { color: var(--muted); display: flex; flex-wrap: wrap; font-size: .78rem; gap: .55rem; margin-bottom: 2.5rem; }
.breadcrumbs a { color: var(--muted); }
.page-feature, .work-featured { margin-block: clamp(2rem, 5vw, 5rem); }
.page-feature img, .work-featured img { box-shadow: var(--shadow); max-height: 850px; object-fit: cover; width: 100%; }
.work-featured figcaption { color: var(--muted); font-size: .82rem; margin-top: .65rem; }
.work-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: .86rem; gap: .65rem 1.4rem; margin-top: 1.5rem; }
.language-links { align-items: center; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; padding-top: 1.2rem; }
.language-links span { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .1em; margin-right: .3rem; text-transform: uppercase; }
.language-links a { background: white; border: 1px solid var(--line); border-radius: 100px; font-size: .88rem; padding: .45rem .85rem; text-decoration: none; }
.prose { font-family: var(--serif); font-size: 1.13rem; }
.prose h2,.prose h3 { margin-top: 1.8em; }
.prose img { height: auto; margin-block: 2rem; }
.prose--small { font-size: 1rem; }
.poem-text { color: #172333; font-family: var(--tibetan), var(--serif); font-size: clamp(1.2rem, 2.1vw, 1.55rem); line-height: 2.05; margin-block: 1rem 4rem; white-space: pre-wrap; }
.sources { border-top: 1px solid var(--line); margin-top: 4rem; padding-top: 2rem; }
.sources h2 { font-size: 1.7rem; }
.subject-links { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 3rem; padding-top: 1.4rem; }
.subject-links span { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .1em; margin-right: .4rem; text-transform: uppercase; }
.subject-links a { background: var(--paper); border-radius: 100px; font-size: .84rem; padding: .35rem .75rem; text-decoration: none; }
.chapter-nav { align-items: center; border-block: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: 1fr auto 1fr; margin-block: 2rem 6rem; padding-block: 1.5rem; }
.chapter-nav div { display: flex; flex-direction: column; }
.chapter-nav .next { align-items: flex-end; text-align: right; }
.chapter-nav span { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.chapter-index { font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.chapter-list { border-top: 1px solid var(--line); }
.chapter-list > a { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 1.2rem; grid-template-columns: 70px 1fr auto; padding: 1.2rem .5rem; text-decoration: none; }
.chapter-number { color: #9a7326; font-family: var(--serif); font-size: 1.35rem; }
.chapter-list small { color: var(--muted); display: block; margin-top: .2rem; }
.quiet-note { color: var(--muted); font-family: var(--serif); font-size: 1.3rem; }

.site-footer { background: #07162f; color: rgba(255,255,255,.72); padding-block: 4rem 2rem; }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1.6fr 1fr; margin: auto; max-width: 1320px; padding-inline: clamp(1.1rem, 4vw, 3rem); }
.footer-brand { color: white; font-family: var(--serif); font-size: 2rem; text-decoration: none; }
.footer-inner p { max-width: 620px; }
.footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { color: white; }
.copyright { border-top: 1px solid rgba(255,255,255,.14); font-size: .8rem; grid-column: 1/-1; margin: 1rem 0 0; padding-top: 1.5rem; }

@media (max-width: 1280px) {
  .menu-toggle { display: block; }
  .primary-nav { background: var(--snow); border-top: 1px solid var(--line); display: none; left: 0; max-height: calc(100vh - 80px); overflow: auto; padding: 1rem 1.3rem 2rem; position: absolute; right: 0; top: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { border-bottom: 1px solid var(--line); font-size: .95rem; }
  .submenu { border: 0; box-shadow: none; display: block; min-width: 0; padding: 0 0 0 1.2rem; position: static; }
  .submenu a { font-size: .86rem; }
  .card-grid, .card-grid--sections { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .brand img { height: 44px; }
  .header-inner { min-height: 68px; }
  .hero { min-height: 680px; }
  .hero-content--left, .hero-content--right { align-items: flex-start; padding: 5rem 1.25rem; }
  .hero-shade, .hero-shade--right { background: linear-gradient(0deg, rgba(2,12,30,.88) 0%, rgba(2,12,30,.5) 58%, rgba(2,12,30,.16) 100%); }
  .section-heading { align-items: start; flex-direction: column; gap: .5rem; }
  .card-grid, .card-grid--sections { grid-template-columns: 1fr; }
  .chapter-nav { grid-template-columns: 1fr 1fr; }
  .chapter-index { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .copyright { grid-column: auto; }
}
