/* ==========================================================================
   The Stroud Lab — design system
   ========================================================================== */

:root {
  --ink:           #22211d;
  --ink-soft:      #5f5d55;
  --ink-faint:     #8b887e;
  --bg:            #fffdf8;
  --bg-alt:        #f2eee1;
  --rule:          #e3dfd2;
  --navy:          #60936b;
  --navy-lt:       #b6d2ba;
  --navy-soft:     #225e33;
  --green:         #3dc267;
  --gold:          #b1a066;
  --accent:        #cf6a1a;
  --accent-dk:     #a9520d;
  --accent-lt:     #e8944a;
  --on-navy:       #ffffff;
  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 42rem;
  --wide:    68rem;
  --hero:    76rem;
  --gutter:  1.75rem;
}

/* Reset-ish ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; border-bottom: 1px solid rgba(96,147,107,.32); transition: border-color .15s, color .15s; }
a:hover { color: var(--accent-dk); border-bottom-color: var(--accent); }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.14;
  margin: 0 0 .6em;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; letter-spacing: 0; }
p  { margin: 0 0 1.35em; }
strong { font-weight: 700; }
em { font-style: italic; }
blockquote {
  margin: 2.5rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--navy);
}
blockquote p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3.5rem 0; }
ul, ol { margin: 0 0 1.35em; padding-left: 1.3em; }
li { margin-bottom: .5em; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; background: var(--bg-alt); padding: .12em .38em; border-radius: 3px; }

.eyebrow {
  font-family: var(--display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}
.eyebrow a { color: inherit; }

/* ==========================================================================
   Layout containers
   ========================================================================== */
.wrap      { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-text { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-hero { max-width: var(--hero); margin: 0 auto; padding: 1.5rem 3.5rem; }
.wrap-text--intro { max-width: 50rem; }
.wrap-text--intro .lead { max-width: none; margin-left: 0; margin-right: 0; }

.section        { padding: 2.5rem 0; }
.section--roomy { padding: 7rem 0; }
.section--tight { padding: 1rem 0; }
.section--band  { background: var(--bg-alt); }

.section--dark {
  background: var(--navy);
  color: rgba(255,255,255,.92);
  max-width: var(--hero);
  margin-left: auto;
  margin-right: auto;
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--on-navy); }
.section--dark .eyebrow { color: rgba(255,255,255,.6); }
.section--dark .lead { color: rgba(255,255,255,.85); }
.section--dark em { color: inherit; }
.section--dark a { color: var(--on-navy); border-bottom-color: rgba(255,255,255,.45); }
.section--dark a:hover { color: var(--accent-lt); border-bottom-color: var(--accent-lt); }
.section--dark .btn { border-color: rgba(255,255,255,.6); color: var(--on-navy); }
.section--dark .btn:hover { background: var(--on-navy); color: var(--navy); border-color: var(--on-navy); }

.center { text-align: center; }
.lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ==========================================================================
   Masthead
   ========================================================================== */
.masthead {
  padding: 1.6rem 0 1.4rem;
  text-align: center;
}
.masthead:empty { padding: 0; }
.masthead__logo { display: inline-block; border: 0; }
.masthead__logo img { width: 480px; max-width: 84vw; margin: 0 auto; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  background: var(--navy-lt);
  width: 100%;
}

/* This single container centers everything and constrains to hero width */
.navbar__inner {
  max-width: var(--hero);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* White links row. Research, People and Outreach carry a dropdown: the label
   links to the section's first page, and the caret button beside it opens
   the menu for keyboard and touch users. Mouse users also get it on hover. */
.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: .55rem 0;
}
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link,
.nav__menu {
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-navy);
  border: 0;
  padding: .35rem 0;
  display: inline-block;
  opacity: .88;
}
.nav__menu { display: none; }
/* Tablet widths: tighten slightly so the six items stay on one line. */
@media (max-width: 62rem) {
  .nav__list { gap: .1rem 1rem; }
  .nav__link { font-size: .85rem; letter-spacing: .07em; }
}
.nav__link:hover { color: var(--on-navy); opacity: 1; border-bottom: 1px solid rgba(255,255,255,.55); }
.nav__item--sub:hover > .nav__link,
.nav__item.is-open > .nav__link { opacity: 1; }
.nav__item.is-active > .nav__link { opacity: 1; border-bottom: 2px solid var(--accent-lt); }

.nav__toggle {
  appearance: none;
  background: none;
  border: 0;
  margin: 0 0 0 .3rem;
  padding: .45rem .25rem;
  color: var(--on-navy);
  opacity: .88;
  cursor: pointer;
  line-height: 0;
  -webkit-tap-highlight-color: rgba(255,255,255,.2);
}
.nav__toggle:hover { opacity: 1; }
.nav__toggle::before {
  content: "";
  display: block;
  width: .42rem;
  height: .42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform .15s ease;
}
.nav__item.is-open > .nav__toggle::before { transform: translateY(25%) rotate(-135deg); }

.navbar a:focus-visible,
.navbar button:focus-visible {
  outline: 2px solid var(--navy-soft);
  outline-offset: 2px;
  border-radius: 2px;
}

.nav__sub {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  z-index: 50;
  min-width: 14rem;
  margin: 0;
  padding: .45rem 0;
  list-style: none;
  background: var(--bg);
  border-top: 2px solid var(--accent-lt);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 24px rgba(34, 33, 29, .14);
}
.nav__item.is-open > .nav__sub { display: block; }
@media (hover: hover) and (min-width: 46.0625rem) {
  .nav__item--sub:hover > .nav__sub { display: block; }
}
/* Without JavaScript the caret buttons do nothing, so let focus open the menu. */
html:not(.js) .nav__item--sub:focus-within > .nav__sub { display: block; }
.nav__sub a {
  display: block;
  padding: .4rem 1rem;
  font-family: var(--display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--navy-soft);
  border: 0;
}
.nav__sub a:hover { background: var(--bg-alt); color: var(--accent-dk); }
.nav__sub a[aria-current="page"] { color: var(--accent-dk); box-shadow: inset 3px 0 0 var(--accent-lt); }
.nav__ext { margin-left: .3em; font-size: .9em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { margin-top: 2rem; }
.hero__img {
  display: block;
  width: 100%;
  max-width: var(--hero);
  margin: 0 auto;
  aspect-ratio: 2400 / 500;
  object-fit: cover;
}
.hero__img--short { aspect-ratio: auto; height: auto; object-fit: fill; background: var(--bg); }
.hero__caption {
  max-width: var(--hero);
  margin: .85rem auto 0;
  padding: 0 var(--gutter);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink-faint);
  text-align: center;
}
.hero__caption a { color: inherit; border-bottom-color: var(--rule); }

.strapline {
  max-width: var(--hero);
  margin: 1.6rem auto 0;
  padding: 0 var(--gutter);
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.95rem, 1.55vw, 1.32rem);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #000000;
  line-height: 1.35;
}
.strapline span { white-space: nowrap; }
.strapline b { color: var(--gold); font-weight: 700; padding: 0 .45em; }

.page-title { text-align: center; padding: 4rem 0 0; }
.page-title h1 { margin-bottom: .25rem; }
.page-title .lead { max-width: 34rem; margin: 1rem auto 0; }

/* ==========================================================================
   Home page pieces
   ========================================================================== */
.themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.theme { text-align: center; }
.theme__num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: .02em;
  color: var(--gold);
  line-height: 1;
  display: block;
  margin-bottom: .5rem;
}
.theme h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.theme p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}
.split figure { margin: 0; }
.split figcaption, .figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-faint);
  margin-top: .6rem;
  line-height: 1.45;
}
.split--reverse > *:first-child { order: 2; }
.split--reverse > *:last-child  { order: 1; }

.labpics {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-alt);
}
.labpics__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.labpics__img:not(.is-active):not(.is-near):not(.is-prev) { display: none; }
.labpics__img.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.labpics__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 19, 15, .45);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}
.labpics:hover .labpics__nav,
.labpics__nav:focus {
  opacity: 1;
}
.labpics__nav:hover { background: rgba(20, 19, 15, .7); }
.labpics__nav--prev { left: .7rem; }
.labpics__nav--next { right: .7rem; }
@media (hover: none) {
  .labpics__nav { opacity: 1; }
}
.labpics__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
}

.photo-hover {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  border-radius: 2px;
}
.photo-hover img, .photo-hover video { transition: transform .5s ease; }
.photo-hover:hover img, .photo-hover:focus-within img,
.photo-hover:hover video, .photo-hover:focus-within video { transform: scale(1.035); }
.photo-hover video { display: block; width: 100%; height: auto; }
/* Software animations carry their own titles and cream backdrop, so they are
   scaled down (never cropped) to sit beside the other media, centred in the column. */
.photo-hover--anim video, .photo-hover--anim img {
  width: auto; height: auto; max-width: 100%; max-height: 26rem; margin: 0 auto;
}
.software__media { margin: 0; }
.software__media figcaption { text-align: center; }
.software__hint { display: block; margin-top: .15rem; color: var(--accent-dk); font-style: normal; font-weight: 600; font-size: .85rem; }
/* The hint only makes sense while the animation can be played. */
html:not(.js) .software__hint { display: none; }
@media (prefers-reduced-motion: reduce) { .software__hint { display: none; } }
.js .photo-hover video[data-plays] { cursor: pointer; }
.photo-hover__still { display: none; }
/* Without JavaScript the animation cannot be started or paused, so the still is shown. */
html:not(.js) .photo-hover video { display: none; }
html:not(.js) .photo-hover__still { display: block; }
.photo-hover__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 1.4rem;
  background: linear-gradient(to top, rgba(20,19,16,.78) 0%, rgba(20,19,16,0) 62%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.photo-hover__caption span {
  font-family: var(--serif);
  font-style: italic;
  font-size: .96rem;
  line-height: 1.45;
  color: #fff;
}
.photo-hover:hover .photo-hover__caption,
.photo-hover:focus .photo-hover__caption,
.photo-hover:focus-within .photo-hover__caption { opacity: 1; }
.photo-hover:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: none) {
  .photo-hover__caption {
    opacity: 1;
    background: linear-gradient(to top, rgba(20,19,16,.65) 0%, rgba(20,19,16,0) 72%);
  }
}

.rule-wrap { padding: 0 var(--gutter); }
.rule-wrap hr { max-width: var(--wide); margin: 0 auto; }
.rule-wrap--text hr { max-width: var(--measure); }

/* ==========================================================================
   Software / tool entries
   ========================================================================== */
.tool-entry h3 { margin-bottom: .5rem; }

/* Default: no image — text only */
.tool-entry__img {
  width: 100%;
  border-radius: 2px;
  display: block;
}

/* With image: two-column grid, image left, all text right */
.tool-entry--with-img {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.tool-entry--with-img .tool-entry__img {
  width: 100%;
  border-radius: 4px;
}

.tool-entry__body {
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 2rem;
  text-align: center;
  margin: 2.5rem 0 0;
}
.stat__n {
  font-family: var(--display);
  font-size: 2.9rem;
  color: var(--navy);
  line-height: 1;
  display: block;
}
.stat__l {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .5rem;
  display: block;
}

/* ==========================================================================
   Home page picture grid
   ========================================================================== */
.tiles {
  max-width: var(--hero);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.2rem 0.85rem;
}
.tile { display: block; border: 0; text-align: center; }
.tile img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--bg-alt);
  transition: opacity .18s;
}
.tile:hover img { opacity: .82; }
.tile__label {
  display: block;
  margin-top: .85rem;
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--navy);
}
.tile:hover .tile__label { color: var(--accent-dk); }
.tile--feature .tile__label { color: var(--accent); }
.tile--feature:hover .tile__label { color: var(--accent-dk); }

@media (max-width: 62rem) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 40rem) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 1.6rem .7rem; }
  .tile__label { font-size: .7rem; letter-spacing: .1em; }
}

/* ==========================================================================
   People
   ========================================================================== */
.people-group { margin-bottom: 4rem; }
.people-group__title {
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .7rem;
  margin-bottom: 2.5rem;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 2.75rem 2rem;
}
.person__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1.1rem;
  filter: saturate(.96);
}
.person h3 { font-size: 1.25rem; margin-bottom: .15rem; }
.person__role {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .7rem;
}
.person__bio { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .7rem; }
.person__links { font-size: .82rem; }
.person__links a { margin-right: .9rem; white-space: nowrap; }

.pi { display: grid; grid-template-columns: 15rem 1fr; gap: 3rem; align-items: start; }
.pi .person__photo { margin-bottom: 0; }

/* ==========================================================================
   Publications
   ========================================================================== */
.pub-controls {
  display: flex; flex-wrap: wrap; gap: .75rem;
  justify-content: center;
  margin: 0 0 3rem;
}
.pub-search {
  font-family: var(--sans);
  font-size: .95rem;
  padding: .6rem .9rem;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  width: min(26rem, 100%);
  border-radius: 2px;
}
.pub-search:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.year-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  color: var(--gold);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .4rem;
  margin: 3rem 0 1.75rem;
}
.pub {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  margin-bottom: 1.9rem;
  font-size: .99rem;
  line-height: 1.6;
}
.pub__n { color: var(--ink-faint); font-size: .85rem; padding-top: .2rem; font-variant-numeric: tabular-nums; }
.pub__title { color: var(--navy); font-weight: 600; text-decoration: none; }
a.pub__title:hover { text-decoration: underline; }
.pub__authors { color: var(--ink-soft); }
.pub__venue { font-style: italic; color: var(--navy-soft); }
.pub__meta { font-size: .84rem; color: var(--ink-faint); margin-top: .3rem; }
.pub__meta a { margin-right: .85rem; }
.pub__pdf {
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent);
  border-bottom-color: rgba(207,106,26,.35);
}
.pub__pdf:hover { color: var(--accent-dk); border-bottom-color: var(--accent); }
.tag {
  display: inline-block;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .12rem .45rem;
  border: 1px solid var(--rule);
  color: var(--ink-faint);
  border-radius: 2px;
  margin-left: .4rem;
  vertical-align: .1em;
}
.tag--press { color: var(--accent); border-color: rgba(207,106,26,.4); }

/* ==========================================================================
   News
   ========================================================================== */
.news-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.news-item:has(.news-item__img) {
  grid-template-columns: 14rem 1fr;
}
.news-item:first-of-type { padding-top: 0; }
.news-item__media {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.news-item__date {
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: .35rem;
}
.news-item__img {
  display: block;
  width: 100%;
  border-radius: 4px;
}
.news-item h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.news-item p { margin-bottom: .5rem; }
.news-item p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Cards
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2rem;
}
.card {
  border: 1px solid var(--rule);
  background: #fff;
  padding: 1.9rem 1.75rem;
  border-radius: 2px;
}
.card h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.card__kicker {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .9rem;
  font-weight: 700;
}
.card p { font-size: .96rem; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }
.card__thumb {
  margin-top: .9rem;
  display: flex;
  justify-content: center;
}
.card__thumb img {
  display: block;
  max-width: 100%;
  max-height: 104px;
  width: auto;
  height: auto;
  border-radius: 2px;
}

/* Research-page story cards: one row of four on wide screens, two on
   tablets, one on phones. An optional `cardPhoto` sits at the bottom. */
.cards--stories {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 62rem) { .cards--stories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .cards--stories { grid-template-columns: 1fr; } }
a.species__card.story-card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.4rem;
}
.story-card p:last-of-type { margin-bottom: 0; }
.story-card__photo { margin-top: auto; padding-top: 1.1rem; }
.story-card__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

.press-list { list-style: none; margin: 0; padding: 0; }
.press-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
  font-size: .99rem;
}
.press-list__outlet { color: var(--ink-faint); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding-top: .28rem; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .8rem 1.6rem;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  border-radius: 2px;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--accent { border-color: var(--accent); color: var(--accent); }
.btn--accent:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Figures ------------------------------------------------------------------ */
.figure-wide { margin: 3.5rem 0; }
.figure-wide img { width: 100%; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}
.gallery img { aspect-ratio: 3/4; object-fit: cover; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--rule);
  margin-top: 0;
  padding: 3.5rem 0 4rem;
  background: var(--bg-alt);
  font-size: .92rem;
  color: var(--ink-soft);
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2.5rem;
}
.footer h4 {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .9rem;
}
.footer a { color: var(--navy); }
.footer__fine {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .8rem; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 46rem) {
  body { font-size: 1rem; }
  .section { padding: 3.25rem 0; }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .pi { grid-template-columns: 1fr; gap: 1.75rem; }
  .pi .person__photo { max-width: 13rem; }
  /* The :has() rule above outranks a bare .news-item, so name it too. */
  .news-item,
  .news-item:has(.news-item__img) { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .press-list li { grid-template-columns: 1fr; gap: .25rem; }
  .pub { grid-template-columns: 1fr; gap: .25rem; }
  .pub__n { display: none; }
  .hero { margin-top: 1.25rem; }
  .hero__img { aspect-ratio: 2400 / 500; }
  .hero__img--short { aspect-ratio: auto; height: auto; }
  .navbar__inner { padding: .6rem var(--gutter) .7rem; }
  .strapline { font-size: .82rem; margin-top: 1.1rem; }
  .footer { margin-top: 0; }
  .tool-entry--with-img {
    grid-template-columns: 1fr;
  }

  .wrap-hero { padding: 1.5rem var(--gutter); }

  /* Small screens: a Menu button opens the list, and each dropdown becomes
     an indented list under its section, opened by the caret button. */
  .js .nav__menu {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: none;
    cursor: pointer;
  }
  .nav__menu-icon {
    width: 1.1rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  }
  .nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: .3rem 0 0;
  }
  .js .nav__list { display: none; }
  .js .navbar.is-open .nav__list { display: flex; }
  .nav__item {
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,.35);
  }
  .nav__link { font-size: .85rem; letter-spacing: .06em; padding: .55rem 0; }
  .nav__toggle { padding: .75rem .6rem; }
  .nav__sub,
  html:not(.js) .nav__item--sub:focus-within > .nav__sub {
    position: static;
    flex-basis: 100%;
    min-width: 0;
    padding: 0 0 .55rem 1rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  html:not(.js) .nav__sub { display: block; }
  .nav__sub a {
    padding: .35rem 0;
    font-size: .78rem;
    letter-spacing: .06em;
    white-space: normal;
    color: var(--on-navy);
  }
  .nav__sub a:hover { background: none; color: var(--on-navy); text-decoration: underline; }
  .nav__sub a[aria-current="page"] { color: var(--on-navy); box-shadow: inset 3px 0 0 var(--accent-lt); padding-left: .6rem; }

  /* Tap targets: every control in the open menu is at least 44px tall. */
  .js .nav__menu { min-height: 2.75rem; padding: 0 .75rem 0 0; }
  .navbar__inner { padding-top: 0; padding-bottom: .1rem; }
  .nav__link { display: flex; align-items: center; min-height: 2.75rem; padding: .3rem 0; }
  .nav__toggle { min-width: 2.75rem; min-height: 2.75rem; padding: 0; display: grid; place-items: center; margin: 0 -.6rem 0 0; }
  .nav__sub a { display: flex; align-items: center; min-height: 2.75rem; padding: .2rem 0; }

  /* Links set in a row (person pages, footer, publication meta) get room to tap. */
  .person__links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: .9rem; }
  .person__links a { margin-right: 0; padding: .55rem 0; min-width: 2.75rem; }
  .footer p a { display: inline-block; min-width: 2.75rem; padding: .75rem 0; line-height: 1.25; }
  .pub__meta { margin: -.4rem 0 -.7rem; } /* keeps the visual rhythm despite taller links */
  .pub__meta a { display: inline-block; min-width: 2.75rem; padding: .7rem 0; margin-right: .5rem; }
  .pub-search { font-size: 1rem; padding: .7rem .9rem; }
  .paper__cite summary { padding: .6rem 0; }
  /* Padding would push the border-bottom underline away from the text, so
     these padded links draw the same underline with text-decoration. */
  .person__links a, .footer p a, .pub__meta a {
    border-bottom: 0;
    text-decoration: underline 1px rgba(96,147,107,.32);
    text-underline-offset: .3em;
  }
  .pub__meta a.pub__pdf { text-decoration-color: rgba(207,106,26,.35); }
  .person__links a:hover, .footer p a:hover, .pub__meta a:hover { text-decoration-color: var(--accent); }
}

/* Phones: layout polish. Everything here sits below the 46rem breakpoint,
   so tablet and desktop layouts are untouched. */
@media (max-width: 46rem) {
  .masthead { padding: 1.1rem 0 1rem; }
  h1 { font-size: clamp(1.75rem, 1rem + 4vw, 2.1rem); }
  .page-title { padding-top: 3rem; }

  /* Photo heroes show the whole frame instead of a thin strip. The home
     banner has words in the image, so it keeps its shape. */
  .hero__img:not(.hero__img--short):not(.hero__img--banner) { aspect-ratio: 16 / 5; }

  /* The strapline stacks one phrase per line, without dangling bullets. */
  .strapline span { display: block; }
  .strapline b { display: none; }

  /* Browsers indent bare figures by 40px each side; use the full column. */
  main figure { margin-left: 0; margin-right: 0; }

  /* Headshots match the PI photo instead of filling the screen. */
  .person__photo { max-width: 13rem; }

  .card,
  a.species__card.story-card { padding: 1.4rem 1.25rem; }

  .labpics__nav { width: 2.75rem; height: 2.75rem; }
  .lightbox { padding: 3.5rem .75rem 1.5rem; }
  .lightbox__close { width: 2.75rem; height: 2.75rem; top: .6rem; right: .6rem; }
}

/* Phones and tablets: balance heading lines so none ends on a lone word. */
@media (max-width: 64rem) {
  h1, h2, h3 { text-wrap: balance; }
}

/* Touch tablets keep the one-line menu, with taller tap targets. */
@media (pointer: coarse) and (min-width: 46.0625rem) {
  .nav__list { padding: .2rem 0; }
  .nav__link { padding: .7rem 0; }
  .nav__toggle { padding: .95rem .5rem; }
}

@media print {
  .navbar, .hero, .footer { display: none; }
  .photo-hover video { display: none; }
  .photo-hover__still { display: block; }
}

/* Visitors who ask for reduced motion get no smooth scrolling, fades or zooms. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo-hover video { display: none; }
  .photo-hover__still { display: block; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Lightbox ------------------------------------------------------------ */
.lightbox-trigger { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: rgba(20, 19, 15, .92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.5);
}
.lightbox__close {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,.22); }

@media print {
  .lightbox { display: none; }
}

/* ==========================================================================
   Paper pages (/publications/<slug>/)
   ========================================================================== */
.paper__title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.2; }
.paper__authors { margin-bottom: .3rem; }
.paper__venue { color: var(--ink-soft); }
.paper__links { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 2rem; }
.paper__h2 { font-size: 1.35rem; margin-top: 1rem; }
.paper__abstract p { margin-bottom: 1rem; }
.paper__cite { margin: 2rem 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
.paper__cite summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.paper__citation { margin-top: 1rem; font-size: .95rem; }
.paper__bibtex {
  background: var(--bg-alt); padding: 1rem; border-radius: 4px; font-size: .8rem;
  line-height: 1.5; overflow-x: auto; white-space: pre;
}
.paper__back { margin-top: 2.5rem; }

/* ==========================================================================
   Species and story pages
   ========================================================================== */
.species__sci { font-weight: 400; font-size: .6em; color: var(--ink-soft); white-space: nowrap; }
.species__top { align-items: start; }
.species__nophoto {
  aspect-ratio: 4 / 3; background: var(--bg-alt); border-radius: 4px;
  display: grid; place-items: center; color: var(--ink-faint); font-family: var(--serif); font-size: 1.6rem;
}
.species__facts h2 { font-size: 1.3rem; }
.species__facts dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.species__facts dt { font-weight: 700; color: var(--navy-soft); font-size: .9rem; padding-top: .1rem; }
.species__facts dd { margin: 0; }
@media (max-width: 34rem) { .species__facts dl { grid-template-columns: 1fr; } .species__facts dd { margin-bottom: .5rem; } }
.species__body h2, .story__body h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.species__id li, .species__papers li { margin-bottom: .45rem; }
.species__source { margin-top: 2rem; font-size: .92rem; color: var(--ink-soft); }
a.species__card { border-bottom: 0; color: inherit; display: block; }
a.species__card:hover h3 { color: var(--accent-dk); }
.story__body blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--ink-soft); }

/* 3D view at the top of a research story (viewer3d in the story's front matter) */
.viewer3d { margin: 0 0 1.5rem; }
.viewer3d__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #1b2420;
  isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black);
  box-shadow: 0 1px 2px rgba(34,33,29,.06), 0 10px 30px rgba(34,33,29,.12), 0 30px 70px rgba(34,33,29,.10);
}
.viewer3d__frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.viewer3d__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.viewer3d figcaption { max-width: var(--measure); margin: 1.1rem auto 0; text-align: center; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 40rem) { .viewer3d__frame { border-radius: 16px; } }

/* Media contact box and coverage list on research stories */
.media-contact {
  border: 1px solid var(--rule); border-left: 4px solid var(--accent);
  background: var(--bg-alt); border-radius: 4px; padding: 1.1rem 1.4rem;
}
.media-contact h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.media-contact p { margin: 0 0 .6rem; }
.media-contact p:last-child { margin-bottom: 0; }
.media-contact__how .btn { text-transform: none; letter-spacing: 0; }
.media-contact__topics, .media-contact__more { font-size: .95rem; color: var(--ink-soft); }
.media-list { list-style: none; padding: 0; margin: 0; }
.media-list li { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.media-list__outlet {
  display: block; font-family: var(--display); font-weight: 700; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--navy-soft);
}
.media-list__meta { display: block; font-size: .85rem; color: var(--ink-faint); }
.media-contact__office { font-size: .95rem; border-top: 1px solid var(--rule); padding-top: .7rem; margin-top: .2rem; }
.media-contact__label {
  display: block; font-family: var(--display); font-weight: 700; font-size: .75rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--navy-soft);
}
