:root {
  color-scheme: light;
  --ink: #152e2b;
  --text: #253b3a;
  --muted: #4e6562;
  --paper: #fff;
  --soft: #eef5f2;
  --line: #d5e3de;
  --accent: #075f53;
  --serif: Georgia, "Times New Roman", serif;
  font-family: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--text); font-size: 1rem; line-height: 1.65; }
main { min-height: 62vh; }
a { color: var(--accent); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #217f72; outline-offset: 4px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
p { margin: 0 0 1rem; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 500; line-height: 1.12; }
h1 { margin: 0 0 1.25rem; font-size: clamp(2.75rem, 5.5vw, 5rem); letter-spacing: -.045em; }
h2 { margin: 0 0 1.4rem; font-size: clamp(1.9rem, 3.5vw, 2.8rem); letter-spacing: -.035em; }
h3 { margin: 0 0 .6rem; font-size: clamp(1.28rem, 2.15vw, 1.65rem); }
[id] { scroll-margin-top: 1.5rem; }
[hidden] { display: none !important; }

.shell { width: min(100% - 3rem, 74rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1rem; }
.wordmark { color: var(--ink); font: 600 1.5rem var(--serif); text-decoration: none; white-space: nowrap; }
.wordmark span { margin-left: .65rem; padding-left: .65rem; border-left: 1px solid var(--line); color: var(--accent); font: 650 .875rem system-ui, sans-serif; }
nav { display: flex; flex-wrap: wrap; gap: .1rem 1.4rem; }
nav a { min-height: 2.9rem; display: inline-flex; align-items: center; color: var(--text); font-size: .925rem; font-weight: 550; text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--accent); text-decoration: underline; }
nav .nav-join { color: var(--accent); font-weight: 750; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 1; padding: .65rem; background: var(--paper); transform: translateY(-150%); }
.skip:focus { transform: none; }

.hero { background: var(--soft); padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.affiliation, .citation { color: var(--accent); font-size: .875rem; font-weight: 650; }
.affiliation { letter-spacing: .12em; text-transform: uppercase; }
.hero-copy > p:not(.affiliation), .page-intro > p { max-width: 61ch; font-size: clamp(1.03rem, 1.4vw, 1.22rem); }
.hero figure img { aspect-ratio: 4 / 3; width: 100%; height: auto; border-radius: .35rem; object-fit: cover; }
figcaption { color: var(--muted); font-size: .875rem; margin-top: .4rem; }
.button { display: inline-block; margin-top: .35rem; padding: .65rem 1.05rem; border-radius: .25rem; background: var(--accent); color: white; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--ink); }
.hero-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: .65rem 1.3rem; }
.join-link { font-weight: 650; }

.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.section-header h2 { margin: 0; }
.section-header a, .page-links a { font-weight: 600; }
.paper-grid, .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.paper-preview-image { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--soft); border: 1px solid var(--line); border-radius: .3rem; overflow: hidden; margin-bottom: 1rem; }
.paper-preview-image img { width: 100%; height: 100%; object-fit: contain; }
.paper-preview h3 a { color: var(--ink); text-decoration: none; }
.paper-preview h3 a:hover { text-decoration: underline; }
.paper-preview .citation, .news-entry .citation { margin-bottom: .45rem; }
.news-band, .bibliography-band { background: var(--soft); }
.news-entry > p:last-child { margin: 0; }

.page-intro { padding-block: clamp(2.6rem, 6vw, 5rem) 1.5rem; }
.page-intro h1 { font-size: clamp(2.55rem, 5vw, 4.35rem); }
.page-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.prose { padding-block: .5rem 4rem; }
.prose > * { max-width: 70ch; }
.prose h2 { margin-top: 1.5rem; }
.research { display: flow-root; }
.research h2 { clear: both; max-width: none; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.research h3 { margin-top: 1.35rem; }
.research-figure { float: right; width: min(35%, 26rem); margin: 0 0 1rem 1.5rem; }
.research-figure img { margin-inline: auto; max-height: 25rem; border-radius: .35rem; }
.research ul li + li { margin-top: .75rem; }
.research-paper-title { font-weight: 650; }
.research-paper-citation { display: block; color: var(--muted); font-size: .875rem; }
.news-archive article + article { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.annotated { padding-top: 1rem; }
.annotated > h2 { margin-bottom: 0; }
.annotated-paper { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); align-items: start; padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.annotated-paper h3 { font-size: clamp(1.55rem, 2.75vw, 2.2rem); }
.annotated-paper figure { display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: .3rem; padding: .65rem; }
.annotated-paper img { width: 100%; max-height: 24rem; object-fit: contain; }
.byline { color: var(--muted); font-size: .95rem; }
.annotation { max-width: 70ch; }
.paper-link { font-weight: 650; }
.paper-coverage { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.paper-coverage h4 { margin: 0 0 .55rem; font-size: .95rem; color: var(--ink); }
.paper-coverage ul { display: grid; gap: .65rem; list-style: none; margin: 0; padding: 0; }
.paper-coverage li { display: grid; gap: .1rem; }
.paper-coverage a { width: fit-content; }
.paper-coverage li span { font-size: .875rem; color: var(--muted); }
.filter { max-width: 34rem; margin-bottom: 1.25rem; }
.filter label { display: block; margin-bottom: .35rem; font-weight: 600; }
.filter input { width: 100%; padding: .65rem; border: 1px solid #758f88; border-radius: .25rem; font: inherit; background: var(--paper); }
.filter p { color: var(--muted); margin: .5rem 0 0; font-size: .9rem; }
.bibliography { list-style: none; margin: 0; padding: 0; }
.bibliography li { display: grid; gap: .15rem; border-top: 1px solid var(--line); padding-block: 1rem; }
.bibliography-title { color: var(--ink); font-weight: 650; }
.directory section { margin-block: 1.5rem 2.75rem; }
.people-grid, .software-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.person-card { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .35rem; }
.person-card > div { flex: 1 1 10rem; }
.person-card > div > :last-child { margin-bottom: 0; }
.person-card .citation { margin-bottom: .45rem; }
.portrait { width: 6.25rem; aspect-ratio: 1; object-fit: cover; border-radius: .25rem; background: var(--soft); }
.profile-detail { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem 2rem; }
.profile-detail .portrait { width: min(12rem, 100%); }
.profile-detail .prose { flex: 1 1 24rem; min-width: 0; }
.page-intro > a + h1 { margin-top: .85rem; }
.software-grid { padding-block: 1rem 4rem; }
.software-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .35rem; overflow: hidden; }
.software-figure { display: grid; place-items: center; padding: .75rem; height: 13rem; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--soft); }
.software-figure img { max-height: 11.5rem; object-fit: contain; }
.source-figure { display: block; min-width: 0; max-width: 100%; }
.source-figure img { background: var(--paper); }
.figure-attribution { margin: .55rem 0 .85rem; color: var(--muted); font-size: .875rem; }
.software-copy { display: flex; flex-direction: column; flex: 1; padding: 1.3rem; }
.software-copy h2 { margin-bottom: .55rem; font-size: clamp(1.65rem, 2.65vw, 2.25rem); }
.software-copy .citation { margin-bottom: .6rem; }
.software-copy .page-links { margin-top: auto; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { align-items: start; padding-block: 1.75rem; font-size: .9rem; }

@media (max-width: 800px) {
  .research-figure { float: none; width: min(100%, 26rem); margin: 0 0 1.25rem; }
  .header-inner { align-items: flex-start; flex-direction: column; gap: .35rem; padding-bottom: .4rem; }
  nav { column-gap: 1rem; }
  .hero-grid, .annotated-paper { grid-template-columns: 1fr; }
  .hero figure { max-width: 40rem; }
  .annotated-paper figure { max-width: 36rem; }
}

@media (max-width: 580px) {
  .shell { width: calc(100% - 2rem); }
  .paper-grid, .news-grid, .people-grid, .software-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}
