:root {
  color-scheme: light;
  --ink: #1c2633;
  --ink-soft: #4a5768;
  --paper: #ffffff;
  --plate: #ffffff;
  --band: #e8f0f9;
  --road: #1f4e99;
  --closure: #1f4e99;
  --rule: #d3e0ef;
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.95rem/1.6 var(--serif);
}

a { color: var(--road); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--closure); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.12; margin: 0; }

.skip {
  position: absolute;
  left: -999px;
  background: var(--plate);
  padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; z-index: 2; }

/* Navigation */
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.site-nav { position: relative; background: var(--band); }
/* soft wavy bottom edge, painted in the band color */
.site-nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: calc(100% - 1px);
  height: 29px;
  background: var(--band);
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 28' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1000V4C720 34 300 30 0 10Z'/%3E%3C/svg%3E");
  -webkit-mask: var(--wave) no-repeat 0 0 / 100% 100%;
  mask: var(--wave) no-repeat 0 0 / 100% 100%;
  pointer-events: none;
}
.site-nav a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  padding: 10px 0 7px;
  border-bottom: 3px solid transparent;
}
.site-nav nav { display: flex; gap: 32px; }
.site-nav nav a:hover { border-bottom-color: var(--rule); }
.site-nav nav a[aria-current="page"] { border-bottom-color: var(--closure); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#about, #research, #progress { scroll-margin-top: 16px; }

main { padding-bottom: 56px; }

/* About */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) var(--gutter) 40px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
h1 {
  grid-column: 1 / -1;
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
  margin: 0;
}
.hero-text p { max-width: 36em; margin: 0 0 14px; }
.contact { font-family: var(--sans); font-weight: 400; display: flex; flex-wrap: wrap; gap: 4px 16px; }

.hero-photo { margin: 0; width: 100%; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 50% 20%; border-radius: 50%; }
figure.plate figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 12px;
}

/* Interior pages */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) 0;
}
.page-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 40px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* Papers */
.paper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  scroll-margin-top: 16px;
}
.paper h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.25; margin-bottom: 12px; }
.finding { font-size: 0.95rem; line-height: 1.5; margin: 0 0 12px; }
.paper-links { font-family: var(--sans); font-size: 0.9rem; margin: 0 0 12px; }
.abstract-box summary { font-family: var(--sans); font-size: 0.9rem; cursor: pointer; }
.abstract-box[open] summary { margin-bottom: 8px; }
.abstract { margin: 0; font-size: 0.9rem; color: var(--ink-soft); max-width: 40em; }
.plate { margin: 0; }
.plate a { display: block; }
.plate img { display: block; width: 100%; height: auto; }
.plate--tall { max-width: 460px; }

.progress { list-style: none; margin: 0; padding: 0; }
.progress li { padding: 14px 0; border-bottom: 1px solid var(--rule); max-width: 52em; }

@media (max-width: 820px) {
  .hero, .paper { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { max-width: 200px; }
  .plate--tall { max-width: 100%; }
}
