/* Research paper pages (site/research/<paper>/): the paper and a photo, the abstract, Ask Amicus.
   Loaded after site.css, whose sections, facts list and closing band these pages reuse. See DESIGN.md. */

/* ---------- Hero: the paper on the left, a portrait photo on the right ---------- */

.paper-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: end;
}

.paper-hero__text { grid-column: 1 / span 7; }
.paper-hero__text:only-child { grid-column: 1 / span 10; }  /* no photo beside it */
.paper-hero__photo { grid-column: 9 / -1; }

.paper-hero__title {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(44px, 5.6vw, 80px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* The part of a title after its colon. */
.paper-hero__subtitle {
  display: block;
  margin-top: 20px;
  max-width: 900px;
  font-style: italic;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--parchment);
}
.nobreak { white-space: nowrap; }  /* keeps "Retrieval-Augmented" whole */

.paper-hero .lead { margin-top: 32px; max-width: 700px; font-size: 22px; line-height: 1.5; }

.paper-hero__byline { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

.paper-hero__authors { margin-top: 16px; max-width: 700px; font-size: 15px; line-height: 1.6; color: var(--ash); }
.paper-hero__me { color: var(--ivory); }

/* ---------- Photos: shown as taken, on 2px corners, with a mono caption ---------- */

.photo { display: flex; flex-direction: column; gap: 14px; }

.photo__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--carbon);
}

/* A landscape photo sits under the hero, in line with the section text, its caption in the label column. */
.paper-figure {
  margin-top: 96px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: end;
}
.paper-figure__img { grid-column: 4 / -1; grid-row: 1; }
.paper-figure figcaption { grid-column: 1 / span 3; grid-row: 1; max-width: 220px; line-height: 1.7; }

/* ---------- Abstract ---------- */

.abstract { max-width: 760px; font-size: 19px; line-height: 1.7; color: var(--parchment); }
.abstract p + p { margin-top: 1.1em; }

.abstract__keywords { margin-top: 32px; max-width: 760px; font-size: 15px; line-height: 1.6; color: var(--ash); }
.abstract__keywords .meta { margin-right: 14px; font-size: 11px; color: var(--brass); }

.abstract__facts { margin-top: 48px; max-width: 760px; }
.abstract__facts dt { width: 96px; }
.abstract__facts a { padding-bottom: 1px; border-bottom: 1px solid var(--brass); color: var(--parchment); transition: color 0.25s; }
.abstract__facts a:hover { color: var(--ivory); }

/* ---------- Ask Amicus: the CV's closing band, shown only once Amicus is live ---------- */

.paper-amicus[hidden] { display: none; }
.paper-amicus .btn { cursor: pointer; font-family: var(--sans); border: 0; }
.paper-amicus:not([hidden]) + .page-end { display: none; }  /* the band sits on the footer, as on the CV */

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
  .paper-hero__photo { grid-column: 8 / -1; }
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {
  .paper-hero { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .paper-hero__text, .paper-hero__text:only-child, .paper-hero__photo { grid-column: auto; }
  .paper-hero__title { margin-top: 18px; font-size: 40px; line-height: 1.04; }
  .paper-hero__subtitle { margin-top: 14px; font-size: 22px; }
  .paper-hero .lead { margin-top: 20px; font-size: 18px; }
  .paper-hero__byline { margin-top: 28px; flex-direction: column; align-items: flex-start; }

  .paper-figure { margin-top: 48px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .paper-figure figcaption { max-width: none; }

  .abstract { font-size: 17px; line-height: 1.65; }
  .abstract__keywords { margin-top: 24px; }
  .abstract__facts { margin-top: 36px; }
  .abstract__facts > div { flex-direction: column; gap: 6px; }
  .abstract__facts dt { width: auto; }
}
