/* de Medeiros Lab — site styles
   Colors follow the Field Museum brand guide: black and white carry the
   design, Field Blue marks links and the current page, Field Grey sits
   behind specimen photography. */

@font-face {
  font-family: "Schibsted";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("../fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: "Schibsted";
  src: url("../fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
}

:root {
  --white: #ffffff;
  --black: #000000;
  --text-2: #444444;
  --muted: #6e6e6e;
  --line: #d9d9d9;
  --well: #ebebeb;          /* Field Grey tint */
  --specimen: #8b8b8b;      /* grey behind the specimen plates */
  --blue: #0a46e6;          /* Field Blue */

  --sans: "Schibsted", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Times New Roman", Times, serif;

  --fs-small: 0.875rem;  /* 14 */
  --fs-body: 1.0625rem;  /* 17 */
  --fs-read: 1.25rem;    /* 20, long-form serif */
  --fs-lead: 1.375rem;   /* 22 */
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.75rem, 1.3rem + 1.5vw, 2.375rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  --fs-hero: clamp(2.4rem, 1.2rem + 4.6vw, 4.6rem);

  --wrap: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.018em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
i, em { font-style: italic; }

a { color: var(--blue); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: .5rem 1rem; z-index: 100; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--white); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 72px; }
.wordmark { color: var(--black); text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; padding: .75rem 0; }
.wordmark:hover { text-decoration: none; }
.wordmark b { font-size: 1.125rem; font-weight: 750; letter-spacing: -0.02em; }
.wordmark span { font-size: var(--fs-small); color: var(--muted); }
.wordmark span span { white-space: nowrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.site-nav a { color: var(--black); text-decoration: none; font-size: 0.975rem; font-weight: 500; padding: 1.55rem 0 1.4rem; border-bottom: 3px solid transparent; white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1180px) { .site-head .wrap { gap: 1.25rem; } .site-nav ul { gap: 1.05rem; } }
.site-nav a:hover { border-bottom-color: var(--black); }
.site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.nav-toggle { display: none; background: none; border: 1px solid var(--black); font: inherit; font-size: var(--fs-small); font-weight: 600; padding: .45rem .8rem; cursor: pointer; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--white); border-bottom: 1px solid var(--line); z-index: 20; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .site-nav a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .site-head { position: relative; }
}

/* ---------- page furniture ---------- */
main { display: block; }
.page-head { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-head p { max-width: 60ch; margin-top: 1.25rem; font-size: var(--fs-lead); line-height: 1.45; color: var(--text-2); }
.block { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.block + .block { padding-top: 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.block-head a { font-weight: 550; white-space: nowrap; }
.band { background: var(--well); }
.band + .block, .block + .band { padding-top: clamp(2.5rem, 6vw, 5rem); }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }
.meta { font-size: var(--fs-small); color: var(--muted); }
.reading { font-family: var(--serif); font-size: var(--fs-read); line-height: 1.6; max-width: var(--measure); }
.reading p { margin-bottom: 1.1em; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--text-2); }
figure { margin: 0; }
figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: .6rem; max-width: 70ch; line-height: 1.45; }
.photo img { width: 100%; height: auto; background: var(--well); }
.reading .photo { margin: 1.5rem 0 2rem; }
.theme .gallery { margin-top: 2rem; }
.gallery.rotating img { transition: opacity .7s ease; }
.gallery.rotating img.fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .gallery.rotating img { transition: none; } }
.well { background: var(--well); }
.textlink { font-weight: 550; }

/* ---------- home ---------- */
.hero { padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem); }
.hero h1 { font-size: var(--fs-hero); font-weight: 680; letter-spacing: -0.035em; line-height: 1.0; }
.hero h1 span { display: block; }
.hero-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; margin-top: clamp(1.75rem, 3vw, 2.75rem); align-items: end; }
.hero-text p { font-size: var(--fs-lead); line-height: 1.45; color: var(--text-2); max-width: 46ch; }
.hero-text .where { font-size: var(--fs-small); color: var(--muted); justify-self: end; text-align: right; }
@media (max-width: 760px) { .hero-text { grid-template-columns: 1fr; } .hero-text .where { justify-self: start; text-align: left; } }

.drawer { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; background: var(--white); }
.drawer img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--specimen); }
@media (max-width: 760px) { .drawer { grid-template-columns: repeat(3, 1fr); } .drawer img:nth-child(n+7) { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .drawer.reveal img { animation: tray .5s cubic-bezier(.2,.7,.2,1) both; }
  .drawer.reveal img:nth-child(6n+1) { animation-delay: 0ms; }
  .drawer.reveal img:nth-child(6n+2) { animation-delay: 60ms; }
  .drawer.reveal img:nth-child(6n+3) { animation-delay: 120ms; }
  .drawer.reveal img:nth-child(6n+4) { animation-delay: 180ms; }
  .drawer.reveal img:nth-child(6n+5) { animation-delay: 240ms; }
  .drawer.reveal img:nth-child(6n+6) { animation-delay: 300ms; }
  @keyframes tray { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.75rem; }
.topic a.img { display: block; }
.topic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--well); }
.topic h3 { margin: 1rem 0 .5rem; font-size: 1.25rem; line-height: 1.2; }
.topic h3 a { color: var(--black); text-decoration: none; }
.topic h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.topic p { color: var(--text-2); font-size: .975rem; line-height: 1.5; }
@media (max-width: 1080px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .topics { grid-template-columns: 1fr; } }

.newsgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.75rem; }
.newsgrid a { color: var(--black); text-decoration: none; display: block; }
.newsgrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--well); margin-bottom: .85rem; }
.newsgrid .meta { margin-bottom: .3rem; }
.newsgrid h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.newsgrid a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
@media (max-width: 960px) { .newsgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .newsgrid { grid-template-columns: 1fr; } }

.lab-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
.lab-split .lead { margin-bottom: 1.25rem; }
.faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem .75rem; }
.faces a { color: var(--black); text-decoration: none; font-size: var(--fs-small); line-height: 1.3; }
.faces img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--well); margin-bottom: .4rem; }
.faces a:hover span { text-decoration: underline; }
@media (max-width: 960px) { .lab-split { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .faces { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- research ---------- */
.toc { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-weight: 550; }
.theme { padding: clamp(3rem, 7vw, 5.5rem) 0 0; scroll-margin-top: 1rem; }
.theme-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 3.5rem; }
.theme h2 { margin-bottom: 1rem; }
.theme .lead { margin-bottom: 1.25rem; }
.theme figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--well); }
.theme-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 3.5rem; margin-top: 2.75rem; padding-bottom: clamp(3rem, 7vw, 5.5rem); border-bottom: 1px solid var(--line); }
.theme:last-of-type .theme-body { border-bottom: 0; }
.theme-body h3 { font-size: 1rem; font-weight: 650; margin-bottom: .9rem; letter-spacing: 0; }
.who { font-size: var(--fs-small); color: var(--muted); margin-bottom: .4rem; }
.who a { color: inherit; }
.paperlist { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.paperlist li { padding: .8rem 0; border-top: 1px solid var(--line); font-size: .95rem; line-height: 1.45; }
.paperlist li:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .theme-grid, .theme-body { grid-template-columns: 1fr; } }

/* ---------- people ---------- */
.pi { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem 3.5rem; align-items: start; }
.pi img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--well); }
.pi h2 { margin-bottom: .35rem; }
.pi .role { color: var(--text-2); margin-bottom: 1.5rem; }
.members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 2.5rem; }
.member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--well); margin-bottom: 1rem; }
.member h3 { font-size: 1.3rem; }
.member .role { color: var(--text-2); font-size: .975rem; margin: .25rem 0 .8rem; }
.member .bio { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.55; }
.links { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin-top: .9rem; font-size: var(--fs-small); font-weight: 550; }
.volunteers { margin-top: 4.5rem; }
.volunteers h3 { font-size: 1.3rem; margin-bottom: 1.25rem; }
.volunteers ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
.volunteers li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1.1rem 0 1.3rem; border-top: 1px solid var(--line); }
.volunteers .mono { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; background: var(--well); font-weight: 600; font-size: 1rem; letter-spacing: .02em; }
.volunteers b { display: block; font-size: 1.1rem; font-weight: 600; }
.volunteers p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; margin: .3rem 0 0; }
.volunteers .links { margin-top: .5rem; }
.alumni { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 3.5rem; }
.alumni ul { list-style: none; padding: 0; margin: 0; }
.alumni li { padding: .7rem 0; border-top: 1px solid var(--line); }
.alumni li b { font-weight: 600; }
.alumni li span { display: block; color: var(--text-2); font-size: .95rem; }
.alumni h3 { font-size: 1rem; margin-bottom: .8rem; letter-spacing: 0; }
@media (max-width: 960px) { .members, .volunteers ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .members, .pi, .alumni, .volunteers ul { grid-template-columns: 1fr; } .pi img { max-width: 320px; } }

/* ---------- publications ---------- */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding: 1rem 0 1.5rem; border-bottom: 1px solid var(--black); position: sticky; top: 0; background: var(--white); z-index: 5; }
.search { font: inherit; font-size: 1rem; padding: .55rem .8rem; border: 1px solid var(--black); border-radius: 0; min-width: min(320px, 100%); background: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: inherit; font-size: .925rem; font-weight: 500; background: var(--white); color: var(--black); border: 1px solid var(--line); padding: .4rem .8rem; cursor: pointer; border-radius: 999px; }
.chip:hover { border-color: var(--black); }
.chip[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--white); }
.count { font-size: var(--fs-small); color: var(--muted); margin-left: auto; }
.pubyear { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem 2rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.pubyear > h2 { font-size: 1.25rem; letter-spacing: -0.01em; position: sticky; top: 5.5rem; align-self: start; }
.pubs { list-style: none; margin: 0; padding: 0; max-width: 78ch; }
.pub { margin: 0 0 1.4rem; line-height: 1.5; }
.pub:last-child { margin-bottom: 0; }
.pub .title { font-weight: 600; display: block; font-size: 1.0625rem; margin-bottom: .15rem; }
.pub .authors { color: var(--text-2); font-size: .95rem; }
.pub .authors b { color: var(--black); font-weight: 650; }
.pub .venue { font-size: .95rem; }
.pub .venue i { font-style: italic; }
.pub .tag { font-size: .8rem; font-weight: 600; border: 1px solid currentColor; padding: 0 .4rem; margin-left: .35rem; color: var(--text-2); white-space: nowrap; }
.pub a.doi { font-size: .95rem; margin-left: .35rem; white-space: nowrap; }
@media (max-width: 640px) { .pubyear { grid-template-columns: 1fr; } .pubyear > h2 { position: static; } }
.pub a.code { font-size: .95rem; margin-left: .35rem; white-space: nowrap; }
.toollist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-weight: 550; }

/* ---------- software ---------- */
.howto { padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.howto h2 { font-size: 1.375rem; margin-bottom: .9rem; }
.howto ul { margin: 0; padding-left: 1.1rem; max-width: 62ch; }
.howto li { margin-bottom: .5rem; }
.howto .aside ul { list-style: none; padding: 0; font-weight: 550; }
.swgroup { scroll-margin-top: 1rem; }
.swgroup-head { margin-bottom: 1.75rem; }
.swgroup-head h2 { margin-bottom: .75rem; }
.swgroup-head .lead { max-width: 60ch; }
.tool, .coderow { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: .75rem 3rem; padding: 1.75rem 0; border-top: 1px solid var(--line); scroll-margin-top: 2rem; }
.tool h3 { font-size: 1.375rem; margin-bottom: .5rem; }
.tool p { max-width: 68ch; }
.tool .who { margin: .5rem 0 0; }
.tool .needs { color: var(--text-2); font-size: .95rem; margin-top: .6rem; }
.tool .needs b { color: var(--black); font-weight: 600; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; border: 1px solid var(--black); padding: .05rem .45rem; }
.coderow { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); padding: 1.25rem 0; }
.coderow h3 { font-size: 1.125rem; margin-bottom: .3rem; }
.coderow p { color: var(--text-2); font-size: .975rem; }
.coderow .for { color: var(--black); font-size: .975rem; line-height: 1.45; margin-bottom: .5rem; }
.coderow .for a { font-weight: 400; }
.coderow .for span { display: block; color: var(--text-2); font-size: .925rem; }
.tool.hit, .coderow.hit { background: var(--well); box-shadow: 0 0 0 .75rem var(--well); }
@media (max-width: 860px) { .tool, .coderow { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- news ---------- */
.newslist { list-style: none; margin: 0; padding: 0; }
.newsitem a { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); color: var(--black); text-decoration: none; }
.newsitem img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--well); }
.newsitem h2 { font-size: 1.375rem; font-weight: 620; line-height: 1.25; letter-spacing: -0.015em; margin: .25rem 0 .5rem; }
.newsitem p { color: var(--text-2); max-width: 70ch; }
.newsitem a:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.more { margin-top: 2rem; font: inherit; font-weight: 600; background: var(--white); border: 1px solid var(--black); padding: .7rem 1.2rem; cursor: pointer; }
.more:hover { background: var(--black); color: var(--white); }
@media (max-width: 640px) { .newsitem a { grid-template-columns: 110px minmax(0, 1fr); gap: 1rem; } .newsitem h2 { font-size: 1.125rem; } .newsitem p { display: none; } }

/* ---------- post ---------- */
.post-head { padding: clamp(2rem, 5vw, 4rem) 0 2rem; max-width: 48rem; }
.post-head .meta { margin-bottom: 1rem; }
.post-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
.post-body { font-family: var(--serif); font-size: var(--fs-read); line-height: 1.62; max-width: 40rem; }
.post-body p, .post-body ul, .post-body ol, .post-body blockquote { margin: 0 0 1.1em; }
.post-body h2, .post-body h3 { font-family: var(--sans); margin: 2rem 0 .8rem; font-size: 1.5rem; }
.post-body img { margin: 1.75rem 0; width: 100%; background: var(--well); }
.post-body p > img:only-child { margin: .5rem 0; }
.post-body blockquote { border-left: 3px solid var(--black); padding-left: 1.2rem; margin-left: 0; }
.post-body a { word-break: break-word; }
.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 1.75rem 0; background: var(--well); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 48rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--black); }
.post-nav a { color: var(--black); text-decoration: none; display: block; }
.post-nav a:hover b { text-decoration: underline; }
.post-nav span { display: block; font-size: var(--fs-small); color: var(--muted); margin-bottom: .2rem; }
.post-nav .next { text-align: right; }

/* ---------- join, fieldwork, outreach ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem 4rem; align-items: start; }
.cols h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
.cols h2:first-child { margin-top: 0; }
.aside { border-top: 3px solid var(--black); padding-top: 1.25rem; }
.aside h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.aside ul { padding-left: 1.1rem; margin: 0 0 1rem; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.trip { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem 2rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.trip .when { font-weight: 600; }
.trip h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.trip .team { max-width: 66ch; font-size: .95rem; }
@media (max-width: 640px) { .trip { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 1.25rem; }
.gallery button { padding: 0; border: 0; background: var(--well); cursor: zoom-in; display: block; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.activity { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1rem 3rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.activity h2 { font-size: 1.375rem; }
.activity ul { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 0 0 .9rem; }
@media (max-width: 760px) { .activity { grid-template-columns: 1fr; } }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 2rem; z-index: 50; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; width: auto; }
.lightbox p { color: #fff; margin-top: 1rem; font-size: var(--fs-small); }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: none; color: #fff; border: 1px solid #fff; font: inherit; padding: .4rem .8rem; cursor: pointer; }

/* ---------- footer ---------- */
.site-foot { background: var(--black); color: var(--white); margin-top: clamp(3rem, 8vw, 6rem); padding: 3.5rem 0 2.5rem; font-size: .975rem; }
.site-foot a { color: var(--white); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 2rem 2.5rem; }
.foot-grid b { display: block; font-size: 1.125rem; margin-bottom: .4rem; }
.foot-grid h2 { font-size: .975rem; font-weight: 600; letter-spacing: 0; margin-bottom: .6rem; color: #bdbdbd; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: .35rem; }
.foot-grid p { color: #d0d0d0; max-width: 36ch; }
.foot-base { margin-top: 3rem; font-size: var(--fs-small); color: #9a9a9a; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

.empty { padding: 2rem 0; color: var(--muted); }
.paperlist .title { display: block; font-weight: 600; margin-bottom: .15rem; }
.paperlist .authors, .paperlist .venue { color: var(--text-2); }
.paperlist .authors b { color: var(--black); }
.paperlist a.doi { margin-left: .35rem; }

@media (max-width: 640px) {
  :root { --fs-lead: 1.1875rem; --fs-read: 1.1875rem; }
  .hero h1 span { display: inline; }
  .tools { position: static; }
  .block-head { flex-direction: column; gap: .25rem; }
}
.reading h2, .reading h3 { font-family: var(--sans); }

/* a grey band that ends the page sits directly on the footer */
main:has(> .band:last-child) ~ .site-foot { margin-top: 0; }
