:root {
  --bg: #ffffff;
  --surface: #f5f6f4;
  --text: #222622;
  --muted: #6b716b;
  --accent: #2e7d4f;
  --link: #1f2a22;
  --border: #e3e6e2;
  --radius: 6px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121512;
    --surface: #1a1f1b;
    --text: #e6eae6;
    --muted: #a2aaa3;
    --accent: #6cc595;
    --link: #e6eae6;
    --border: #2b322c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito Sans", "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-weight: 400; line-height: 1.2; }
h1 { font-size: 2.3rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; color: var(--muted); }
h3 { font-size: 1.15rem; font-weight: 600; }
.muted { color: var(--muted); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 2.5rem; padding-bottom: 4rem; min-height: 60vh; }

/* Banner and menu stay pinned at the top. On the home page the tall banner first
   scrolls up until only a strip the height of the other pages' banner is left. */
.masthead { position: sticky; top: 0; z-index: 20; }
.masthead-home { top: calc(140px - min(58vh, 540px)); }
.hero-credit { position: absolute; right: 12px; bottom: 6px; z-index: 2; font-size: 0.72rem; color: rgba(255,255,255,0.85); text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.hero { position: relative; overflow: hidden; height: 140px; background: #3b6b4a; }
.hero-home { height: min(58vh, 540px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; transform: scale(1.08); will-change: transform; }
.hero-home::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.55)); }
.hero-text { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.55); }
.hero-text h1 { font-size: clamp(1.7rem, 4.2vw, 3.1rem); font-weight: 600; max-width: 900px; margin: 0 0 1rem; }
.hero-text p { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 760px; margin: 0; }
/* On phones only the menu bar stays pinned; the banner scrolls away to save space. */
@media (max-width: 640px) { .hero { height: 90px; } .hero-home { height: 64vh; } .masthead { top: -90px; } .masthead-home { top: -64vh; } }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 68px; gap: 0.5rem 2rem; }
.site-title { color: var(--text); text-decoration: none; font-size: 1.35rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: flex; flex-direction: column; line-height: 1.1; }
.site-sub { font-size: 0.72rem; font-weight: 400; letter-spacing: 0.12em; color: var(--muted); margin-top: 0.2rem; }
.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.98rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.nav-toggle, .nav-toggle-label { display: none; }
@media (max-width: 820px) {
  .nav-toggle-label { display: block; cursor: pointer; color: var(--muted); font-weight: 600; }
  .site-nav { display: none; width: 100%; flex-direction: column; gap: 0; padding: 0 0 0.75rem; max-height: calc(100vh - 80px); overflow-y: auto; }
  .site-nav a { padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--border); color: var(--accent); font-weight: 600; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; padding: 1.75rem 0; }
.site-footer p { margin: 0.25rem 0; }
.footer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; }
.footer-line .social { display: inline-flex; gap: 0.8rem; margin-left: auto; }
.footer-line .social a { display: inline-flex; color: var(--muted); }
.footer-line .social a:hover { color: var(--accent); }
.footer-line svg { width: 20px; height: 20px; fill: currentColor; }
.site-footer a { color: var(--muted); }
.funders { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.funders-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.funders ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }
.funders li { border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.85rem; font-weight: 600; color: var(--text); font-size: 0.88rem; }
.funders li a { color: var(--text); text-decoration: none; }
.funders li a:hover { color: var(--accent); }

/* Buttons */
.button { display: inline-block; background: var(--accent); color: #fff; padding: 0.6rem 1.2rem; text-decoration: none; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px; margin: 0.25rem 0.5rem 0.25rem 0; }
.button:hover { color: #fff; filter: brightness(1.1); }
.button.dark { background: var(--text); color: var(--bg); }

/* Home */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3.5rem; margin-top: 1rem; }
@media (max-width: 860px) { .home-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.home-main h2:first-child, .home-side > :first-child { margin-top: 1.5rem; }
h3.year, h2.year { color: var(--muted); font-weight: 400; font-size: 1rem; margin: 1.25rem 0 0.4rem; }
h2.year { font-size: 1.6rem; margin-top: 2.5rem; }
.events { padding-left: 1.2rem; margin: 0; }
.events li { margin-bottom: 0.55rem; }
.news-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.news-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); line-height: 1.45; }
.news-list .date { color: var(--muted); font-size: 0.88rem; padding-top: 0.1rem; white-space: nowrap; }
.date { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.feature { display: block; text-decoration: none; color: var(--text); }
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.feature-caption { display: block; font-weight: 600; margin-top: 0.4rem; }
.mini-pubs { list-style: none; padding: 0; margin: 0; }
.mini-pubs li { margin-bottom: 0.8rem; line-height: 1.4; }
.mini-pubs .muted { display: block; font-size: 0.9rem; }
.join-card { background: var(--surface); border-radius: var(--radius); padding: 0.5rem 1.25rem 1.25rem; margin-top: 2rem; }
.join-card h2 { margin-top: 1rem; }

/* News list page */
.news-full { list-style: none; padding: 0; margin: 0; }
.news-full li { display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.news-full .thumb img { width: 160px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.news-full .title { font-weight: 600; }
.news-full p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 560px) { .news-full li { grid-template-columns: 96px 1fr; gap: 0.9rem; } .news-full .thumb img { width: 96px; } }

/* Single post and pages */
.post, .page { max-width: 780px; }
.post .meta { color: var(--muted); font-size: 0.9rem; }
.post-image { border-radius: var(--radius); margin: 0 0 1.5rem; width: 100%; max-height: 560px; object-fit: cover; }
.page p img, .post p img { display: block; border-radius: var(--radius); margin: 1.5rem 0 0.4rem; }
.page p img + em, .post p img + em { display: block; color: var(--muted); font-size: 0.88rem; font-style: normal; margin-bottom: 1.5rem; }
.notice { background: var(--surface); border-left: 4px solid var(--accent); padding: 0.8rem 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); }
.map { width: 100%; height: 320px; border: 0; border-radius: var(--radius); margin-top: 1rem; }

/* People */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2rem 1.75rem; }
.person { display: flex; flex-direction: column; }
.person img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: var(--border); display: block; }
.person h3 { margin: 0.75rem 0 0; font-size: 1.08rem; }
.person .role { color: var(--accent); font-weight: 600; font-size: 0.88rem; margin: 0.1rem 0 0.4rem; }
.person .teaser { font-size: 0.9rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person .more { background: none; border: 0; padding: 0; margin-top: 0.4rem; color: var(--text); font: inherit; font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; }
.person .photo { background: none; border: 0; padding: 0; cursor: pointer; width: 100%; display: block; }
.bio-dialog { max-width: 720px; width: calc(100% - 32px); border: 0; border-radius: 8px; padding: 0; background: var(--bg); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.bio-dialog::backdrop { background: rgba(0,0,0,0.5); }
.bio-dialog .inner { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.75rem; }
.bio-dialog img { width: 200px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; }
.bio-dialog h3 { margin: 0; font-size: 1.4rem; }
.initials { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 2.6rem; font-weight: 300; letter-spacing: 0.05em; }
.bio-dialog .initials { width: 200px; }
.person .site-link { font-size: 0.88rem; margin: -0.3rem 0 0.4rem; }
.cosup { font-size: 0.85rem; color: var(--muted); margin: -0.3rem 0 0.4rem; }
.bio-dialog .cosup { margin: -0.2rem 0 0.6rem; font-size: 0.95rem; }
.bio-dialog .email { margin: -0.2rem 0 0.8rem; font-size: 0.95rem; }
.bio-dialog .bio { font-size: 0.95rem; }
.bio-dialog .close { position: absolute; top: 0.6rem; right: 0.8rem; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
@media (max-width: 600px) { .bio-dialog .inner { grid-template-columns: 1fr; } .bio-dialog img, .bio-dialog .initials { width: 140px; } }
.alumni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.5rem 1rem; }
.alumni-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: var(--border); }
.alumni-grid .name { font-weight: 600; display: block; margin-top: 0.4rem; font-size: 0.95rem; }
.alumni-grid .where { color: var(--muted); font-size: 0.82rem; line-height: 1.35; display: block; }

/* Bluesky feed */
.home-side { display: flex; flex-direction: column; }
.bsky { margin-top: 2rem; flex: 1 1 0; min-height: 440px; display: flex; flex-direction: column; }
.bsky-scroll { flex: 1 1 0; min-height: 0; max-width: 100%; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 0.5rem; }
@media (max-width: 860px) { .bsky { flex: none; } .bsky-scroll { flex: none; height: 520px; } }
.join-band { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.75rem; margin-top: 3rem; }
.join-band h2 { margin: 0 0 0.3rem; }
.join-band.hiring { border-left: 4px solid var(--accent); }
.hiring-list { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.positions { margin-bottom: 2.5rem; scroll-margin-top: 230px; }
.position { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.25rem 1.25rem 0.75rem; margin-bottom: 1rem; }
.position h3 { margin-bottom: 0.2rem; }
.join-band p { margin: 0; max-width: 620px; }
.bsky h2 { margin-bottom: 0.5rem; }

/* Publications */
.pub-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { display: grid; grid-template-columns: 1fr; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.pub.has-image { grid-template-columns: 220px 1fr; gap: 1.75rem; }
.pub-thumb img { width: 220px; border-radius: 3px; border: 1px solid var(--border); display: block; }
.pub-text p { margin: 0; }
.pub-title { font-weight: 600; }
.pub-links { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.93rem; }
.pub-note { color: var(--muted); list-style: none; margin-left: -1.2rem; }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--border); border-radius: 3px; padding: 0 0.35rem; color: var(--muted); vertical-align: 2px; }
@media (max-width: 640px) { .pub.has-image { grid-template-columns: 96px 1fr; gap: 1rem; } .pub-thumb img { width: 96px; } }
.page.wide { max-width: none; }

/* News photo gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin: 2rem 0 1rem; }
.gallery figure { margin: 0; }
.gallery-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); transition: opacity 0.15s; }
.gallery-open:hover img, .gallery-open:focus-visible img { opacity: 0.85; }
.gallery figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.35rem; line-height: 1.35; }
.gallery-one { grid-template-columns: minmax(0, 1fr); }
.gallery-one img { aspect-ratio: auto; max-height: 560px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0,0,0,0.88); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 84vh; border-radius: 4px; }
.lightbox figcaption { color: #e6eae6; font-size: 0.95rem; margin-top: 0.6rem; padding: 0 1rem; }
.lightbox button { position: fixed; background: rgba(0,0,0,0.35); border: 0; color: #fff; cursor: pointer; border-radius: 999px; width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; }
.lightbox .close { top: 1rem; right: 1rem; }
.lightbox .prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; } }
