/* =============================================================
   NRCI Design System
   Navy: #1e3a5f  ·  Gold: #b0842b  ·  Warm white: #faf9f6
   Font: Rubik (all text)
   ============================================================= */

/* ---- Reset & base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:  #1e3a5f;
  --navy-dark: #12294a;
  --gold:  #b0842b;
  --gold-light: #d4a94a;
  --cream: #faf9f6;
  --paper: #f5f3ee;
  --text:  #2c2c2c;
  --text-light: #5a5a5a;
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Rubik', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .6em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .5em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-bottom: .4em; }

p { margin-bottom: 1em; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Wider wrap for the masthead and home page sections */
.masthead .wrap { max-width: 1400px; }
.home-wrap { max-width: 1400px; }

/* ---- Masthead / sticky nav --------------------------------- */
.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .6s ease, border-color .6s ease, box-shadow .6s ease;
}

/* Scrolled state — solid black bar */
.masthead.scrolled {
  background: #000;
  border-bottom-color: #000;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.brand-lockup { display: flex; align-items: center; }
.brand-lockup img { height: 62px; width: auto; }

/* White logo by default (over hero), swap to colour when scrolled */
.brand-lockup .logo-white  { display: block; }
.brand-lockup .logo-colour { display: none; }
.masthead.scrolled .brand-lockup .logo-white  { display: block; }
.masthead.scrolled .brand-lockup .logo-colour { display: none; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
}

.main-nav a {
  font-size: 1.44rem;
  font-weight: 400;
  text-decoration: none;
  color: #fff;
  letter-spacing: .01em;
  transition: color .2s;
}
.main-nav a:hover { color: var(--gold-light); }

/* ---- Submenus (dropdowns) ---------------------------------- */
.main-nav .has-sub { position: relative; }
.sub-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 1.44rem; font-weight: 400;
  letter-spacing: .01em; color: #fff;
  transition: color .2s;
}
.masthead:not(.scrolled) .sub-toggle { text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.sub-toggle:hover, .has-sub.open .sub-toggle { color: var(--gold-light); }
.chev {
  width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.has-sub.open .chev { transform: rotate(180deg); }

.main-nav .sub-menu {
  display: block;          /* stack items vertically (not in a row like the main menu) */
  list-style: none;
  position: absolute;
  top: calc(100% + 1.1rem);
  left: -1.2rem;
  min-width: 210px;
  background: #000;
  border-top: 2px solid var(--gold);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  padding: .6rem 0;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
/* invisible bridge so the menu doesn't close while the mouse moves down */
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -1.3rem; height: 1.3rem; }
.has-sub.open .sub-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 861px) {
  .has-sub:hover .sub-menu { opacity: 1; visibility: visible; transform: none; }
  .has-sub:hover .chev { transform: rotate(180deg); }
}
.main-nav .sub-menu a {
  display: block;
  padding: .55rem 1.2rem;
  font-size: 1.1rem;
  text-shadow: none;
}
.main-nav .sub-menu a:hover { background: rgba(255,255,255,.07); }

/* Phones/tablets: submenu sits inline, indented, inside the open menu */
@media (max-width: 860px) {
  .sub-toggle { font-size: 1rem; }
  .main-nav .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; box-shadow: none; border: 0; background: none;
    padding: .3rem 0 0 1rem; min-width: 0;
  }
  .sub-menu::before { display: none; }
  .main-nav .has-sub.open .sub-menu { display: block; }
  .main-nav .sub-menu a { padding: .3rem 0; font-size: .95rem; }
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px; height: 24px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: #fff;
  position: absolute;
  left: 0;
  transition: .25s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 96px; left: 0; right: 0;
    background: #000;
    border-bottom: 1px solid #222;
    padding: 1rem 16px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .6rem; }
  .main-nav a { font-size: 1rem; }
}

/* Offset for fixed header on non-hero pages */
main { padding-top: 96px; }
main:has(.hero) { padding-top: 0; }

/* ---- Hero -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 520px;
  height: 100vh;          /* fill the whole screen */
  height: 100svh;         /* phones: exclude the browser's address bar */
  display: flex;
  align-items: flex-end; /* text block sits along the bottom of the photo */
  overflow: hidden;
  color: #fff;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  /* Light overall tint, with darker shading only where text sits:
     a band at the top for the white menu, and a soft fade up from the
     bottom (strongest on the left) behind the NRCI title. */
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 25%),
    linear-gradient(to top, rgba(9,18,36,.72) 0%, rgba(9,18,36,.35) 28%, rgba(9,18,36,0) 50%),
    linear-gradient(to right, rgba(9,18,36,.30) 0%, rgba(9,18,36,0) 55%),
    rgba(9,18,36,.08);
}
/* Phones: text spans the full width, so tint the whole photo a bit more */
@media (max-width: 720px) {
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 25%),
      rgba(9,18,36,.45);
  }
}

/* Soft shadow under the white menu while it floats over the photo */
.masthead:not(.scrolled) .main-nav a {
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 96px 0 clamp(3rem, 8vh, 5.5rem);  /* top clears the fixed header; bottom leaves a margin under the title */
  width: 100%;
}

/* Big "NRCI" above the full name */
.hero .hero-acronym {
  font-family: 'Titillium Web', 'Rubik', sans-serif;
  font-size: clamp(2.8rem, 7.2vw, 5.2rem);
  font-weight: 300;  /* light, like the logo */
  line-height: 1;
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(6,12,24,.45);
  margin-bottom: .3rem;
}

.hero .eyebrow {
  font-family: 'Rubik', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 14px rgba(6,12,24,.55);
  margin-bottom: .8rem;
}

.hero h1 {
  font-family: 'Titillium Web', 'Rubik', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  margin-bottom: .6rem;
  color: #fff;
}

.hero .lead {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  max-width: 680px;
  line-height: 1.6;
  opacity: .92;
}

/* ---- Buttons ----------------------------------------------- */
.btn-row { margin-top: 1.2rem; }
.btn {
  display: inline-block;
  font-family: 'Rubik', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  padding: .7em 1.6em;
  border-radius: var(--radius);
  transition: background .2s, color .2s, box-shadow .2s;
}
.btn-primary {
  background: var(--gold);
  color: #fff;
}
.btn-primary:hover {
  background: var(--gold-light);
  color: #fff;
}
.btn-ghost {
  border: 1.5px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-ghost:hover {
  background: #000;
  color: #fff;
}

/* ---- Stats band -------------------------------------------- */
.stats {
  background: #000;
  color: #fff;
  padding: 2rem 0;
}

/* Equal columns across the full width — one per counter,
   so adding a fifth counter in pelicanconf.py just works */
.stats-inner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.stat {
  text-align: center;
  padding: .3rem 1rem;
}
/* Thin vertical divider between counters */
.stat + .stat {
  border-left: 1px solid rgba(255,255,255,.25);
}

/* Phones: two per row, no dividers */
@media (max-width: 720px) {
  .stats-inner {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    row-gap: 1.2rem;
  }
  .stat + .stat { border-left: none; }
}
/* Label above the number: small gold capitals, like the footer headings */
.stat .num {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--gold-light);
  margin-bottom: .2rem;
}
/* The number: thin, large Titillium Web, matching the hero "NRCI" */
.stat .lbl {
  display: block;
  font-family: 'Titillium Web', 'Rubik', sans-serif;
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;   /* digits don't jiggle while counting */
}

/* ---- Section bands ----------------------------------------- */
.band {
  padding: 4rem 0;
}

/* ---- Mission statement band (home page) -------------------- */
.mission {
  background: var(--paper);
  padding: 5rem 0;
}
.mission-text {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
}
.band.paper {
  background: var(--paper);
}

/* Section heads */
.section-head {
  margin-bottom: 2rem;
}

.section-head .kicker {
  display: block;
  font-family: 'Rubik', sans-serif;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 500;
  color: var(--navy);
  letter-spacing: .01em;
  margin-bottom: .15em;
}

.section-head h2 {
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-light);
}

.section-head p {
  max-width: 660px;
  margin-top: .6em;
  color: var(--text-light);
}

.section-head.center {
  text-align: center;
}
.section-head.center p {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Theme tiles ------------------------------------------- */
.theme-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.theme-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #000 0%, #000 100%);
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .25s;
  min-height: 160px;
}
.theme-tile:hover {
  transform: translateY(-3px);
  color: #fff;
}
.theme-tile::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: var(--gold);
  transition: transform .3s;
}
.theme-tile:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.tile-name {
  font-family: 'Rubik', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.tile-go {
  font-size: .82rem;
  opacity: .7;
}

/* ---- Card tiles -------------------------------------------- */
.card-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 720px) {
  .card-tiles { grid-template-columns: 1fr; }
}

.card-tile {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8e6e1;
  text-decoration: none;
  color: var(--text);
  transition: transform .25s, box-shadow .25s;
}
.card-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30,58,95,.12);
  color: var(--text);
}

.card-img {
  overflow: hidden;
  line-height: 0;
}
.card-img img {
  width: 100%;
  height: 312px;          /* 30% taller than before (was 240px) */
  object-fit: cover;
  transition: transform .4s;
}


.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 2rem 1.6rem;
}
.card-body h3 {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: .6rem;
}
.card-body p {
  font-size: 1.2rem;
  color: var(--text-light);
  line-height: 1.82;      /* 10% more than before (was 1.65) */
  margin-bottom: 0;
}

/* "Read more" — always sits at the bottom of the tile */
.card-more {
  margin-top: auto;
  padding-top: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: inherit;
}
.card-more svg {
  width: 18px; height: 18px;
  transition: transform .25s;
}
.card-tile:hover .card-more svg { transform: translateX(5px); }

/* Per-tile tinted backgrounds with subtle SVG patterns */

/* Research — concentric rings (echoing retinal imaging) */
.card-tile--research .card-body {
  background:
    /*url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ccircle cx='60' cy='60' r='40' fill='none' stroke='%23fff' stroke-width='1' opacity='.08'/%3E%3Ccircle cx='60' cy='60' r='28' fill='none' stroke='%23fff' stroke-width='1' opacity='.06'/%3E%3Ccircle cx='60' cy='60' r='16' fill='none' stroke='%23fff' stroke-width='1' opacity='.05'/%3E%3C/svg%3E"),*/
    linear-gradient(135deg, #e2a093 0%, #d69285 100%);   /* pastel rose, 20% darker */
  color: #4a1e1e;
}
.card-tile--research .card-body h3 { color: #4a1e1e; }
.card-tile--research .card-body p  { color: #4a1e1e; }

/* Partnerships — scattered soft circles (echoing marigold petals) */
.card-tile--partnerships .card-body {
  background:
    /*url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Ccircle cx='20' cy='30' r='14' fill='%23fff' opacity='.07'/%3E%3Ccircle cx='80' cy='15' r='10' fill='%23fff' opacity='.06'/%3E%3Ccircle cx='55' cy='70' r='18' fill='%23fff' opacity='.05'/%3E%3Ccircle cx='120' cy='55' r='12' fill='%23fff' opacity='.07'/%3E%3Ccircle cx='110' cy='115' r='16' fill='%23fff' opacity='.06'/%3E%3Ccircle cx='30' cy='110' r='11' fill='%23fff' opacity='.05'/%3E%3C/svg%3E"),*/
    linear-gradient(135deg, #a6bccf 0%, #96adc2 100%);   /* pastel blue-grey (was amber), 20% darker */
  color: #2e3f4f;
}
.card-tile--partnerships .card-body h3 { color: #2e3f4f; }
.card-tile--partnerships .card-body p  { color: #2e3f4f; }

/* Facilities — grid of small dots (structured, methodical) */
.card-tile--facilities .card-body {
  background:
    /*url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='3' fill='%23fff' opacity='.08'/%3E%3C/svg%3E"),*/
    linear-gradient(135deg, #abb1d9 0%, #979ece 100%);   /* soft periwinkle, picked from the blue vial caps in the photo */
  color: #1f2659;
}
.card-tile--facilities .card-body h3 { color: #1f2659; }
.card-tile--facilities .card-body p  { color: #1f2659; }

/* ---- Pillars ----------------------------------------------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.pillar {
  text-align: center;
}
.pillar h3 {
  color: var(--navy);
  margin-bottom: .3em;
}
.pillar p {
  font-size: .92rem;
  color: var(--text-light);
}

/* ---- Split layout ------------------------------------------ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
}

.pub-list {
  list-style: none;
}
.pub-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #e8e6e1;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .pub-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
}
.pub-list .pub-meta {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: .2em;
}

/* ---- Partners grid ----------------------------------------- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.partner {
  padding: 1.2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e8e6e1;
}
.partner b {
  display: block;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: .2em;
}
.partner span {
  font-size: .82rem;
  color: var(--text-light);
}

/* ---- News list --------------------------------------------- */
.news-list {
  list-style: none;
}
.news-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid #e8e6e1;
}
.news-item:last-child { border-bottom: none; }
.news-item time {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-light);
}
.news-item h3 {
  margin: .2em 0 .3em;
}
.news-item h3 a {
  text-decoration: none;
  color: var(--navy);
}
.news-item h3 a:hover { color: var(--gold); }
.news-item p {
  font-size: .9rem;
  color: var(--text-light);
}

/* ---- Page content ------------------------------------------ */
.page-narrow {
  max-width: 780px;
}
.page-wide {
  max-width: 1120px;
}

.page-narrow h1,
.page-wide h1 {
  color: var(--navy);
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}

/* ---- Publications page ------------------------------------- */
.pub-biblio {
  display: flex;
  flex-direction: column;
  max-width: 980px;          /* comfortable reading width */
}

.pub {
  padding: 1.7rem 0;
  border-bottom: 1px solid #eae8e3;
}
.pub:last-child { border-bottom: none; }

/* Title: larger and lighter, near-black, gold on hover */
.pub-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.45;
  color: #1c1c1c;
  text-decoration: none;
  display: block;
  margin-bottom: .45em;
  transition: color .2s;
}
a.pub-title::after {        /* small arrow shows the title is a link */
  content: " \2197";
  font-size: .8em;
  color: var(--gold);
  opacity: 0;
  transition: opacity .2s;
}
a.pub-title:hover { color: var(--gold); }
a.pub-title:hover::after { opacity: 1; }

.pub-authors {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: .3em;
}

.pub-source {
  font-size: .98rem;
  color: #8a8a8a;
}
.pub-source em {
  font-style: italic;
  color: #8f6a1f;            /* journal name in deep gold */
}

/* ---- Research / accordion page ----------------------------- */
.theme-section {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--gold);
}

.project {
  border: 1px solid #e8e6e1;
  border-radius: var(--radius);
  margin-bottom: .6rem;
  background: #fff;
}

.project summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .8rem;
  padding: .9rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-family: 'Rubik', sans-serif;
  transition: background .15s;
}
.project summary:hover {
  background: var(--paper);
}
.project summary::-webkit-details-marker { display: none; }
.project summary::marker { content: ''; }

/* Plus / minus indicator */
.project summary::after {
  content: '+';
  margin-left: auto;
  font-family: 'Rubik', sans-serif;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-light);
  flex-shrink: 0;
}
.project[open] summary::after {
  content: '\2212';
}

.project-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy-dark);
}

.project-years {
  font-family: 'Rubik', sans-serif;
  font-size: .78rem;
  color: var(--text-light);
  letter-spacing: .02em;
}

.project-desc {
  padding: 0 1.2rem 1.2rem;
  font-size: .92rem;
  color: var(--text);
  line-height: 1.65;
}
.project-desc p { margin-bottom: .6em; }

/* ---- People / Team page ------------------------------------ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.team-member {
  text-align: center;
}

.team-member img,
.team-member svg {
  width: 180px;
  height: 225px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 auto .8rem;
}

.team-member h3 {
  font-size: 1rem;
  margin-bottom: .1em;
  color: var(--navy);
}

.team-member .role {
  font-size: .82rem;
  color: var(--text-light);
}

/* ---- People page ------------------------------------------- */
.people-sub {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 3.5rem 0 1.6rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #e8e6e1;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.2rem;
}
.person {
  display: flex; flex-direction: column;
  border: 2px solid #dcb560;
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: #fff;
  transition: border-color .2s;
}
.person:hover { border-color: var(--gold); }
.person .portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  background: #e9e6df;
  margin-bottom: 1.1rem;
  cursor: pointer;
}
.person .portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.person h3 { font-size: 1.15rem; font-weight: 500; margin-bottom: .25rem; }
.person .role { font-size: .9rem; font-weight: 500; color: #8f6a1f; }
.person .affil { font-size: .88rem; color: var(--text-light); line-height: 1.5; margin-top: .3rem; }
/* Push the links and "Read bio" to the bottom so they line up across cards */
/* Cards show only name and position; the icon links appear in the bio pop-up only */
.person > .person-links { display: none; }
/* Push "Read bio" to the bottom so it lines up across cards */
.person .bio-btn { margin-top: auto; align-self: stretch; }
.person .affil { margin-bottom: 1.1rem; }
/* Affiliation shows only in the bio pop-up, not on the card */
.person > .affil { display: none; }
.person > .role { margin-bottom: 1.1rem; }

/* Round icon links (LinkedIn, website, Google Scholar, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 10.5V16.5M9 7.6v.01M12.5 16.5v-6h1.7a3 3 0 0 1 0 6z'/%3E%3C/svg%3E")) */
.person-links { display: flex; gap: .5rem; margin-top: 1rem; }
.plink {
  width: 37px; height: 37px;
  border-radius: 50%;
  border: 1px solid #e6c36c;
  background: #e6c36c;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background .2s, color .2s, border-color .2s;
}
.plink::before {
  content: "";
  width: 19px; height: 19px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.plink:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.plink--linkedin { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Cpath d='M8 10.5V17M8 7.2v.01M12 17v-6.5M12 13.5a2.5 2.5 0 0 1 5 0V17'/%3E%3C/svg%3E"); }
.plink--web      { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9M12 3C9.5 5.7 8.2 8.7 8.2 12s1.3 6.3 3.8 9'/%3E%3C/svg%3E"); }
.plink--scholar  { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5 12 4l10 5.5L12 15z'/%3E%3Cpath d='M6 12v4.5c3.5 2.3 8.5 2.3 12 0V12M22 9.5V15'/%3E%3C/svg%3E"); }
.plink--orcid    { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 10.5V16.5M9 7.6v.01M12.5 16.5v-6h1.7a3 3 0 0 1 0 6z'/%3E%3C/svg%3E"); }

/* "Read bio" button */
.bio-btn {
  align-self: flex-start;
  margin-top: 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: .45rem;
  width: 100%;
  background: #f3d27e;
  border: 0;
  border-radius: 10px;
  padding: .6rem .9rem;
  transition: background .2s, color .2s;
  font: inherit; font-size: .95rem; font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.bio-btn-arrow {
  width: 15px; height: 15px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.bio-btn:hover .bio-btn-arrow { transform: translateX(4px); }
.bio-btn:hover { background: var(--gold); color: #fff; }
.bio-btn:hover .bio-btn-arrow { background: #fff; }

/* Bio pop-up window */
.bio-dialog {
  width: min(940px, 92vw);
  max-height: 88vh;
  margin: auto;
  border: 0;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.bio-dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.bio-dialog[open] { animation: bioIn .25s ease; }
@keyframes bioIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.bd-inner { display: grid; grid-template-columns: 300px 1fr; max-height: 88vh; }
.bd-side { background: var(--paper); padding: 2.2rem; }
.bd-side .portrait { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: #e9e6df; }
.bd-side .portrait img { width: 100%; height: 100%; object-fit: cover; }
.bd-side .person-links { justify-content: center; margin-top: 1.2rem; }
.bd-main { padding: 2.6rem 3rem 2.8rem; overflow-y: auto; }
.bd-main h2 { font-size: 1.7rem; font-weight: 500; margin-bottom: .3rem; padding-right: 2.5rem; }
.bd-main .role { font-weight: 500; color: #8f6a1f; }
.bd-main .affil { color: var(--text-light); font-size: .95rem; margin-top: .2rem; }
.bd-main .bio { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid #e8e6e1; }
.bd-main .bio p { line-height: 1.75; }

.bd-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%; border: 0;
  background: #f0eee9; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bd-close::before {
  content: ""; width: 18px; height: 18px; background: var(--text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bd-close:hover { background: #000; }
.bd-close:hover::before { background: #fff; }

@media (max-width: 720px) {
  .bd-inner { grid-template-columns: 1fr; overflow-y: auto; }
  .bd-side { display: flex; gap: 1.2rem; align-items: center; padding: 1.5rem; }
  .bd-side .portrait { width: 110px; flex: none; }
  .bd-side .person-links { flex-wrap: wrap; justify-content: flex-start; margin-top: 0; }
  .bd-main { padding: 1.6rem 1.5rem 2rem; overflow: visible; }
}
html.bio-open { overflow: hidden; }

/* ---- Partners page ----------------------------------------- */
.partners-intro p { max-width: 760px; color: var(--text-light); font-size: 1.1rem; }
.partners-cat {
  font-size: 1.6rem;  /* doubled from .8rem so each category stands out among the logos */
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 3.2rem 0 1.4rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #e8e6e1;
}
.partner-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));   /* four equal logos per row */
  gap: 1.4rem;
}
@media (max-width: 900px) { .partner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.partner {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2;
  padding: 1.4rem 1.4rem 2rem;
  background: #fff;
  border: 1px solid #e8e6e1;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
/* Logos always show in full colour */
.partner img {
  max-width: 80%;
  max-height: 72px;
  object-fit: contain;
}
.partner-name {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-light);
  transition: color .3s;
}
.partner-visit {
  position: absolute; left: 0; right: 0; bottom: .7rem;
  text-align: center;
  font-size: .78rem; font-weight: 500; letter-spacing: .04em;
  color: var(--gold);
  opacity: 0; transform: translateY(4px);
  transition: opacity .25s, transform .25s;
}
a.partner:hover, a.partner:focus-visible {
  transform: translateY(-3px);
  border-color: #d9d4c8;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
a.partner:hover .partner-name { color: var(--text); }
a.partner:hover .partner-visit, a.partner:focus-visible .partner-visit { opacity: 1; transform: none; }
.partner--nolink { background: #faf9f6; }

/* ---- Research section: landing, themes, projects ----------- */
.research-intro { max-width: 860px; margin-bottom: 2.6rem; }
.research-intro p { font-size: 1.1rem; line-height: 1.75; color: var(--text-light); }

/* Theme tiles reuse the home-page card style, one pastel per theme */
.card-tile--theme-eye-health .card-body {
  background: linear-gradient(135deg, #a6bccf 0%, #96adc2 100%); color: #2e3f4f; }
.card-tile--theme-eye-health .card-body h3,
.card-tile--theme-eye-health .card-body p { color: #2e3f4f; }
.card-tile--theme-brain-cardiometabolic-health .card-body {
  background: linear-gradient(135deg, #e2a093 0%, #d69285 100%); color: #4a1e1e; }
.card-tile--theme-brain-cardiometabolic-health .card-body h3,
.card-tile--theme-brain-cardiometabolic-health .card-body p { color: #4a1e1e; }
.card-tile--theme-nutritional-science .card-body {
  background: linear-gradient(135deg, #b8cfa4 0%, #a6c290 100%); color: #263d17; }
.card-tile--theme-nutritional-science .card-body h3,
.card-tile--theme-nutritional-science .card-body p { color: #263d17; }

/* Theme tiles sit in a narrower column than the home page, so smaller headings */
.card-tile[class*="card-tile--theme-"] .card-body h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); }

/* Theme cards on the Research page: same fused style as project cards, taller */
.theme-tiles-fused {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
@media (max-width: 900px) { .theme-tiles-fused { grid-template-columns: 1fr; } }
.project-tile.theme-tile-fused { aspect-ratio: 4 / 5; min-height: 380px; }
@media (max-width: 900px) { .project-tile.theme-tile-fused { aspect-ratio: auto; min-height: 300px; } }
.theme-tile-fused .project-tile-body { padding: 1.6rem 1.7rem 1.6rem; }
.theme-tile-fused h3 { font-size: clamp(1.5rem, 2.1vw, 1.9rem); line-height: 1.2; margin-bottom: .6rem; }
.theme-tile-fused .project-fullname { font-size: 1.05rem; line-height: 1.55; }
.theme-tile-fused .project-more { margin-top: 1.1rem; font-size: .95rem; }
.theme-count {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-light); margin: 0 0 .5rem;
}
/* Until photos arrive: a deep tint of each theme's colour */
.theme-tile-fused--eye-health .project-tile-img--empty { background: linear-gradient(135deg, #5a7489 0%, #2b3a48 100%); }
.theme-tile-fused--brain-cardiometabolic-health .project-tile-img--empty { background: linear-gradient(135deg, #9a5a50 0%, #4a2520 100%); }
.theme-tile-fused--nutritional-science .project-tile-img--empty { background: linear-gradient(135deg, #6d8a5c 0%, #2f4126 100%); }

.back-link {
  display: inline-block;
  margin-bottom: 1.2rem;
  font-size: .95rem; font-weight: 500;
  color: #8f6a1f; text-decoration: none;
}
.back-link:hover { color: var(--gold); }

/* Project tiles: photo fills the card, text sits on a dark overlay — 3 per row */
.project-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
@media (max-width: 900px) { .project-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .project-tiles { grid-template-columns: 1fr; } }
.project-tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 16 / 10;
  min-height: 210px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #3a3a3a;
  text-decoration: none; color: #fff;
  transition: transform .25s, box-shadow .25s;
}
.project-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.18); color: #fff; }
/* Background photo */
.project-tile-img { position: absolute; inset: 0; line-height: 0; }
/* No photo yet: plain warm-grey background instead of a placeholder picture */
.project-tile-img--empty { background: linear-gradient(135deg, #8b857a 0%, #5f5a52 100%); }
.project-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }

/* Dark transparency: strongest at the bottom where the text sits */
.project-tile-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.3) 100%);
  transition: background .3s;
}
.project-tile:hover .project-tile-img::after {
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 50%, rgba(0,0,0,.38) 100%);
}
.project-tile-body { position: relative; padding: 1.2rem 1.4rem 1.2rem; }
.project-tile-body h3 { font-size: 1.6rem; font-weight: 500; color: #fff; margin-bottom: .15rem; }
.project-years-tile {
  font-size: .8rem; font-weight: 600; letter-spacing: .1em;
  color: var(--gold-light); margin: 0 0 .35rem;
}
.project-years-tile--tbc { font-weight: 500; letter-spacing: .02em; color: rgba(255,255,255,.65); font-style: italic; }
.project-fullname { font-size: .95rem; line-height: 1.45; color: rgba(255,255,255,.88); margin: 0; }
.project-more {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: .8rem;
  font-size: .9rem; font-weight: 500; color: #fff;
}
.project-more svg { width: 16px; height: 16px; transition: transform .25s; }
.project-tile:hover .project-more svg { transform: translateX(4px); }

/* Project page */
.project-page h1 { margin-bottom: .2rem; }
.project-subtitle { font-size: 1.3rem; line-height: 1.45; color: var(--text-light); margin-bottom: .4rem; }
.project-dates {
  display: inline-block;
  font-size: .85rem; font-weight: 600; letter-spacing: .1em;
  color: #8f6a1f; margin-bottom: 0;
}
.project-meta {
  display: flex; flex-wrap: wrap; gap: 1rem 3rem;
  margin: 1.4rem 0 0; padding: 1rem 1.3rem;
  background: var(--paper); border-radius: var(--radius);
}
.project-meta dt {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #8f6a1f; margin-bottom: .2rem;
}
.project-meta dd { margin: 0; font-size: 1rem; line-height: 1.55; }
.project-content { margin-top: 2rem; padding-top: 1.8rem; border-top: 1px solid #e8e6e1; }
.project-content p { font-size: 1.3rem; line-height: 1.8; }
.project-content h2 {
  font-size: 1.6rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin: 2.8rem 0 .9rem;  /* headings doubled from .8rem */
}
.coming-soon { color: var(--text-light); font-style: italic; }

/* ---- Facilities page --------------------------------------- */
.lab-jump { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 3rem; }
.lab-pill {
  display: inline-flex; align-items: baseline; gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none; font-weight: 500; color: var(--text);
  background: var(--lab-tint); border: 1px solid var(--lab-line);
  transition: transform .2s;
}
.lab-pill span { font-size: .85rem; font-weight: 400; color: var(--text-light); }
.lab-pill:hover { transform: translateY(-2px); color: var(--text); }

/* One accent colour per lab, matching the research-theme pastels */
.lab-pill--vision-lab, .lab--vision-lab { --lab-tint: #e3eaf0; --lab-line: #a6bccf; --lab-ink: #2e3f4f; }
.lab-pill--howard-lab, .lab--howard-lab { --lab-tint: #f9ead2; --lab-line: #eec481; --lab-ink: #5a3608; }
.lab-pill--darwin-lab, .lab--darwin-lab { --lab-tint: #e6efdd; --lab-line: #b8cfa4; --lab-ink: #263d17; }

.lab {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.6rem 3rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid #e8e6e1;
  scroll-margin-top: 110px;   /* keep the heading clear of the fixed menu */
}
.lab-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; background: #e9e6df; line-height: 0; }
.lab-photo img { width: 100%; height: 100%; object-fit: cover; }
.lab-focus {
  font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--lab-ink); margin-bottom: .4rem;
}
.lab-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 500; margin-bottom: .6rem; }
.lab-intro { font-size: 1.15rem; line-height: 1.7; color: var(--text-light); margin: 0; }

.instrument-grid {
  grid-column: 1 / -1;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
  margin-top: .6rem;
}
.instrument {
  background: #fff;
  border: 1px solid #e8e6e1;
  border-top: 4px solid var(--lab-line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1.3rem;
}
.instrument-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.instrument h3 { font-size: 1.2rem; font-weight: 500; margin: 0; }
.instrument-count {
  flex: none;
  font-size: .85rem; font-weight: 600;
  color: var(--lab-ink); background: var(--lab-tint);
  border-radius: 999px; padding: .1rem .6rem;
}
.instrument-model { font-size: .92rem; color: var(--text-light); margin: .3rem 0 0; }
.instrument-use { font-size: .98rem; line-height: 1.6; margin: .9rem 0 0; }
.instrument-use span {
  display: block;
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--lab-ink); margin-bottom: .2rem;
}

.lab-used { grid-column: 1 / -1; margin: .4rem 0 0; font-size: .95rem; color: var(--text-light); }
.lab-used a {
  display: inline-block; margin: .25rem 0 .25rem .5rem;
  padding: .2rem .75rem; border-radius: 999px;
  background: var(--lab-tint); color: var(--lab-ink);
  font-weight: 500; text-decoration: none;
}
.lab-used a:hover { background: var(--lab-line); }

.facilities-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 2rem; padding: 2rem 2.4rem;
  background: var(--paper); border-radius: 10px;
}
.facilities-cta h2 { font-size: 1.4rem; font-weight: 500; margin-bottom: .3rem; }
.facilities-cta p { margin: 0; color: var(--text-light); }

@media (max-width: 800px) {
  .lab { grid-template-columns: 1fr; gap: 1.2rem; padding: 2.4rem 0; }
}

/* ---- Footer ------------------------------------------------ */
.site-footer {
  background: #000;
  color: #c9ced6;
  font-size: 1rem;
  border-top: 3px solid var(--gold);
  padding-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.3fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
}
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Logos: NRCI and SETU at the same width */
.foot-brand { display: flex; flex-direction: column; gap: 1.8rem; }
.foot-brand img { width: 180px; height: auto; }

/* Small gold column headings */
.foot-heading {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.3rem;
}

/* Address */
.foot-addr-row { display: flex; gap: .8rem; align-items: flex-start; }
.foot-icon { width: 22px; height: 22px; flex: none; color: var(--gold-light); margin-top: .15rem; }
.foot-address address { font-style: normal; line-height: 1.75; }
.foot-address strong { color: #fff; font-weight: 500; }
.foot-directions { margin-top: 1.2rem; margin-left: calc(22px + .8rem); }

/* Links with arrow icons */
.foot-links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: .85rem 3rem;
}
.foot-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #c9ced6;
  text-decoration: none;
  transition: color .2s;
}
.foot-arrow {
  width: 15px; height: 15px;
  flex: none;
  color: var(--gold);
  transition: transform .2s, color .2s;
}
.foot-link:hover { color: #fff; }
.foot-link:hover .foot-arrow { transform: translateX(4px); color: var(--gold-light); }

/* Bottom bar */
.foot-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 1.3rem 0;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}
.foot-legal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.foot-legal p { margin: 0; }
.foot-top { color: rgba(255,255,255,.7); text-decoration: none; }
.foot-top:hover { color: var(--gold-light); }

/* ---- Scroll-reveal ----------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Theme cards: reserve two lines for the title so all three titles
   start at the same height side by side (desktop only; on phones the
   cards stack and each title takes the space it needs). */
@media (min-width: 901px) {
  .project-tile.theme-tile-fused .project-tile-body h3 { line-height: 1.2; min-height: 2.4em; }
}

/* Project cards: reserve two lines for the full name so the acronyms
   line up across a row (not on phones, where cards stack). */
@media (min-width: 600px) {
  .project-tiles .project-fullname { min-height: 2.9em; }
}
@media (min-width: 600px) {
  .project-tiles--long-names .project-fullname { min-height: 4.35em; }
}

/* Placeholder values in the project details box and project text */
.project-meta dd.meta-tbc { color: var(--muted, #777); font-style: italic; }
.project-content p > em:only-child { color: var(--muted, #777); }

/* Funder page (e.g. The Howard Foundation) */
.funder-head { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.funder-logo { width: 240px; height: auto; }
.funder-content { max-width: 52rem; margin-top: 1.5rem; }
.funder-content p { font-size: 1.15rem; line-height: 1.75; }
.funder-content h2 { margin-top: 2.2rem; }
.funder-website { margin-top: 1.8rem; }
.funder-projects-title { margin: 3rem 0 1.4rem; padding-top: 2rem; border-top: 1px solid #e8e6e1; }
@media (max-width: 600px) { .funder-logo { width: 180px; } }

/* Footer: The Howard Foundation logo below SETU (about 5% larger than its previous 70px height) */
.foot-brand .foot-hf img { width: auto; height: 89px; }

/* Homepage acknowledgement band: The Howard Foundation */
.hf-band { padding: 0 0 4.5rem; background: var(--paper); }
.hf-band-inner {
  display: flex; align-items: center; justify-content: center; gap: 2.2rem;
  max-width: 900px; margin: 0 auto; padding: 1.6rem 2rem;
  border-top: 1px solid #ddd8cc; border-bottom: 1px solid #ddd8cc;
  color: inherit; text-decoration: none;
}
.hf-band-inner img { width: 144px; height: auto; flex: none; }
.hf-band-text { display: flex; flex-direction: column; gap: .35rem; }
.hf-band-kicker { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8f6a1f; }
.hf-band-line { font-size: 1.15rem; line-height: 1.5; color: #2a2a2a; }
.hf-band-more { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; color: #8f6a1f; }
.hf-band-more svg { width: 16px; height: 16px; transition: transform .25s; }
.hf-band-inner:hover .hf-band-more svg { transform: translateX(4px); }
@media (max-width: 600px) {
  .hf-band-inner { flex-direction: column; text-align: center; gap: 1.2rem; }
  .hf-band-more { justify-content: center; }
}

/* Menu items whose label is itself a link (e.g. About -> Overview), with a separate arrow for the submenu */
.main-nav .has-sub .sub-link { display: inline-block; }
.has-sub.open .sub-link { color: var(--gold-light); }
.sub-toggle--arrow { margin-left: .35rem; padding: .2rem; vertical-align: middle; }
@media (hover: hover) and (min-width: 861px) {
  .has-sub:hover .sub-link, .has-sub:hover .sub-toggle--arrow { color: var(--gold-light); }
}

/* Publications: short note under the title on how the list is ordered */
.pub-order-note { margin: -.4rem 0 1.6rem; color: var(--text-light); font-size: 1.05rem; font-style: italic; }

/* ---- Publications: project labels and filter bar ----------- */
:root {
  --theme-eye: #3d5a73;        /* Eye Health (blue-slate, as on its theme card) */
  --theme-brain: #8a3f35;      /* Brain & Cardiometabolic Health (burgundy) */
  --theme-nutrition: #4f6b3f;  /* Nutritional Science (green) */
}
.pub-projects { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.pub-project {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  color: #fff; text-decoration: none;
  padding: .28rem .7rem; border-radius: 999px;
  background: #777; transition: filter .2s, transform .2s;
}
.pub-project:hover { filter: brightness(1.15); transform: translateY(-1px); }
.pub-project-hint { font-weight: 400; opacity: .85; }
.pub-project--eye-health { background: var(--theme-eye); }
.pub-project--brain-cardiometabolic-health { background: var(--theme-brain); }
.pub-project--nutritional-science { background: var(--theme-nutrition); }

.pub-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem;
  margin: .4rem 0 1.4rem; padding: 1rem 1.2rem;
  background: var(--paper); border-radius: var(--radius);
  max-width: 980px;
}
.pub-filter-themes { display: flex; flex-wrap: wrap; gap: .5rem; }
.pub-filter-btn {
  font: inherit; font-size: .92rem; cursor: pointer;
  padding: .4rem .9rem; border-radius: 999px;
  border: 1.5px solid #cfc9bd; background: #fff; color: #333;
  transition: background .2s, color .2s, border-color .2s;
}
.pub-filter-btn:hover { border-color: #999; }
.pub-filter-btn.is-active { background: #333; border-color: #333; color: #fff; }
.pub-filter-btn--eye-health.is-active { background: var(--theme-eye); border-color: var(--theme-eye); }
.pub-filter-btn--brain-cardiometabolic-health.is-active { background: var(--theme-brain); border-color: var(--theme-brain); }
.pub-filter-btn--nutritional-science.is-active { background: var(--theme-nutrition); border-color: var(--theme-nutrition); }
.pub-filter-project { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; color: #555; }
.pub-filter-project select {
  font: inherit; font-size: .92rem; padding: .38rem .6rem;
  border: 1.5px solid #cfc9bd; border-radius: 6px; background: #fff;
}
.pub-filter-count { flex-basis: 100%; margin: 0; font-size: .88rem; color: #8a8a8a; }
.pub[hidden] { display: none; }

/* About page: history timeline */
.history { list-style: none; margin: 1.6rem 0 2.4rem; padding: 0; border-left: 2px solid #e2dccf; }
.history li { position: relative; display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 0 0 1.3rem 1.4rem; }
.history li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #fff; }
.history-year { font-family: 'Titillium Web', 'Rubik', sans-serif; font-weight: 600; font-size: 1.15rem; color: #8f6a1f; line-height: 1.5; }
.history li p { margin: 0; line-height: 1.6; }
@media (max-width: 560px) { .history li { grid-template-columns: 1fr; gap: .2rem; } }
.bio-dialog .affil:empty { display: none; }

/* ---- Plainer design (Nov 2026): no zoom, no decorative arrows, sentence-case labels ---- */
.card-more svg, .project-more svg, .hf-band-more svg { display: none; }
.partner-visit { display: none; }
.hero .eyebrow, .stat .num, .partners-cat, .theme-count, .project-meta dt,
.project-content h2, .lab-focus, .instrument-use span, .foot-heading,
.hf-band-kicker, .section-head .kicker, .people-sub {
  text-transform: none;
  letter-spacing: normal;
}
.stat .num, .theme-count, .foot-heading, .hf-band-kicker, .section-head .kicker { font-size: .95rem; }
.project-meta dt, .instrument-use span { font-size: .85rem; }
.lab-focus { font-size: .95rem; }
.project-years-tile, .project-dates { letter-spacing: normal; }

/* Headings in navy (Nov 2026) */
.project-content h2, .project-meta dt, .project-dates, .partners-cat, .history-year, .hf-band-kicker, .people-sub { color: var(--navy); }

/* Vision Lab: full-width intro, then one photo row per instrument */
.lab-text--full { grid-column: 1 / -1; }
.lab-text--full .lab-intro { max-width: none; }
.showcase-text h3 { font-size: 1.6rem; font-weight: 500; margin: 0; }
.showcase-text .instrument-model { font-size: 1rem; margin-top: .25rem; }
.showcase-desc { font-size: 1.08rem; line-height: 1.7; color: var(--text-light); margin: .9rem 0 0; }
.lab--showcase { row-gap: 2.4rem; }

/* News items with a thumbnail, and the image on an article page */
.news-item { display: flex; gap: 1.4rem; align-items: flex-start; }
.news-thumb { flex: 0 0 220px; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; line-height: 0; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-body { flex: 1; min-width: 0; }
.news-item time { text-transform: none; letter-spacing: normal; font-size: .85rem; }
@media (max-width: 640px) {
  .news-item { flex-direction: column; gap: .8rem; }
  .news-thumb { flex-basis: auto; width: 100%; }
}
article header time { display: block; font-size: .9rem; color: var(--text-light); margin-bottom: .4rem; }
.article-image { margin: 1.4rem 0 1.8rem; border-radius: var(--radius); overflow: hidden; line-height: 0; }
.article-image img { width: 100%; height: auto; }
.placeholder { color: #9a958c; font-style: italic; }

/* News listing: wider column so the photo can match the text height */
.page-news { max-width: 1040px; }
.page-news .news-thumb { flex-basis: 310px; }
.page-news .news-item h3 { font-size: 1.5rem; }
.page-news .news-item p { font-size: 1rem; line-height: 1.6; }

/* Home page news */
.section-head .kicker--news { font-size: clamp(1.9rem, 3.5vw, 3rem); }
.news-list--home .news-thumb { flex-basis: 264px; }
.news-list--home .news-body { max-width: 720px; }
.news-list--home .news-item h3 { font-size: 1.4rem; }
.news-list--home .news-item p { font-size: 1rem; line-height: 1.6; }

/* Home page: lead news item as a wide feature card */
.news-feature {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  background: var(--paper); border-radius: 10px; overflow: hidden;
  text-decoration: none; color: inherit; margin-bottom: 1.5rem;
}
.news-feature-img { line-height: 0; aspect-ratio: 16 / 10; }
.news-feature-img img { width: 100%; height: 100%; object-fit: cover; }
.news-feature-body { padding: 2.4rem 2.6rem; display: flex; flex-direction: column; justify-content: center; }
.news-feature-body time { font-size: .9rem; color: var(--text-light); }
.news-feature-body h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; color: var(--navy); margin: .4rem 0 .9rem; }
.news-feature-body p { font-size: 1.05rem; line-height: 1.65; color: var(--text-light); margin: 0; }
.news-feature-more { margin-top: 1.4rem; font-weight: 500; color: var(--navy); border-bottom: 1px solid currentColor; align-self: flex-start; }
.news-feature:hover h3, .news-feature:hover .news-feature-more { color: var(--gold); }
@media (max-width: 860px) {
  .news-feature { grid-template-columns: 1fr; }
  .news-feature-body { padding: 1.6rem 1.4rem 1.8rem; }
}
.news-feature-img { position: relative; aspect-ratio: auto; min-height: 340px; }
.news-feature-img img { position: absolute; inset: 0; }
@media (max-width: 860px) { .news-feature-img { min-height: 0; aspect-ratio: 16 / 10; } }
/* Feature card at the scale of the research tiles: photo one tile wide (wide screens only) */
@media (min-width: 861px) {
  .news-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .news-feature-img { min-height: 260px; }
  .news-feature-body { padding: 1.8rem 2.4rem; }
}
.news-feature-body h3 { font-size: clamp(1.3rem, 1.9vw, 1.6rem); margin: .3rem 0 .7rem; }
.news-feature-body p { font-size: 1rem; max-width: 640px; }
.news-feature-more { margin-top: 1rem; }

/* Research theme button before the project button: outlined in the theme colour */
.pub-theme {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  padding: calc(.28rem - 1.5px) calc(.7rem - 1.5px); border-radius: 999px; text-decoration: none;
  background: #fff; border: 1.5px solid currentColor;
  transition: background .15s, color .15s;
}
.pub-theme--eye-health { color: var(--theme-eye); }
.pub-theme--brain-cardiometabolic-health { color: var(--theme-brain); }
.pub-theme--nutritional-science { color: var(--theme-nutrition); }
.pub-theme:hover { transform: translateY(-1px); }

/* Introductory photo of the team at work, under a lab's title */
.lab-hero { margin: 1.2rem 0 1.4rem; border-radius: var(--radius); overflow: hidden; line-height: 0; }
.lab-hero img { width: 100%; height: auto; }

/* Alumni list */
.alumni { list-style: none; padding: 0; margin: 2rem 0 0; }
.alumni li { display: grid; grid-template-columns: 5rem 1fr; gap: 1.2rem; padding: 1.1rem 0; border-top: 1px solid #e4e0d6; }
.alumni li:last-child { border-bottom: 1px solid #e4e0d6; }
.alumni-year { font-weight: 600; color: var(--navy); font-size: 1.05rem; }
.alumni-name { font-weight: 600; font-size: 1.05rem; margin-right: .6rem; }
.alumni-degree { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--navy); border: 1.5px solid var(--navy); border-radius: 999px; padding: .05rem .55rem; vertical-align: .1em; }
.alumni-title { margin: .35rem 0 0; color: var(--text-light); line-height: 1.55; }
@media (max-width: 560px) { .alumni li { grid-template-columns: 3.4rem 1fr; gap: .8rem; } }
.alumni-inst { display: block; font-size: .88rem; color: var(--text-light); margin-top: .2rem; }
/* People page: Alumni section at the end */
.alumni-cta { margin-top: 3.5rem; padding-top: 2.4rem; border-top: 2px solid #dcb560; }
.alumni-cta h2 { color: var(--navy); font-size: 2rem; margin: 0 0 .7rem; }
.alumni-cta p { max-width: 720px; color: var(--text-light); line-height: 1.65; margin: 0 0 1.3rem; }
.alumni-cta-btn { display: inline-block; background: #f3d27e; color: var(--text); text-decoration: none; font-weight: 500; padding: .7rem 1.2rem; border-radius: 10px; transition: background .2s, color .2s; }
.alumni-cta-btn:hover { background: var(--gold); color: #fff; }
