:root {
  --bg: #ffffff;
  --text: #16181d;
  --muted: #5b616e;
  --faint: #8a909c;
  --rule: #e3e5ea;
  --accent: #0f5c6e;
  --max: 72rem;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --text: #eceef2;
    --muted: #a3a9b5;
    --faint: #7c8290;
    --rule: #2a2e36;
    --accent: #6cc3d5;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.nowrap { white-space: nowrap; }

/* Header */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand span { font-weight: 600; font-size: 0.95rem; line-height: 1.25; letter-spacing: -0.005em; max-width: 17rem; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.12; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); margin: 0 0 1.25rem; max-width: 21ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.35rem; line-height: 1.35; }
p { margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 40rem; line-height: 1.55; }

main section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
main section:first-child { border-top: 0; padding-top: 4rem; }
.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.75rem; font-size: 1.75rem; }

/* Section header: title left, link right */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.more { font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* Ruled list (programs, publications) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.rows li { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr; gap: 0.5rem 3rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.rows p { margin: 0; color: var(--muted); }
.rows a.row-title { color: var(--text); text-decoration: none; }
.rows a.row-title:hover { color: var(--accent); }

.placeholder { color: var(--muted); padding: 1.5rem 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--rule); margin: 0; }

dl.facts { display: grid; grid-template-columns: 9rem 1fr; gap: 0.75rem 2rem; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--text); }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.site-footer h4 { margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.site-footer p { margin: 0 0 0.35rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.3rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.legal { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--faint); font-size: 0.85rem; }

@media (max-width: 44rem) {
  .rows li { grid-template-columns: 1fr; gap: 0.35rem; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .about-col { grid-column: 1 / -1; }
  dl.facts { grid-template-columns: 1fr; gap: 0.1rem; }
  dl.facts dd { margin-bottom: 0.75rem; }
  main section { padding: 2.5rem 0; }
  main section:first-child { padding-top: 2.5rem; }
}

/* Photos */
img { max-width: 100%; height: auto; display: block; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.rows li.with-photo { grid-template-columns: 9rem minmax(12rem, 1fr) 2fr; align-items: start; }
.rows li.with-photo img { width: 9rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 44rem) {
  .rows li.with-photo { grid-template-columns: 1fr; }
  .rows li.with-photo img { width: 100%; max-width: 28rem; margin-bottom: 0.5rem; }
}
