/* Lato (body) + Poppins (headings), self-hosted latin subsets */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-400.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-700.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.woff2") format("woff2");
}

:root {
  --blue: #3e69dc;
  --heading: #2c313f;
  --text: #464c59;
  --muted: #7a7c84;
  --band: #f3f3f3;
  --line: #e4e6eb;
  --card-shadow: 0 2px 12px rgba(44, 49, 63, 0.1);
  --max-measure: 46rem;
  --wide-measure: 66rem;
  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: #fff;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
}
body.band-gray { background: var(--band); }

h1, h2, h3 {
  clear: both;
  color: var(--heading);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); margin: 0 0 1.4rem; }
h2 { font-size: 1.45rem; margin: 0 0 1.1rem; }
h3 { font-size: 1.12rem; font-weight: 600; margin: 1.7rem 0 0.6rem; }

strong { color: var(--heading); font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2rem; }

a { color: var(--blue); text-decoration: none; }
main a:hover { text-decoration: underline; }

.measure { max-width: var(--max-measure); margin-inline: auto; padding-inline: 1.25rem; }
.wide { max-width: var(--wide-measure); margin-inline: auto; padding-inline: 1.25rem; }

.sr-only {
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  position: absolute;
  overflow: hidden;
}

/* ---------- header ---------- */
.site-header {
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-block: 0.9rem;
}
.wordmark {
  color: var(--heading);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}
.wordmark:hover { text-decoration: none; }
.site-header .links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.45rem; }
.site-header .links a {
  color: var(--heading);
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--blue);
}
.site-header .links a:hover { color: var(--blue); text-decoration: none; }
.site-header .links a[aria-current="page"] { color: var(--blue); }
@media (max-width: 700px) {
  .site-header .links { gap: 0.4rem 0.9rem; }
  .site-header .links a { font-size: 0.8rem; }
}

/* ---------- footer ---------- */
footer {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin-top: 5rem;
  padding-block: 2.2rem 2.6rem;
  font-size: 0.92rem;
  text-align: center;
}
body.band-gray footer { margin-top: 4rem; }
footer .copyright { color: var(--muted); }

/* ---------- bands ---------- */
section.band { background: var(--band); }
section.band, section.band-white { padding-block: 3.5rem 4rem; }

/* ---------- home hero ---------- */
.hero-band { padding-block: 3rem 3.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-model {
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: #0a0a0c;
}
.hero-model iframe { width: 100%; height: 100%; border: 0; display: block; }
.hero-text p { line-height: 1.7; margin-bottom: 1.5em; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-model { display: none; }
}

/* ---------- generic page ---------- */
.page { padding-top: 3.2rem; }
.page > header .intro, .page .intro { max-width: var(--max-measure); }
section.block { margin-top: 3.2rem; }
.centered-head > header h1 { text-align: center; }
.section-note { color: var(--muted); font-size: 0.92rem; }

/* ---------- people cards ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.person {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 1rem 1rem 0.9rem;
}
.person img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-block: 0.55rem;
  background: var(--band);
}
.person .p-name {
  color: var(--heading);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  /* reserve two lines so photos stay aligned whatever the name length */
  min-height: 2.7em;
}
.person .p-meta { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.person .p-inst { font-weight: 700; }

/* half-size cards (previous students) */
.people-grid--sm { grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr)); gap: 0.9rem; }
.people-grid--sm .person { padding: 0.55rem 0.55rem 0.5rem; border-radius: 6px; }
.people-grid--sm .person img { border-radius: 3px; margin-block: 0.4rem; }
.people-grid--sm .p-name { font-size: 0.8rem; line-height: 1.3; min-height: 2.6em; }
.people-grid--sm .p-meta { font-size: 0.7rem; line-height: 1.35; }

@media (max-width: 640px) {
  /* member/collaborator cards: always two per row on phones */
  .people-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .person { padding: 0.8rem 0.8rem 0.7rem; }
  .person .p-name { font-size: 0.9rem; }
  .person .p-meta { font-size: 0.78rem; }
  /* previous students: half-size, four per row */
  .people-grid--sm { grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
  .people-grid--sm .person { padding: 0.45rem 0.45rem 0.4rem; }
  .people-grid--sm .p-name { font-size: 0.72rem; }
  .people-grid--sm .p-meta { font-size: 0.64rem; }
}

/* ---------- reference lists (publications, talks) ---------- */
.ref-list { list-style: none; padding: 0; margin: 0; }
.ref {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  margin-bottom: 1.05rem;
}
.ref-id { color: var(--heading); font-weight: 700; }
.ref-body em { color: var(--text); }
.ref-body .ref-title { color: var(--text); }

.year-h {
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--heading);
  margin: 2.1rem 0 1.1rem;
}

/* ---------- timeline (positions, awards, service) ---------- */
.tl { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.tl li { padding: 0 0 1.7rem 1.4rem; position: relative; }
.tl li:last-child { padding-bottom: 0.2rem; }
.tl li::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue);
  position: absolute;
  left: -6px; top: 0.45rem;
}
.tl-dates { font-size: 0.85rem; color: var(--muted); }
.tl-title { color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: 1rem; }
.tl-subject { font-style: italic; font-size: 0.97rem; color: var(--text); line-height: 1.45; }
.tl-org { font-size: 0.95rem; }
.tl-meta { font-size: 0.9rem; color: var(--muted); margin-top: 0.1rem; }
.tl-desc { font-size: 0.93rem; margin: 0.35rem 0 0; color: var(--text); }

/* ---------- about (bio + portrait) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 2.6rem;
  align-items: start;
}
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; gap: 1.4rem; } }
.portrait { margin: 0; }
.portrait img {
  width: 100%;
  max-width: 16rem;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: block;
}

/* ---------- media ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: #0a0a0c;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lab-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.6rem; align-items: start; }
@media (max-width: 760px) { .lab-top { grid-template-columns: 1fr; gap: 1.4rem; } }

.fig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 1.8rem; }
@media (max-width: 640px) { .fig-row { grid-template-columns: 1fr; gap: 1.2rem; } }

figure { margin: 0 0 1.1rem; }
figure img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: block;
}
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }

/* ---------- contact ---------- */
.icon-row { display: flex; gap: 1.2rem; margin: 1.6rem 0 2.2rem; padding: 0; list-style: none; }
.icon-row a { color: var(--heading); display: inline-flex; }
.icon-row a:hover { color: var(--blue); }
.icon-row svg { width: 30px; height: 30px; fill: currentColor; }
