/* ============================================
   Publication Detail — Storytelling Layout
   ============================================ */

/* ---- Page setup: hide Quarto's default title block ---- */
.pub-detail .quarto-title,
.pub-detail .quarto-title-meta,
.pub-detail .quarto-title-authors,
.pub-detail .quarto-title-author,
.pub-detail header#title-block-header {
  display: none !important;
}

.pub-detail #quarto-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 3rem 4rem;
}

/* ---- Magazine-wide layout (opt-in via `magazine-wide` body class) ----
   Widens the body-content grid column while keeping Quarto's named grid lines
   intact, and pins heading-led <section> + loose .story-section blocks to span
   the full width. Used by media/news entries with the alternating .story-row
   layout; other detail pages keep the default reading measure. */
.magazine-wide #quarto-content.page-columns {
  grid-template-columns:
    [screen-start] 1.5em
    [screen-start-inset page-start page-start-inset body-start-outset body-start] minmax(1.5em, 1fr)
    [body-content-start] minmax(0, 1200px)
    [body-content-end] minmax(1.5em, 1fr)
    [body-end body-end-outset page-end-inset page-end screen-end-inset] 1.5em
    [screen-end] !important;
}

.magazine-wide #quarto-content.page-columns > main.content > section.level2,
.magazine-wide #quarto-content.page-columns > main.content > .story-section {
  grid-column: body-content-start / body-content-end !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ---- Hero header — cascade entrance ---- */
.pub-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.pub-hero > * {
  opacity: 0;
  transform: translateY(24px);
  animation: heroChildIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pub-hero > *:nth-child(1) { animation-delay: 0.05s; }
.pub-hero > *:nth-child(2) { animation-delay: 0.2s; }
.pub-hero > *:nth-child(3) { animation-delay: 0.4s; }
.pub-hero > *:nth-child(4) { animation-delay: 0.55s; }
.pub-hero > *:nth-child(5) { animation-delay: 0.7s; }

/* ---- Hero cover image (peer-reviewed, top-centered, journal-cover aspect 3:4) ---- */
.pub-hero .pub-cover {
  display: block;
  width: 150px;
  height: 200px;
  object-fit: cover;
  margin: 0 auto 1.4rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55),
              0 2px 6px rgba(0, 0, 0, 0.3),
              -2px 0 0 rgba(0, 0, 0, 0.15) inset;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease;
}

.pub-hero .pub-cover:hover {
  transform: translateY(-4px) rotateY(-2deg);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6),
              0 2px 6px rgba(0, 0, 0, 0.3),
              -2px 0 0 rgba(0, 0, 0, 0.15) inset;
}

@keyframes heroChildIn {
  to { opacity: 1; transform: translateY(0); }
}

.pub-hero h1 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.pub-hero .pub-journal {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-style: italic;
  color: #64B5F6;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.pub-hero .pub-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.pub-hero .pub-date,
.pub-hero .pub-doi {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
}

.pub-hero .pub-doi a {
  color: rgba(100,181,246,0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.pub-hero .pub-doi a:hover {
  color: #64B5F6;
}

.pub-hero .pub-authors {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.pub-hero .pub-authors strong {
  color: #64B5F6;
}

/* ---- Divider line ---- */
.pub-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #64B5F6, transparent);
  margin: 2.5rem auto;
  opacity: 0;
}

.pub-divider.revealed {
  animation: dividerIn 0.8s ease forwards;
}

@keyframes dividerIn {
  to { opacity: 0.6; width: 120px; }
}

/* ---- Story sections — container ---- */
.story-section {
  margin-bottom: 2.5rem;
}

/* ---- Story sections — child elements reveal ---- */
.story-section h2,
.story-section p,
.story-section .stat-row,
.story-section .takeaway,
.story-section .citation-block {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-section h2.revealed,
.story-section p.revealed,
.story-section .stat-row.revealed,
.story-section .takeaway.revealed,
.story-section .citation-block.revealed {
  opacity: 1;
  transform: translateY(0);
}

.story-section h2 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #64B5F6;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.2rem;
}

.story-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64B5F6;
  box-shadow: 0 0 8px rgba(100,181,246,0.4);
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

.story-section h2.revealed::before {
  opacity: 1;
}

.story-section p, .story-section li {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.story-section strong {
  color: #fff;
  font-weight: 500;
}

/* ---- Stat callouts — staggered entrance ---- */
.stat-row {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: rgba(100,181,246,0.06);
  border: 1px solid rgba(100,181,246,0.15);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.stat-card.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stat-card:hover {
  border-color: rgba(100,181,246,0.4);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 24px rgba(100,181,246,0.12);
}

.stat-card .stat-number {
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  font-size: 1.6rem;
  color: #64B5F6;
  display: block;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
  display: block;
}

/* Prevent Pandoc-injected <p> from breaking stat layout */
.stat-card p {
  margin: 0;
  padding: 0;
}

/* ---- Hero figure ---- */
.story-figure {
  margin: 2rem -2rem;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.story-figure.revealed {
  opacity: 1;
  transform: scale(1);
}

.story-figure img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(100,181,246,0.12);
  transition: transform 0.6s ease;
  background: #fff;
}

.story-figure:hover img {
  transform: scale(1.02);
}

.story-figure .fig-caption {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 0.8rem;
  padding: 0 1.5rem;
  font-style: italic;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.story-figure.revealed .fig-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Alternating magazine rows: text one side, photo the other ---- */
.story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
  margin: 3.5rem 0;
}

/* .flip moves the image to the left column (text stays first in source for
   mobile read order) */
.story-row.flip .story-row-media {
  order: -1;
}

.story-row-text .story-section {
  margin-bottom: 0;
}

/* The image is absolutely positioned so it fills whatever height the TEXT
   column creates — the row height is driven by text, never by the image, so a
   short paragraph never leaves dead space beside a tall photo. The cell lifts
   as a unit on hover (overflow:hidden clips the image, not the shadow). */
.story-row-media {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease;
}

/* Small credit line overlaid on the photo (CC-BY attribution / source) */
.story-row-media .photo-credit {
  position: absolute;
  bottom: 8px;
  right: 10px;
  z-index: 2;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.42);
  padding: 2px 8px;
  border-radius: 5px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.story-row-media:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

/* ---- Data-figure rows (opt-in via `.figure-row`) ----
   Decorative-photo rows fill their cell via object-fit cover; a research figure
   must show whole, uncropped. `.figure-row` makes the image render at its full
   natural height at the same column width. Media entries (plain .story-row) are
   unaffected. */
.story-row.figure-row .story-row-media {
  min-height: 0;
}
.story-row.figure-row .story-row-media img,
.story-row.figure-row .story-row-media .story-photo {
  position: static;
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Wide figures (.wide): a landscape figure squeezed into a half-column
   gets shrunk and leaves the text half-empty. `.wide` stacks the row instead —
   a comfortable lead paragraph on top, the figure full-width below. ---- */
.story-row.wide {
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}
.story-row.wide .story-row-media { order: 0; }  /* cancel .flip: text reads first */
.story-row.wide .story-row-text { max-width: 72ch; }

.story-row-media p {
  display: contents;
}

/* Absolute fill + 60px vertical overscan so the JS parallax can drift the image
   within the frame without exposing edges. Absolute => the image does not add to
   the cell's content height, so the text column drives the row height. */
.story-row-media .story-photo {
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: calc(100% + 60px);
  object-fit: cover;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 1s ease;
  will-change: transform;
}

.story-row-media .story-photo.revealed {
  opacity: 1;
}

@media (max-width: 768px) {
  .story-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .story-row.flip .story-row-media {
    order: 0;
  }
  .story-row-media {
    min-height: 0;
  }
  .story-row-media .story-photo {
    position: static;
    top: auto;
    height: auto;
    object-fit: contain;
  }
}

/* ---- Single punctuating photo — newspaper pop-up between text blocks ---- */
.story-photo {
  margin: 3.5rem auto;
  max-width: 1050px;
  opacity: 0;
  transform: translateY(56px) rotate(-2.5deg);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.story-photo.tilt-right {
  transform: translateY(56px) rotate(2.5deg);
}

.story-photo.revealed,
.story-photo.tilt-right.revealed {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.story-photo p {
  margin: 0;
}

.story-photo img {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(100,181,246,0.12);
  transition: transform 0.6s ease;
}

.story-photo:hover img {
  transform: scale(1.015);
}

.story-photo .fig-caption {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 0.8rem;
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .story-photo,
  .story-photo.tilt-right {
    transform: translateY(36px) rotate(0);
  }
}

/* ---- Two-image gallery row — uses the wide canvas ---- */
.story-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
  align-items: start;
}

.story-gallery figure {
  margin: 0;
}

/* Quarto wraps consecutive images in a <p>; dissolve it so imgs become grid items */
.story-gallery p {
  display: contents;
}

.story-gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(100,181,246,0.12);
  display: block;
  transition: transform 0.6s ease;
}

.story-gallery img:hover {
  transform: scale(1.02);
}

/* Reveal: fade in + slide up + rotate (cssanimation.rocks style) */
.story-gallery .gallery-item {
  opacity: 0;
  transform: translateY(48px) rotate(-4deg);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.story-gallery .gallery-item:nth-child(even) {
  transform: translateY(48px) rotate(4deg);
}

.story-gallery .gallery-item.revealed {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.gallery-caption {
  grid-column: 1 / -1;
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 0.2rem;
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .story-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .story-gallery .gallery-item,
  .story-gallery .gallery-item:nth-child(even) {
    transform: translateY(32px) rotate(0);
  }
}

/* ---- Takeaway box ---- */
.takeaway {
  background: rgba(100,181,246,0.05);
  border-left: 3px solid #64B5F6;
  border-radius: 0 12px 12px 0;
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}

.takeaway p {
  font-size: 0.95rem !important;
  color: rgba(255,255,255,0.85) !important;
  margin: 0;
  /* takeaway paragraphs inherit reveal from parent */
  opacity: 1 !important;
  transform: none !important;
}

/* ---- Citation block ---- */
.citation-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(100,181,246,0.08);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin-top: 1rem;
}

.citation-block p {
  font-size: 0.82rem !important;
  color: rgba(255,255,255,0.45) !important;
  line-height: 1.6 !important;
  margin: 0;
  /* citation paragraphs inherit reveal from parent */
  opacity: 1 !important;
  transform: none !important;
}

.citation-block a {
  color: #64B5F6 !important;
}

/* ---- CTA button ---- */
.pub-cta {
  text-align: center;
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.pub-cta.revealed {
  opacity: 1;
  transform: translateY(0);
}

.pub-cta a {
  display: inline-block;
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, rgba(100,181,246,0.2), rgba(100,181,246,0.08));
  border: 1px solid rgba(100,181,246,0.3);
  border-radius: 30px;
  padding: 0.8rem 2.2rem;
  text-decoration: none;
  transition: all 0.35s ease;
}

.pub-cta a:hover {
  background: linear-gradient(135deg, rgba(100,181,246,0.35), rgba(100,181,246,0.15));
  border-color: #64B5F6;
  box-shadow: 0 4px 20px rgba(100,181,246,0.2);
  transform: translateY(-2px);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .pub-hero h1 { font-size: 1.5rem; }
  .stat-row { flex-direction: column; }
  .story-figure { margin: 1.5rem -0.5rem; }
}

/* ---- Custom figure lightbox (position:fixed overlay — never touches scroll) ---- */
.story-figure img { cursor: zoom-in; }

.pub-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  cursor: zoom-out;
  overflow: hidden;
}

.pub-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.pub-lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
  cursor: default;
}

.pub-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 1.6rem;
  line-height: 44px;
  text-align: center;
  padding: 0;
  transition: background 0.2s ease;
}

.pub-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .pub-lightbox { transition: none; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .pub-hero > *,
  .story-section h2,
  .story-section p,
  .story-section .stat-row,
  .story-section .takeaway,
  .story-section .citation-block,
  .stat-card,
  .story-figure,
  .story-figure .fig-caption,
  .pub-divider,
  .pub-cta {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Cinematic hero variant — peer-reviewed publications
   JS sets journal-cover.jpg as background-image at runtime.
   Cover card floats bottom-right; text cluster bottom-left.
   Same gradient stack as media/_media_detail.css.
   ═══════════════════════════════════════════════════════════════ */

.pub-hero--cinematic {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  text-align: left;
  padding: 0;
}

/* Layer 1 — radial vignette */
.pub-hero--cinematic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 35%,
    transparent            25%,
    rgba(15, 20, 25, 0.22) 70%,
    rgba(15, 20, 25, 0.38) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Layer 2 — bottom dissolve into body bg */
.pub-hero--cinematic::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70%;
  background: linear-gradient(
    to bottom,
    transparent                  0%,
    rgba(10, 13, 16, 0.18)      20%,
    rgba(10, 13, 16, 0.55)      50%,
    rgba(10, 13, 16, 0.88)      78%,
    oklch(5% 0.005 230)        100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Quarto wraps markdown headings in <section class="level1"> and images in <p>.
   These are the actual direct children — target them explicitly. */

/* <p> wrapping the cover img → position it at bottom-right */
.pub-hero--cinematic > p {
  position: absolute;
  z-index: 3;
  bottom: 3.5rem;
  right: 2.8rem;
  margin: 0;
  line-height: 0;
  opacity: 0;
  transform: translateY(14px);
  animation: heroChildIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.70s forwards;
}

/* <section class="level1"> wrapping title + all metadata → fill the hero */
.pub-hero--cinematic > section {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  animation: heroChildIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

/* ── Journal cover card ── */
.pub-hero--cinematic .pub-cover {
  display: block;
  width: 110px;
  height: 147px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.35),
    -3px 0 0 rgba(0, 0, 0, 0.18) inset;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease;
}

.pub-hero--cinematic .pub-cover:hover {
  transform: translateY(-4px) rotateY(-3deg);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.72),
    0 4px 12px rgba(0, 0, 0, 0.35),
    -3px 0 0 rgba(0, 0, 0, 0.18) inset;
}

/* ── All elements inside the section: position absolute within it ── */
/* Case A: hero is a <div>, Quarto wraps heading in nested <section> */
.pub-hero--cinematic > section > * {
  position: absolute;
}

/* Case B: no cover image — Quarto makes the hero div itself the <section>.
   Direct children need explicit positioning. */
.pub-hero--cinematic > h1,
.pub-hero--cinematic > .pub-journal,
.pub-hero--cinematic > .pub-meta,
.pub-hero--cinematic > .pub-authors,
.pub-hero--cinematic > .pub-hero-credit {
  position: absolute;
}

/* No cover card in case B — extend title and authors to right edge */
.pub-hero--cinematic > h1    { right: 2.8rem; }
.pub-hero--cinematic > .pub-authors { right: 2.8rem; }

/* ── Title — bottom-left ── */
.pub-hero--cinematic h1 {
  bottom: 6.5rem;
  left: 2.8rem;
  right: 35%;
  font-size: clamp(1.4rem, 2.2vw, 2.4rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.90);
  letter-spacing: 0.015em;
  line-height: 1.22;
  text-align: left;
  margin: 0;
}

/* ── Journal name ── */
.pub-hero--cinematic .pub-journal {
  bottom: 5.2rem;
  left: 2.8rem;
  font-style: normal;
  font-size: 0.80rem;
  font-weight: 500;
  color: #64B5F6;
  letter-spacing: 0.05em;
  margin: 0;
}

/* ── Meta row (date + doi) ── */
.pub-hero--cinematic .pub-meta {
  bottom: 4.4rem;
  left: 2.8rem;
  justify-content: flex-start;
  margin: 0;
}

/* Quarto wraps meta content in a <p> — strip its default margins */
.pub-hero--cinematic .pub-meta p {
  margin: 0;
  padding: 0;
}

/* ── Authors ── */
.pub-hero--cinematic .pub-authors {
  bottom: 2.8rem;
  left: 2.8rem;
  right: 35%;
  margin: 0;
  max-width: none;
}

/* ── Painting/photo credit — bottom-right ── */
.pub-hero--cinematic .pub-hero-credit {
  bottom: 1.0rem;
  right: 2.8rem;
  max-width: 32%;
  text-align: right;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  color: rgba(235, 220, 195, 0.30);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.pub-hero--cinematic .pub-hero-credit .painting {
  display: block;
  font-style: normal;
  font-weight: 500;
  color: rgba(212, 178, 120, 0.75);
  margin-bottom: 0.25rem;
  font-size: 0.63rem;
  letter-spacing: 0.05em;
}

.pub-hero--cinematic .pub-hero-credit .location {
  display: block;
  font-style: normal;
  font-size: 0.59rem;
  color: rgba(185, 160, 110, 0.52);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

/* Spacer that prevents Quarto from collapsing the hero <div> into the <section> */
.pub-hero-spacer { display: none; }

/* Hide the divider immediately following the cinematic hero */
.pub-hero--cinematic + .pub-divider { display: none; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .pub-hero--cinematic h1 {
    bottom: 8.0rem;
    left: 1.2rem;
    right: 1.2rem;
    font-size: clamp(1.1rem, 4.5vw, 1.6rem);
    line-height: 1.18;
  }
  .pub-hero--cinematic .pub-journal {
    left: 1.2rem;
    bottom: 6.6rem;
  }
  .pub-hero--cinematic .pub-meta {
    left: 1.2rem;
    right: 1.2rem;
    bottom: 5.0rem;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
  }
  .pub-hero--cinematic .pub-authors {
    left: 1.2rem;
    right: 1.2rem;
    bottom: 3.8rem;
    font-size: 0.75rem;
  }
  .pub-hero--cinematic > p            { display: none; }
  .pub-hero--cinematic .pub-meta      { display: none; }
  .pub-hero--cinematic .pub-hero-credit { display: none; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .pub-hero--cinematic > p,
  .pub-hero--cinematic > section {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
