/* ==========================================================================
   Marc Michael Epstein
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --night: #0a1f3d;
  --night-deep: #050e20;
  --peacock: #0d5a72;
  --peacock-bright: #1a8a9e;
  --gold: #c9a14a;
  --gold-bright: #e5c56a;
  --gold-deep: #9a7a32;
  --carmine: #a63b2a;
  --ink-on-dark: #f1e6c7;
  --ink-dim: #9fb2c8;
  --ink-faded: #6c8099;
  --rule: rgba(201, 161, 74, 0.35);
  --measure: 62ch;
  --display: "Cormorant Garamond", "Garamond", "Hoefler Text", Georgia, serif;
  --body: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Gill Sans Nova", "Gill Sans", "Futura", sans-serif;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; font-size: 18px; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Base --------------------------------------------------------------- */
body {
  font-family: var(--body);
  background: var(--night-deep);
  color: var(--ink-on-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--night-deep); }

/* ---- Links -------------------------------------------------------------- */
a { color: var(--gold-bright); text-decoration: underline; text-decoration-color: rgba(229,197,106,0.4); text-underline-offset: 0.18em; text-decoration-thickness: 0.05em; transition: color 180ms, text-decoration-color 180ms; }
a:hover { color: var(--gold-bright); text-decoration-color: var(--gold-bright); }

/* ---- Typography --------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; color: var(--ink-on-dark); letter-spacing: 0.005em; }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.2; margin-top: 2.4em; margin-bottom: 0.7em; }
h3 { font-size: 1.3rem; line-height: 1.25; margin-top: 2em; margin-bottom: 0.4em; font-weight: 500; }
h4 { font-size: 1.05rem; line-height: 1.3; margin-top: 1.6em; margin-bottom: 0.3em; font-weight: 500; }

p, ul, ol { margin-bottom: 1em; max-width: var(--measure); }
em, i { font-style: italic; }
strong, b { font-weight: 600; color: var(--gold-bright); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 500;
  display: block;
}

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
  padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 1.2rem;
  border-bottom: 1px solid var(--gold);
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand__home { display: flex; align-items: center; text-decoration: none; border: 0; }
.brand__home:hover { text-decoration: none; }
.brand__home img {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--ink-on-dark);
  letter-spacing: 0.01em;
  line-height: 1;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms;
}
.brand__name:hover { color: var(--ink-on-dark); text-decoration: none; border-bottom-color: var(--gold); }
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
}
.brand__text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 400;
}
.brand__text small a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 180ms, border-color 180ms;
}
.brand__text small a:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }
.nav {
  justify-self: end;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-on-dark);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 0.2em;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms, color 180ms;
}
.nav a:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }
.nav a.is-current { color: var(--gold-bright); border-bottom-color: var(--gold); }

/* Two-row masthead variant — brand on left, two nav rows stacked on right.
   Bottom nav row holds the search trigger as its final element. */
.masthead--rowed {
  grid-template-columns: auto 1fr;
}
.masthead--rowed .masthead__navs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
  gap: 0.65rem;
}
.masthead--rowed .nav {
  justify-self: end;
  align-items: center;
  flex-wrap: wrap;
}
.masthead--rowed .nav--bottom { gap: 1.2rem; }
.masthead--rowed .nav--bottom .search-trigger {
  justify-self: auto;
  margin-left: 0.4rem;
}

/* ==========================================================================
   DEEP DIVE SEARCH
   ========================================================================== */
.search-trigger {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  background: rgba(201,161,74,0.08);
  color: var(--ink-on-dark);
  border: 1px solid rgba(201,161,74,0.45);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, color 180ms;
}
.search-trigger:hover {
  background: rgba(201,161,74,0.18);
  border-color: var(--gold);
  color: var(--gold-bright);
}
.search-trigger__icon { color: var(--gold); flex-shrink: 0; }
.search-trigger:hover .search-trigger__icon { color: var(--gold-bright); }
.search-trigger__kbd {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 0.15em 0.4em;
  background: rgba(5,14,32,0.6);
  border: 1px solid rgba(201,161,74,0.3);
  border-radius: 2px;
  color: var(--gold);
  margin-left: 0.2rem;
}

/* Responsive: on narrow viewports, drop the ⌘K hint; keep the icon */
@media (max-width: 640px) {
  .search-trigger__kbd { display: none; }
  .search-trigger { padding: 0.5rem; }
}

/* Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(3rem, 10vh, 7rem) 1rem 2rem;
}
.search-overlay[hidden] { display: none; }
.search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,14,32,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.search-overlay__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0a1a35 0%, #050e20 100%);
  border: 1px solid rgba(201,161,74,0.4);
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,161,74,0.08);
  overflow: hidden;
}
.search-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem 0.9rem;
  border-bottom: 1px dotted rgba(201,161,74,0.25);
}
.search-overlay__heading {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink-on-dark);
  margin: 0;
  line-height: 1.2;
}
.search-overlay__kicker {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.25em;
}
.search-overlay__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  background: transparent;
  border: 1px solid rgba(201,161,74,0.3);
  color: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms;
}
.search-overlay__close:hover {
  background: rgba(201,161,74,0.15);
  color: var(--gold-bright);
  border-color: var(--gold);
}

.search-overlay__inputwrap {
  position: relative;
  padding: 1rem 1.4rem 0.5rem;
}
.search-overlay__inputicon {
  position: absolute;
  left: 1.95rem;
  top: 50%;
  transform: translateY(-12%);
  color: var(--gold);
  pointer-events: none;
}
.search-overlay__input {
  width: 100%;
  background: rgba(5,14,32,0.6);
  border: 1px solid rgba(201,161,74,0.3);
  border-radius: 2px;
  color: var(--ink-on-dark);
  font-family: var(--display);
  font-size: 1.15rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  outline: none;
  transition: border-color 180ms;
}
.search-overlay__input::placeholder {
  color: var(--ink-dim);
  font-style: italic;
}
.search-overlay__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,161,74,0.15);
}
.search-overlay__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-overlay__hint {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.9rem;
  margin: 0;
  padding: 0.4rem 1.4rem 0.9rem;
  line-height: 1.45;
}
.search-overlay__hint em {
  font-style: italic;
  color: var(--gold-bright);
}

.search-overlay__results {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,161,74,0.4) transparent;
}
.search-overlay__results::-webkit-scrollbar { width: 6px; }
.search-overlay__results::-webkit-scrollbar-thumb {
  background: rgba(201,161,74,0.4); border-radius: 3px;
}
.search-overlay__results::-webkit-scrollbar-track { background: transparent; }

.search-result {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0.9rem;
  margin: 0.15rem 0;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background 120ms, border-color 120ms;
}
.search-result:hover,
.search-result.is-active {
  background: rgba(201,161,74,0.1);
  border-color: rgba(201,161,74,0.35);
}
.search-result__page {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  text-align: right;
}
.search-result__text {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-size: 0.98rem;
  line-height: 1.4;
}
.search-result mark {
  background: rgba(201,161,74,0.3);
  color: var(--gold-bright);
  padding: 0 0.1em;
  border-radius: 1px;
  font-weight: 500;
}

.search-overlay__empty {
  padding: 2rem 1.4rem;
  font-family: var(--display);
  color: var(--ink-dim);
  text-align: center;
}
.search-overlay__empty p { margin: 0 0 0.6em; }
.search-overlay__empty strong { color: var(--ink-on-dark); font-style: italic; }
.search-overlay__empty-hint {
  font-size: 0.9rem;
  font-style: italic;
}
.search-overlay__empty-hint em {
  color: var(--gold-bright);
  font-style: italic;
}

/* Lock body scroll while search is open */
body.search-open { overflow: hidden; }

/* When masthead wraps on narrow screens, give the search button room */
@media (max-width: 900px) {
  .masthead {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .search-trigger { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; }

  /* Rowed variant collapses to brand-on-top, navs-below */
  .masthead--rowed { grid-template-columns: 1fr; }
  .masthead--rowed .brand { grid-column: 1; grid-row: 1; }
  .masthead--rowed .masthead__navs {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-start;
    justify-self: start;
  }
  .masthead--rowed .nav { justify-self: start; }
}

/* ---- Page scaffolding --------------------------------------------------- */
main {
  flex: 1 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem) 5rem;
}
.container { max-width: 72rem; margin: 0 auto; width: 100%; }
.prose { max-width: var(--measure); margin: 0 auto 0 0; }
.prose--wide { max-width: 58rem; margin: 0 auto 0 0; }

.page-header {
  margin: 3rem 0 2.5rem;
  max-width: 58rem;
}
.page-header h1 {
  margin-bottom: 0.5em;
  color: var(--ink-on-dark);
  font-variant: small-caps;
  letter-spacing: 0.045em;
  font-weight: 400;
}
.page-header .lede {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-dim);
  max-width: 44rem;
  line-height: 1.5;
}

/* ---- Ampersand — italic Cormorant glyph in warm gold ------------------- */
.amp {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.12em;
  color: var(--gold-bright);
  padding: 0 0.02em;
  letter-spacing: 0;
  line-height: 1;
}
/* In contexts where a display italic glyph would clash — sans-caps kickers,
   all-caps award names, the award lede — keep the ampersand in context. */
.kicker .amp,
.nav .amp,
.lede--awards .amp,
.lede--awards strong .amp,
.book__award-name .amp,
.brand__text small .amp {
  font-family: inherit;
  font-style: inherit;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
  padding: 0;
}
/* In the hero, the ampersand sits inside already-italic prose — render it
   slightly larger and in gold so it still carries. */
.home .hero__role .amp,
.home .hero__work .amp {
  color: var(--gold-bright);
}

/* ---- Footer ------------------------------------------------------------- */
.foot {
  padding: 2.2rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid rgba(201,161,74,0.3);
  font-size: 0.9rem;
  color: var(--ink-dim);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  font-family: var(--display);
  font-style: italic;
}
.foot .affils { display: flex; gap: 1.8rem; flex-wrap: wrap; }

/* ==========================================================================
   HOME — hero overlay (image flush right at any viewport, text flush left,
   image enlarged so its cosmos region overlaps behind the text)
   Image: 3357 × 2546 — aspect 1.319 : 1
   ========================================================================== */
.home .hero {
  position: relative;
  width: 100%;
  height: 88vh;
  min-height: 640px;
  max-height: 960px;
  overflow: hidden;
  background: #050e20;
}
.home .hero__img {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  /* Width scales with viewport height so the image stays large and pinned
     right. aspect-ratio width = height × 1.319; we scale up to 135% so the
     cosmos bleeds well into the text column. */
  width: calc(88vh * 1.319 * 1.35);
  min-width: 100%;
  max-width: 150vw;
  background: url('../assets/hero.jpg') right center / cover no-repeat;
}
/* Darkening gradient over the left portion of the image for text legibility.
   Stronger at the far left, fades out before the gilded medallion. */
.home .hero__img::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg,
      rgba(5,14,32,0.95) 0%,
      rgba(5,14,32,0.82) 18%,
      rgba(5,14,32,0.48) 34%,
      rgba(5,14,32,0.12) 48%,
      rgba(5,14,32,0) 58%);
  pointer-events: none;
}
.home .hero__inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center;
  padding: 0 clamp(1.5rem, 4vw, 3.2rem);
}
.home .hero__text {
  max-width: min(40%, 32rem);
  position: relative;
  padding: 0.5rem 0;
}
.home .hero__text::before {
  content: "";
  position: absolute;
  inset: -2rem -3rem -2rem -1rem;
  background: radial-gradient(ellipse at 38% 50%, rgba(5,14,32,0.55), rgba(5,14,32,0) 72%);
  z-index: -1;
  pointer-events: none;
}
.home .hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  line-height: 1.02;
  color: var(--ink-on-dark);
  letter-spacing: 0.05em;
  margin-bottom: 1.1rem;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,0.85);
}
.home .hero__tagline {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1rem, 1.15vw, 1.25rem);
  line-height: 1.5;
  font-weight: 400;
}
.home .hero__tagline p { margin: 0; }
.home .hero__work + .hero__work { margin-top: 0.9rem; }
.home .hero__role {
  display: block;
  color: var(--ink-on-dark);
  font-size: clamp(0.95rem, 1.05vw, 1.15rem);
  font-style: normal;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 14px rgba(0,0,0,0.8);
}
.home .hero__role em { font-style: italic; }
.home .hero__sep {
  display: block;
  width: 2.6rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.8;
  margin: 1.1rem 0;
  box-shadow: 0 0 6px rgba(201,161,74,0.45);
}
.home .hero__work {
  display: block;
  font-style: italic;
  color: var(--ink-on-dark);
  font-size: clamp(1rem, 1.15vw, 1.25rem);
  line-height: 1.45;
  text-shadow: 0 1px 14px rgba(0,0,0,0.8);
}

/* Narrow viewports: keep image flush right but reduce the enlargement so
   the text column remains readable. */
@media (max-width: 900px) {
  .home .hero {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 11;
  }
  .home .hero__img {
    width: 130%;
  }
  .home .hero__img::after {
    background:
      linear-gradient(100deg,
        rgba(5,14,32,0.96) 0%,
        rgba(5,14,32,0.78) 22%,
        rgba(5,14,32,0.35) 42%,
        rgba(5,14,32,0) 58%);
  }
  .home .hero__text { max-width: 60%; }
}
@media (max-width: 600px) {
  .home .hero { aspect-ratio: 5 / 6; }
  .home .hero__img { width: 150%; }
  .home .hero__text { max-width: 80%; }
}

/* Home: below-hero featured */
.home__content { padding: 4rem clamp(1.5rem, 4vw, 3rem) 0; }
.home__featured {
  max-width: 62rem;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  border-top: 1px solid rgba(201,161,74,0.3);
  padding-top: 3rem;
}
.home__featured .panel .kicker { margin-bottom: 0.8rem; }
.home__featured .panel h3 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink-on-dark);
  margin: 0 0 0.6em;
}
.home__featured .panel h3 a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.home__featured .panel h3 a:hover { border-bottom-color: var(--gold); }
.home__featured .panel p { color: var(--ink-dim); font-size: 1rem; line-height: 1.55; margin: 0; }

@media (max-width: 640px) { .home__featured { grid-template-columns: 1fr; } }

.home__index {
  max-width: 50rem;
  margin: 0 auto 4rem;
  text-align: center;
}
.home__index .kicker { margin-bottom: 1.2rem; }
.home__index ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.4rem;
  justify-content: center;
  max-width: 100%;
}
.home__index li { margin: 0; }
.home__index a {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--ink-on-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15em;
  transition: border-color 180ms, color 180ms;
}
.home__index a:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
  max-width: 76rem;
  margin: 0 auto;
}
.about__portrait { position: sticky; top: 2rem; }
.about__portrait img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 14px 48px rgba(0,0,0,0.55);
  border: 1px solid rgba(201,161,74,0.35);
}
.about__portrait figcaption {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--ink-dim);
  margin-top: 0.6rem;
  text-align: right;
}
.about__text p { font-size: 1.05rem; line-height: 1.65; color: var(--ink-on-dark); }
.about__text p + p { margin-top: 1em; }

.press-list { list-style: none; padding: 0; max-width: none; }
.press-list li {
  padding: 1em 0;
  border-bottom: 1px dotted rgba(201,161,74,0.35);
}
.press-list li:last-child { border-bottom: 0; }
.press-list cite { font-style: italic; color: var(--ink-dim); font-size: 0.95em; }

.cv-link {
  display: inline-block;
  margin-top: 1.5em;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.2em;
  font-weight: 500;
}
.cv-link:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 26rem; margin: 0 auto 2rem; }
  .about__portrait figcaption { text-align: center; }
}

/* ==========================================================================
   BOOKS
   ========================================================================== */
.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1.8rem, 4vw, 3rem);
  max-width: 72rem;
  margin: 0 auto;
}
.book { display: flex; flex-direction: column; gap: 0.5rem; }
.book__cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(26,138,158,0.14), rgba(5,14,32,0) 70%),
    var(--night);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  border: 1px solid rgba(201,161,74,0.2);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}
.book:hover .book__cover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  border-color: rgba(201,161,74,0.5);
}
/* Every cover is shown whole — no cropping. Any aspect mismatch with the
   2:3 cell is absorbed by the night-blue cell background. */
.book__cover img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 0.55rem;
}
/* Gold seal overlay for award-winning books */
.book__seal {
  position: absolute;
  top: 0.55rem; right: 0.55rem;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(5,14,32,0.72);
  box-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 0 0 1px rgba(201,161,74,0.45);
  z-index: 2;
  pointer-events: auto;
}
.book__seal svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.book__seal-count {
  position: absolute;
  bottom: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--night-deep);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
  letter-spacing: 0.02em;
}
.book__title {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink-on-dark);
  line-height: 1.22;
  margin-top: 0.6rem;
  font-weight: 500;
}
.book__meta {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.88rem;
}
.book__desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-on-dark);
  margin-top: 0.3rem;
}
.book__links { margin-top: 0.5rem; font-size: 0.85rem; }
.book__links a { margin-right: 0.9rem; }

/* Award list below description — compact, one line per award */
.book__awards {
  list-style: none;
  padding: 0.55rem 0 0.1rem;
  margin: 0.5rem 0 0;
  border-top: 1px dotted rgba(201,161,74,0.3);
  max-width: none;
}
.book__awards li {
  position: relative;
  padding: 0.18em 0 0.18em 1.1rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}
.book__awards li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.22em;
  color: var(--gold);
  font-size: 0.78rem;
  line-height: 1;
}
.book__award-name {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
}
.book__award-sub {
  font-family: var(--display);
  color: var(--ink-dim);
  font-size: 0.82rem;
  letter-spacing: 0;
}
.book__award-sub em { font-style: italic; }

/* Awards lede paragraph on books page header */
.lede--awards {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-size: 0.74rem !important;
  line-height: 2 !important;
  color: var(--ink-dim) !important;
  letter-spacing: 0.02em;
  margin-top: 1.6rem !important;
  max-width: 54rem !important;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(201,161,74,0.28);
}
.lede--awards strong {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  white-space: nowrap;
  margin-right: 0.2rem;
}
.lede--awards span {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-right: 0.55rem;
}

/* ==========================================================================
   WRITING
   ========================================================================== */
.writing-section { margin-top: 2.6rem; }
.writing-section > h2 {
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.5em;
  max-width: var(--measure);
  margin-left: 0;
  margin-right: auto;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
}
.writing-item { max-width: var(--measure); margin: 0 0 1.4em; }
.writing-item p { margin: 0; font-size: 1.03rem; line-height: 1.55; max-width: none; }
.writing-item strong { color: var(--gold-bright); font-weight: 500; }
.writing-item a.read-link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.1em;
  margin-left: 0.4em;
  white-space: nowrap;
  font-weight: 500;
}
.writing-item a.read-link:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

.book__reviews {
  margin-top: 0.4rem;
  font-size: 0.86rem;
}
.book__reviews summary {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
  padding: 0.2em 0;
  border-bottom: 1px dotted rgba(201,161,74,0.3);
  font-weight: 500;
  transition: color 180ms;
}
.book__reviews summary::-webkit-details-marker { display: none; }
.book__reviews summary::before {
  content: "+ ";
  color: var(--gold);
  font-family: var(--display);
  font-weight: 400;
}
.book__reviews[open] summary::before { content: "− "; }
.book__reviews summary:hover { color: var(--gold-bright); }
.book__reviews ul {
  list-style: none;
  padding: 0.6rem 0 0.2rem;
  margin: 0;
  max-width: none;
}
.book__reviews li {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 0.2em 0;
  color: var(--ink-on-dark);
  margin-bottom: 0;
}
.book__reviews li a {
  color: var(--ink-on-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms, color 180ms;
}
.book__reviews li a:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }
.book__reviews li cite { font-style: italic; color: var(--gold-bright); }

/* Press & Reviews consolidated section */
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.4rem);
  max-width: 72rem;
  margin: 0 auto;
}
.press-book {
  padding: 1.2rem 1.4rem 0.4rem;
  border: 1px solid rgba(201,161,74,0.22);
  background: rgba(201,161,74,0.03);
  border-radius: 2px;
}
.press-book__title {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-on-dark);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.7rem;
  line-height: 1.25;
  padding-bottom: 0.5rem;
  border-bottom: 1px dotted rgba(201,161,74,0.3);
}
.press-book__title::before {
  content: "Review of ";
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
  font-weight: 500;
  display: block;
  margin-bottom: 0.35em;
}
.press-book__list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.press-book__list li {
  padding: 0.38em 0;
  border-bottom: 1px dotted rgba(201,161,74,0.18);
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0;
}
.press-book__list li:last-child { border-bottom: 0; }
.press-book__list a {
  color: var(--ink-on-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms, color 180ms;
}
.press-book__list a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}
.press-book__list cite {
  font-style: italic;
  color: var(--gold-bright);
  margin-right: 0.1em;
}

/* ==========================================================================
   TEACHING
   ========================================================================== */
.course { max-width: var(--measure); margin: 0 0 2.8em; }
.course__code {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.1em;
  font-weight: 500;
  line-height: 1.1;
}
.course__title {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0.8em;
}
.course__topic {
  font-family: var(--display);
  font-style: italic;
  color: var(--gold-bright);
  margin-top: 0.8em;
  margin-bottom: 0.3em;
  font-size: 1rem;
}
.course p { font-size: 1rem; line-height: 1.6; color: var(--ink-on-dark); }

.download-card {
  max-width: var(--measure);
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(201,161,74,0.4);
  background: rgba(201,161,74,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.download-card .label {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-on-dark);
  flex: 1;
  min-width: 18rem;
  max-width: none;
  margin: 0;
}
.download-card a {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.2em;
  color: var(--gold-bright);
  font-weight: 500;
}

/* ==========================================================================
   LECTURES / TOURS / MEDIA
   ========================================================================== */
.topic { max-width: var(--measure); margin: 0 0 2em; }
.topic h3 {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-weight: 500;
  font-size: 1.35rem;
  margin-bottom: 0.3em;
  margin-top: 0;
}
.topic p { font-size: 1rem; line-height: 1.6; color: var(--ink-on-dark); margin: 0; }

/* Section headers that separate major regions of the lectures page */
.section-head {
  max-width: 60rem;
  margin: 4rem 0 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(201,161,74,0.35);
}
.section-head__label {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
  margin: 0 0 0.6rem;
}
.section-head__note {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 1rem;
  max-width: 44rem;
  margin: 0;
}

/* Year-anchored listing: year label on left, entries right */
.lecture-year {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 1.2rem clamp(1rem, 2.5vw, 2rem);
  margin: 0 0 1.6rem;
  max-width: 64rem;
  padding-top: 1rem;
  border-top: 1px dotted rgba(201,161,74,0.22);
}
.lecture-year:first-of-type { border-top: 0; padding-top: 0; }
.lecture-year__label {
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-weight: 500;
  padding-top: 0.15em;
}
.lecture-year__items { display: flex; flex-direction: column; gap: 1.1rem; }

/* Individual invited-lecture entries */
.invited { max-width: none; }
.invited__venue {
  font-family: var(--display);
  font-size: 1.04rem;
  color: var(--ink-on-dark);
  font-weight: 500;
  line-height: 1.35;
}
.invited__series {
  font-family: var(--display);
  font-style: italic;
  color: var(--gold-bright);
  font-size: 0.92rem;
  line-height: 1.4;
  margin-top: 0.1em;
}
.invited__title {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-size: 0.98rem;
  line-height: 1.4;
  margin-top: 0.15em;
  opacity: 0.92;
}
.invited__title::before {
  content: "\201C";
  color: var(--gold);
  margin-right: 0.08em;
}
.invited__title::after {
  content: "\201D";
  color: var(--gold);
  margin-left: 0.04em;
}
/* Plain title variant: no curly quote pseudo-elements (for titles that are
   not themselves quotations, or that contain embedded punctuation). */
.invited__title--plain::before,
.invited__title--plain::after { content: none; }

/* ==========================================================================
   MEDIA — featured lectures with inline video embeds, and CSP series archive
   ========================================================================== */
.lectures-subhead {
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
  margin: 3.2rem 0 1.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(201,161,74,0.3);
  max-width: 64rem;
}

/* Invited entry with an embedded video below the text */
.lecture-feature { margin-bottom: 2rem; }
.lecture-feature__embed {
  margin-top: 1rem;
  max-width: 64rem;
  background: #000;
  border: 1px solid rgba(201,161,74,0.25);
}
.lecture-feature__embed iframe,
.lecture-feature__embed video {
  display: block;
  width: 100%;
  border: 0;
}
.lecture-feature__note {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.95rem;
  margin: 0.6rem 0 0;
}
.lecture-feature__source {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0.5rem 0 0;
}
/* Vimeo "Watch on Vimeo" links replacing embedded players */
.lecture-feature__link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0.7rem 0 0;
}
.lecture-feature__link a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.12em;
  transition: color 180ms;
}
.lecture-feature__link a:hover {
  color: var(--ink-on-dark);
}
/* Standalone "Browse the full showcase" link for CSP */
.csp-showcase-link {
  font-family: var(--sans);
  font-size: 0.84rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
  max-width: 64rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(201,161,74,0.25);
  padding-bottom: 1.2rem;
}
.csp-showcase-link a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.15em;
  transition: color 180ms;
}
.csp-showcase-link a:hover { color: var(--ink-on-dark); }

/* Community Scholar Program introduction block */
.csp-intro {
  max-width: 72rem;
  margin: 0 0 2.5rem;
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-size: 1.05rem;
  line-height: 1.65;
}
.csp-intro p {
  margin: 0;
  max-width: none;
}
.csp-intro strong {
  color: var(--gold-bright);
  font-weight: 500;
  font-style: italic;
}

/* Embedded CSP playlist player */
.csp-playlist {
  max-width: 64rem;
  margin: 0 0 3rem;
}
.csp-playlist iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid rgba(201,161,74,0.3);
  background: #000;
}
.csp-playlist__link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0.9rem 0 0;
  text-align: right;
}
.csp-playlist__link a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.12em;
}
.csp-playlist__link a:hover { color: var(--ink-on-dark); }

/* Textual table of contents for CSP series */
.csp-series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1.8rem 2.4rem;
  max-width: 72rem;
  margin: 0 0 3rem;
}
.csp-series__item {
  padding: 1.2rem 1.4rem 1.2rem;
  border: 1px solid rgba(201,161,74,0.22);
  background: rgba(201,161,74,0.03);
  border-radius: 2px;
}
.csp-series__item h4 {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-on-dark);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 0.3em;
  line-height: 1.25;
}
.csp-series__date {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.9em;
  padding-bottom: 0.6em;
  border-bottom: 1px dotted rgba(201,161,74,0.3);
}
.csp-series__list {
  list-style: decimal;
  padding: 0 0 0 1.4em;
  margin: 0;
  max-width: none;
}
.csp-series__list li {
  padding: 0.25em 0;
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-size: 0.96rem;
  line-height: 1.35;
  margin: 0;
}
.csp-series__list li::marker {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.85em;
}
.csp-series__list a,
.csp-series__item h4 a {
  color: var(--ink-on-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,161,74,0.28);
  padding-bottom: 0.08em;
  transition: color 180ms, border-color 180ms;
}
.csp-series__list a:hover,
.csp-series__item h4 a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}
.csp-series__item h4 a {
  border-bottom-color: rgba(201,161,74,0.4);
}

/* Public-talks compact listing */
.public-talks {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.public-talks li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0.5em 0;
  margin: 0;
  border-bottom: 1px dotted rgba(201,161,74,0.18);
  font-size: 0.94rem;
  line-height: 1.42;
}
.public-talks li:last-child { border-bottom: 0; }
.pt__venue {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-weight: 500;
}
.pt__title {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  margin-top: 0.1em;
}

@media (max-width: 640px) {
  .lecture-year { grid-template-columns: 1fr; gap: 0.5rem; }
  .lecture-year__label { padding-top: 0; }
}

.series {
  max-width: var(--measure);
  margin: 0 0 2.4em;
  padding-left: 1.4rem;
  border-left: 2px solid var(--gold);
}
.series h3 {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-weight: 500;
  margin: 0 0 0.25em;
  font-size: 1.3rem;
}
.series .note {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.98rem;
  margin-bottom: 0.8em;
}
.series ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.series li {
  padding: 0.5em 0;
  border-bottom: 1px dotted rgba(201,161,74,0.3);
}
.series li:last-child { border-bottom: 0; }

.tour {
  max-width: 64rem;
  margin: 0 0 3em;
  padding-bottom: 2.4em;
  border-bottom: 1px solid rgba(201,161,74,0.3);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  align-items: start;
}
.tour:has(.tour__figure) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.tour:last-of-type { border-bottom: 0; }
.tour__figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(201,161,74,0.3);
  box-shadow: 0 10px 36px rgba(0,0,0,0.5);
  border-radius: 2px;
  background: var(--night);
}
.tour__figure img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.tour__text { max-width: var(--measure); }
.tour h2 {
  margin-top: 0;
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-weight: 500;
  font-size: 1.9rem;
}
.tour .placeholder {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8em;
  font-weight: 500;
}
@media (max-width: 720px) {
  .tour:has(.tour__figure) { grid-template-columns: 1fr; }
  .tour__figure { aspect-ratio: 3 / 2; max-width: 100%; }
}

.media-audio {
  max-width: var(--measure);
  margin: 0 0 2em;
  padding: 1.2rem 0 1.4rem;
  border-bottom: 1px dotted rgba(201,161,74,0.3);
}
.media-audio h3 {
  font-family: var(--display);
  color: var(--ink-on-dark);
  font-size: 1.2rem;
  margin: 0 0 0.2em;
  font-weight: 500;
}
.media-audio .meta {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.92rem;
  margin-bottom: 0.7em;
  margin-top: 0;
}
.media-audio audio {
  width: 100%;
  max-width: 520px;
}

/* Dark audio player tweaks */
audio {
  filter: invert(0.9) hue-rotate(180deg);
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 600px) {
  html { font-size: 17px; }
  .masthead { padding: 1.2rem 1.4rem 1rem; }
  .nav { gap: 1rem; }
  .nav a { font-size: 0.74rem; letter-spacing: 0.18em; }
  .brand__home img { width: 38px; height: 38px; }
  .brand__name { font-size: 1.1rem; }
  .brand__text small { font-size: 0.58rem; letter-spacing: 0.25em; }
}
