/* ------------------------------------------------------------------
   Custom modernization layer, loaded on top of the Ananke/Tachyons
   theme styles. Keeps the existing Hugo/Ananke setup intact and only
   adds new component classes + light global polish.
------------------------------------------------------------------ */

:root {
  --accent: #1a56db;
  --accent-dark: #133f9e;
  --ink: #1f2430;
  --muted: #667085;
  --card-bg: #ffffff;
  --card-radius: 16px;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.08);
  --card-shadow-hover: 0 4px 8px rgba(16, 24, 40, 0.08), 0 12px 32px rgba(16, 24, 40, 0.14);
}

/* ---------- global polish ---------- */

body {
  -webkit-font-smoothing: antialiased;
}

a {
  transition: color 0.15s ease;
}

/* Homepage hero title/subtitle — same white-90 opacity as the nav menu,
   but sitting lower over a brighter part of the header photo makes them
   read as less visible than the menu without extra help holding contrast:
   a stronger shadow plus a local gradient darkening just behind the text
   (not the whole photo, which should stay bright). */
header.cover .tl-l {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 85%);
}

header.cover h1,
header.cover h2 {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6);
}

/* Hero background as its own layer so it can be rotated a degree or two
   (to level a subject that was slightly tilted in-camera) without rotating
   the nav/title on top of it. Over-sized and centered so the rotation
   never reveals an edge. */
.hero {
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-repeat: no-repeat;
  transform-origin: center center;
}

.hero__dim {
  position: relative;
  z-index: 1;
}

/* Section headings (e.g. "Recent News") — same size and alignment as
   the "Welcome!" heading above them. */
.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: left;
  letter-spacing: -0.01em;
  color: #0b5394;
  margin-bottom: 1.5rem !important;
}

/* Pill CTA buttons (e.g. "All News") */
.btn-pill {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-pill:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Simple text links inside "More" lists etc. */
.link-accent {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.link-accent:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ------------------------------------------------------------------
   Homepage intro — "Welcome!" blurb, matching the blue/black theme
   used on the Group and Publications pages.
------------------------------------------------------------------ */

/* Same treatment as .section-heading ("Recent News") */
.homepage-intro h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0b5394;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem 0;
}

/* Same treatment as the news entry body copy (.news-entry__summary) */
.homepage-intro p {
  font-size: 1rem;
  line-height: 1.6;
  color: #000;
}

.homepage-intro a {
  color: #0b5394;
  font-weight: 600;
  text-decoration: none;
}

.homepage-intro a:hover {
  text-decoration: underline;
}


/* Fallback graphic shown when a team/alumni member has no photo yet
   (used by the People page's member and alumni rows). */
.card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__placeholder svg {
  width: 42%;
  height: 42%;
  opacity: 0.85;
}

/* "More" quick links row under the featured news entries */
.news-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 2rem 0;
  padding: 0;
  list-style: none;
}

/* ------------------------------------------------------------------
   News — plain entries in the same blue/black theme and hairline-
   divided rhythm as the Group and Publications pages. Picture on the
   left, text on the right; wraps to stacked on narrow viewports
   (homepage teaser and the /news archive both use this).
------------------------------------------------------------------ */

.news-list {
  display: flex;
  flex-direction: column;
}

.news-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(31, 36, 48, 0.1);
}

.news-list .news-entry:first-child {
  padding-top: 0;
}

.news-list .news-entry:last-child {
  border-bottom: none;
}

/* Homepage teaser: no dividers between entries, just whitespace. */
.news-list--no-divider .news-entry {
  border-bottom: none;
}

.news-entry__media {
  width: 240px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.news-entry__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Figures/diagrams: show the whole image, nothing cropped off. */
.news-entry__media--contain {
  background: #fff;
}

.news-entry__media--contain img {
  object-fit: contain;
}

.news-entry__body {
  flex: 1;
  min-width: 260px;
}

.news-entry__date {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5392ca;
  margin: 0 0 0.25rem 0;
}

.news-entry__title {
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0 0 0.75rem 0;
}

.news-entry__title a {
  color: #000;
  text-decoration: none;
}

.news-entry__title a:hover {
  text-decoration: underline;
}

.news-entry__summary {
  font-size: 1rem;
  line-height: 1.6;
  color: #000;
}

/* Single news article — same date/title/body treatment as the list
   entries (and the rest of the site), just at article scale: a full-
   width photo instead of a fixed thumbnail. */
.news-single__media {
  margin: 0.5rem 0 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.news-single__media img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
}

.news-single__media--contain img {
  object-fit: contain;
}

/* ------------------------------------------------------------------
   Publications header — the figure fills the entire band as a plain
   background, dimmed so the nav and title stay readable on top,
   matching the site's other headers.
------------------------------------------------------------------ */

.pub-hero-header {
  position: relative;
  overflow: hidden;
  background: #14161c;
}

.pub-hero-header__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.pub-hero-header__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.pub-hero-header__overlay {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
}

.pub-hero-header h1 {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------
   doc-content — shared treatment for flowing markdown list pages
   (Publications): grouped by <h3>, each entry divided by a hairline.
   Matches the Group page's plain, traditional look — no cards.
------------------------------------------------------------------ */

.doc-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem 0;
}

.doc-content h3:first-child {
  margin-top: 0;
}

.doc-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-content > ul > li {
  padding: 1.1rem 0 0 0;
  margin: 0;
  line-height: 1.6;
  color: #000;
}

/* The author line renders as its own <p> right after the <li> —
   treat the pair as one entry, with the hairline divider after it. */
.doc-content > ul + p {
  margin: 0.4rem 0 0 0;
  padding: 0 0 1.1rem 0;
  color: #000;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(31, 36, 48, 0.1);
}

.doc-content > p:last-of-type {
  border-bottom: none;
}

.doc-content a {
  color: #0b5394;
  font-weight: 600;
  text-decoration: none;
}

.doc-content a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   Team page — member cards + a compact alumni list.
------------------------------------------------------------------ */

.section-page h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem 0;
}

.section-page h2:first-child {
  margin-top: 0;
}

/* Member entries: a plain stacked list, photo + details, divided by a
   hairline — a deliberately traditional academic-roster look rather
   than cards. */
.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(31, 36, 48, 0.1);
}

.member-row:last-child {
  border-bottom: none;
}

.member-row__photo {
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #2952c4 0%, #1a56db 45%, #4f7de8 100%);
}

.member-row__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-row__photo .card__placeholder svg {
  width: 46%;
  height: 46%;
}

.member-row__body {
  flex: 1;
  min-width: 220px;
}

.member-row__name {
  font-weight: 700;
  font-size: 1.15rem;
  color: #0b5394;
  margin: 0 0 0.75rem 0;
}

.member-row__cv-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #000;
  margin: 0 0 0.4rem 0;
}

.member-row__cv {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0;
  font-size: 0.9rem;
  color: #000;
  line-height: 1.55;
}

.member-row__cv li {
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.3rem;
}

.member-row__cv li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #0b5394;
}

.member-row__email {
  font-size: 0.85rem;
  color: #000;
  margin: 0;
}

/* Alumni: the same hairline-divided list, one compact line per person. */
.alumni-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(31, 36, 48, 0.1);
}

.alumni-row:last-child {
  border-bottom: none;
}

.alumni-row__photo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2952c4 0%, #1a56db 45%, #4f7de8 100%);
}

.alumni-row__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.alumni-row__photo .card__placeholder svg {
  width: 46%;
  height: 46%;
}

.alumni-row__info {
  display: flex;
  flex-direction: column;
}

.alumni-row__name {
  font-weight: 600;
  color: #0b5394;
  font-size: 0.95rem;
}

.alumni-row__meta {
  color: #5392ca;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------------
   Research page — a single flowing page, grouped by <h2> section
   (reuses .section-page for the heading style), each section a plain
   image + text row like the Group page's member rows — no cards, no
   clickable "read more" vignettes.
------------------------------------------------------------------ */

.research-block {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
  margin: 0 0 1rem 0;
}

/* A column of stacked thumbnails beside the text — used where a section
   has (or will grow to have) more than one same-size figure next to the
   same block of text, all aligned in one column. */
.research-block__photos {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-shrink: 0;
}

.research-block__photo {
  width: 220px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.research-block__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Logos (e.g. funder marks) shouldn't fill the frame edge-to-edge like a
   photo — shrink and center them within the same-size box so they read
   as a smaller mark rather than a competing image. */
.research-block__photo--logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-block__photo--logo img {
  width: 55%;
  height: 55%;
  object-fit: contain;
}

/* Data figures/diagrams: show the whole figure, nothing cropped off. */
.research-block__photo--contain {
  background: #fff;
}

.research-block__photo--contain img {
  object-fit: contain;
}

.research-block__text {
  flex: 1;
  min-width: 260px;
  color: #000;
  line-height: 1.6;
}

.research-block__text p {
  margin: 0 0 1rem 0;
}

.research-block__text p:last-child {
  margin-bottom: 0;
}

.research-figure {
  margin: 1.5rem 0 0.5rem 0;
}

.research-figure img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
}

.research-figure__caption {
  max-width: 720px;
  margin: 0.75rem auto 0 auto;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
