@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-medium-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #13110e;
  --panel: #191510;
  --ink: #f3eadb;
  --muted: #c3b6a4;
  --gold: #d5af74;
  --border: #403326;
  --pattern: url("assets/tanpura-pattern.png") repeat center top / 260px 216px;
  --serif: "Baskerville", "Iowan Old Style", Georgia, serif;
  --sans: "Trebuchet MS", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pattern) var(--background); color: var(--ink); font: 1rem/1.6 var(--sans); }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.wrap { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; z-index: 4; top: .5rem; left: .5rem; padding: .65rem 1rem; background: var(--gold); color: #13110e; transform: translateY(-150%); }
.skip:focus { transform: none; }

.header { background: rgba(20,17,14,.36); border-bottom: 1px solid var(--border); }
.header-inner, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 78px; }
.wordmark { display: inline-flex; align-items: center; gap: .75rem; font: 1.18rem/1.2 var(--serif); }
.seal { display: inline-grid; width: 32px; aspect-ratio: 1; flex: none; place-items: center; border: 1px solid #957443; border-radius: 50%; color: var(--gold); font: 1.05rem/1 var(--sans); }
nav { display: flex; flex-wrap: wrap; gap: clamp(1rem, 3.3vw, 2.75rem); }
nav a, .back { color: var(--muted); font-size: .94rem; }
nav a:hover, .back:hover { color: var(--gold); }

.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: min(660px, 75svh); overflow: hidden; border-bottom: 1px solid var(--border); background: #17110b; }
.hero-image {
  position: absolute;
  z-index: -2;
  right: 0;
  bottom: 0;
  /* Fit the element to the artwork so the mask starts at its visible edge. */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  mask-image:
    linear-gradient(to right, transparent, rgba(0,0,0,.12) 5%, rgba(0,0,0,.5) 12%, rgba(0,0,0,.88) 19%, #000 25%),
    linear-gradient(to bottom, transparent, #000 14%);
  mask-composite: intersect;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18,15,12,.98), rgba(18,15,12,.87) 28%, rgba(18,15,12,.20) 63%, transparent 100%), linear-gradient(0deg, rgba(18,15,12,.45), transparent 40%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--pattern); mask-image: linear-gradient(90deg, #000 10%, transparent 60%); }
.hero-portrait {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: calc(100% / 3);
  height: min(100%, clamp(13rem, 26vw, 23rem));
  object-fit: cover;
  object-position: 25% top;
  opacity: .5925;
  pointer-events: none;
  transform: scale(1.38) translateY(15%);
  transform-origin: top left;
  mask-image:
    linear-gradient(to right, #000 62.5%, transparent 100%),
    linear-gradient(to bottom, transparent, #000 11.25% 46%, transparent 100%);
  mask-composite: intersect;
}
.hero-inner { --hero-top-padding: 5.5rem; position: relative; padding-block: var(--hero-top-padding) 6rem; }
.hero-heading {
  --heading-rise-limit: calc(1.25rem - var(--hero-top-padding));
  --heading-offset: calc(clamp(5.5rem, 15vw, 13rem) + 68px + clamp(0px, (100vw - 800px) / 4, 100px));
  --heading-rise: -3rem;
  margin-inline-start: var(--heading-offset);
  max-width: 782px;
  transform: translateY(calc(50px + max(calc(var(--heading-rise) - 10%), var(--heading-rise-limit))));
}
.hero-heading .eyebrow { font-size: 1.09375rem; }
.hero-actions { max-width: 680px; transform: translateY(30%) scale(.85); transform-origin: top left; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h1 { font-family: "Cormorant Garamond", var(--serif); font-size: clamp(5.06rem, 10.2465vw, 9.93025rem); font-weight: 500; line-height: .86; letter-spacing: -.04em; }
h1 em { color: var(--gold); font-weight: inherit; }
.hero-description { margin: 1.7rem 0 2rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.hero-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 48px; padding: .62rem 1rem; border: 1px solid; font-size: .92rem; transition: background .16s, color .16s; }
.button.gold { background: var(--gold); border-color: var(--gold); color: #18120a; }
.button.gold:hover { background: #e6c795; }
.button.outline { border-color: #987c56; color: var(--ink); background: #18120aaa; }
.button.outline:hover { background: #33271b; }
.triangle { width: 0; height: 0; border-block: .33rem solid transparent; border-left: .52rem solid currentColor; }

.section { padding-block: clamp(3.6rem, 7.5vw, 7rem); }
.eyebrow { display: flex; align-items: center; gap: .75rem; margin: 0 0 .8rem; color: var(--gold); font-size: .875rem; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: #957443; }
h2 { font-size: clamp(2.55rem, 5vw, 4.5rem); line-height: 1.03; letter-spacing: -.043em; }
.body-copy { max-width: 52ch; margin-top: 1.4rem; color: var(--muted); }
.body-copy p { margin: 0 0 .7rem; }
.pending { font-size: .9rem; color: var(--gold); }

.recordings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin-top: 2rem; }
.recording { border: 1px solid var(--border); overflow: hidden; background: var(--panel); }
.empty-recording { position: relative; min-height: 235px; display: grid; place-items: center; }
.empty-recording img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: center 57%; opacity: .28; }
.empty-message { position: relative; padding: 1rem; text-align: center; color: var(--ink); }
.empty-message p { margin: .65rem 0 0; }
.play-symbol { display: inline-grid; place-items: center; width: 46px; height: 46px; color: var(--gold); border: 1px solid #987c56; border-radius: 50%; }
.play-symbol .triangle { transform: translateX(1px); }
.video-frame { display: block; border: 0; width: 100%; aspect-ratio: 16/9; background: #0f0c09; }
.video-launch { width: 100%; border: 0; display: grid; place-items: center; background: #0f0c09 url("assets/stage.webp") center 57% / cover; color: var(--ink); aspect-ratio: 16/9; }
.video-launch .play-symbol { background: #12100de0; }
.video-info { padding: 1rem 1.15rem; }
.video-info h3 { margin: 0 0 .2rem; font: 1.5rem var(--serif); }
.video-info a { color: var(--gold); font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; }

.panel { background: rgba(38,31,23,.42); border-block: 1px solid var(--border); }
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 8vw, 8rem); }
.feature-image { margin: 0; position: relative; }
.feature-image img { aspect-ratio: 1.45; object-fit: cover; border: 1px solid #58442d; }
.feature-image figcaption { color: var(--muted); font-size: .85rem; margin-top: .55rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.8rem; }
.gallery-item { width: 100%; text-align: left; color: var(--ink); background: var(--panel); border: 1px solid var(--border); padding: 0; overflow: hidden; }
.gallery-item.featured { grid-column: 1 / -1; width: min(100%, 760px); justify-self: start; }
.gallery-item.featured img { aspect-ratio: 3 / 2; }
.gallery-item:hover { border-color: var(--gold); }
.gallery-item img { aspect-ratio: 1.28; object-fit: cover; }
.gallery-item span { display: block; padding: .7rem .85rem; font: 1.18rem var(--serif); }
.teaching .button { margin-top: 1rem; }
.footer { min-height: 100px; padding-block: 1.25rem; }

dialog { max-width: min(90vw, 880px); max-height: 90svh; padding: 0; border: 1px solid #806440; background: var(--background); color: var(--ink); }
dialog::backdrop { background: rgba(6,5,4,.88); }
.lightbox-content { position: relative; }
.lightbox-content img { width: auto; max-width: 100%; max-height: 72svh; margin-inline: auto; object-fit: contain; }
.lightbox-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem .6rem; }
.lightbox-actions p { margin: 0; text-align: center; }
dialog button { min-width: 44px; min-height: 44px; background: #211a13; border: 1px solid var(--border); color: var(--gold); font-size: 1.5rem; line-height: 1; }
dialog button:hover { border-color: var(--gold); }
#close-gallery { position: absolute; top: .5rem; right: .5rem; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 42px); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: .75rem; padding-block: 1rem; }
  .hero { min-height: 620px; align-items: end; }
  .hero-inner { --hero-top-padding: 3.5rem; padding-block-end: 4.25rem; }
  .hero-heading {
    --heading-offset: clamp(1.25rem, 12vw, 4rem);
    --heading-rise: -1.5rem;
  }
  .hero::before { mask-image: linear-gradient(0deg, #000 6%, transparent 57%); }
  .hero-image { inset: 0; width: 100%; height: 82%; object-fit: cover; object-position: 87% top; mask-image: none; }
  .hero::after { background: linear-gradient(0deg, #15110d 3%, rgba(21,17,13,.96) 19%, rgba(21,17,13,.55) 54%, rgba(21,17,13,.04) 100%); }
  h1 { font-size: clamp(4.301rem, 13.915vw, 7.59rem); }
  .feature { grid-template-columns: 1fr; }
  #about .feature-copy { grid-row: 1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
