:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --line: #d8dde6;
  --accent: #304f7a;
  --accent-soft: #e9eef6;
  --max: 980px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.2px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

nav a {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
}

nav a:hover,
nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--accent-soft);
  text-decoration: underline;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 20px 56px;
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 18px;
}

h1, h2, h3 {
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(1.7rem, 1.4rem + 1.6vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); margin-bottom: 10px; }

.muted { color: var(--muted); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.team-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f1f3f7;
}

.pub-list {
  padding-left: 20px;
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 28px;
  color: var(--muted);
  font-size: 0.92rem;
}


/* An open, single-column introduction gives the homepage room to breathe. */
.home-page {
  background: #fff;
}

.home-page .site-header {
  position: static;
}

.home-page nav a[aria-current="page"],
.home-page nav a:hover {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.home-main {
  padding-top: clamp(44px, 7vw, 88px);
  padding-bottom: 36px;
}

.home-copy {
  max-width: 820px;
  margin: 0 auto;
}

.home-copy h1 {
  max-width: 800px;
  margin-bottom: 28px;
  color: #18354a;
  font-family: inherit;
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.home-copy p {
  margin: 0 0 24px;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.85;
}

.home-copy p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.home-illustration {
  margin: clamp(32px, 5vw, 60px) auto 0;
  max-width: 360px;
}

.home-illustration img {
  display: block;
  width: 100%;
  height: auto;
}

.home-page footer {
  text-align: center;
  font-size: 0.8rem;
}

@media (max-width: 850px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .header-inner { justify-content: center; }
  .grid-3 { grid-template-columns: 1fr; }
  .home-main { padding-left: 24px; padding-right: 24px; }
}

/* A readable bibliography with year headings and open spacing. */
.home-copy p a { text-decoration: underline; text-underline-offset: 3px; }
.publications-main { max-width: 860px; padding-top: 52px; }
.publications-heading { margin-bottom: 48px; }
.publications-heading h1 { color: #18354a; font-size: clamp(1.9rem, 3.8vw, 2.75rem); font-weight: 500; }
.publication-year { margin: 0 0 40px; }
.publication-year h2 { font-size: 1.15rem; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.publication-list { list-style: none; padding: 0; margin: 0; }
.publication-list li { padding: 16px 0; }
.publication-list h3 { font-size: 1.1rem; line-height: 1.5; margin: 0 0 7px; }
.publication-list p { margin: 4px 0; overflow-wrap: anywhere; }
.publication-authors { font-size: 0.95rem; color: var(--muted); }
.publication-venue { font-size: 0.9rem; color: var(--muted); }
.publication-type { display: inline-block; margin-left: 8px; color: var(--accent); font-size: 0.8rem; font-weight: 600; }

/* Team profiles share the open layout and typography of the other pages. */
.team-main { max-width: 860px; padding-top: 52px; }
.team-heading { margin-bottom: 48px; }
.team-heading h1 { color: #18354a; font-size: clamp(1.9rem, 3.8vw, 2.75rem); font-weight: 500; }
.pi-profile { max-width: 760px; padding-bottom: 40px; }
.pi-profile h2 { color: var(--text); font-size: 1.5rem; font-weight: 500; margin-bottom: 4px; }
.pi-profile .pi-role { color: var(--accent); font-size: 1.05rem; margin-bottom: 24px; }
.pi-profile p { line-height: 1.85; margin: 0 0 18px; overflow-wrap: anywhere; }
.pi-profile a { text-decoration: underline; text-underline-offset: 3px; }

.profile-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 22px; }
.pi-profile .profile-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: underline; font-size: 0.95rem; }
.profile-link svg { width: 26px; height: 26px; flex-shrink: 0; }
.profile-link:hover span { text-decoration: underline; text-underline-offset: 4px; }
.profile-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.profile-link-unavailable { color: var(--muted); }
.team-section { max-width: 760px; margin-top: 36px; padding-bottom: 12px; }
.team-section h2 { font-size: 1.6rem; font-weight: 500; color: var(--accent); margin-bottom: 20px; }
.team-section h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }
.team-section p { line-height: 1.85; margin: 0; }
.people-list { list-style: none; margin: 0; padding: 0; }
.people-list li { padding: 5px 0; line-height: 1.7; }
.people-years { color: var(--muted); }

.mascot-profile { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.mascot-photo { display: block; width: 100%; height: auto; }
@media (max-width: 700px) {
  .mascot-profile { grid-template-columns: 1fr; gap: 20px; }
  .mascot-photo { max-width: 360px; }
}

.pi-intro { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: stretch; margin-bottom: 18px; }
.pi-intro p { margin-bottom: 0; }
.pi-photo-frame { position: relative; min-width: 0; }
.pi-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; margin: 0; }
.pi-profile::after { content: ""; display: block; clear: both; }
.pi-profile #pi-contact { clear: both; padding-top: 8px; }
@media (max-width: 700px) {
  .pi-intro { grid-template-columns: 1fr; gap: 24px; }
  .pi-photo-frame { width: min(100%, 360px); aspect-ratio: 1122 / 1200; }
}

.research-main { max-width: 860px; padding-top: 52px; }
.research-heading { margin-bottom: 48px; }
.research-heading h1 { color: #18354a; font-size: clamp(1.9rem, 3.8vw, 2.75rem); font-weight: 500; }
.research-heading p, .research-section p { max-width: 760px; line-height: 1.85; }
.research-section { margin: 0 0 40px; }
.research-section h2 { color: var(--accent); font-size: 1.3rem; font-weight: 500; line-height: 1.4; margin-bottom: 20px; }

/* Align both edges of paragraph text across the site. */
main p { text-align: justify; }

/* Navigation tabs stay clean; links in page content remain underlined. */
.site-header nav a,
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { text-decoration: none; }
