:root {
  --page-width: 1980px;
  --content-width: 1710px;
  --ink: #12203a;
  --muted: #748197;
  --lab-red: #8d2113;
  --nav-font: "Helvetica Neue", Arial, Helvetica, sans-serif;
  --body-font: Georgia, "Times New Roman", serif;
  --nav-accent: #2f6f4e;
  --line-soft: rgba(25, 48, 77, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  background: #ffffff;
}

body {
  background: #ffffff;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.masthead {
  width: min(var(--page-width), calc(100vw - 40px));
  margin: 14px auto 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(27, 49, 77, 0.14);
  border-radius: 18px;
  background: linear-gradient(90deg, #ffffff 0%, #f7fcf8 54%, #eef8f0 100%);
  box-shadow: 0 4px 18px rgba(16, 32, 54, 0.06);
}

.masthead::after {
  content: "";
  position: absolute;
  top: 0;
  right: 26%;
  bottom: 0;
  width: 300px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.58));
  transform: skewX(-30deg);
  transform-origin: top;
  pointer-events: none;
}

.masthead-inner {
  position: relative;
  z-index: 1;
  min-height: 228px;
  padding: 56px 66px 38px;
}

.masthead h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--nav-font);
  font-size: clamp(68px, 6vw, 132px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.page-title {
  display: none;
  margin-bottom: 28px;
  font-size: clamp(56px, 5vw, 104px);
}

.home-title-row {
  display: grid;
  grid-template-columns: minmax(420px, auto);
  align-items: start;
  min-height: 160px;
}

.home-title-row h1 {
  margin-bottom: 0;
  font-size: clamp(72px, 6vw, 136px);
}

.brand-kicker {
  margin: 0 0 18px;
  color: var(--nav-accent);
  font-family: var(--nav-font);
  font-size: clamp(26px, 1.3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(30px, 2.7vw, 58px);
  min-height: 70px;
  padding-top: 22px;
  padding-left: 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--nav-font);
  font-size: clamp(22px, 1.5vw, 30px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  padding-bottom: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 4px;
  background: var(--nav-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease;
}

.primary-nav a.active,
.primary-nav a:hover {
  color: var(--ink);
}

.primary-nav a.active::after,
.primary-nav a:hover::after {
  transform: scaleX(1);
}

.page-shell {
  width: min(var(--content-width), calc(100vw - 40px));
  margin: 0 auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.intro-copy {
  max-width: 1760px;
  margin: 64px 0 86px;
  font-family: var(--body-font);
  font-size: clamp(26px, 1.85vw, 38px);
  font-weight: 700;
  line-height: 1.18;
}

.home-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 54px);
  margin: 0 0 64px;
}

.home-topic {
  min-width: 0;
}

.home-topic h2 {
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--nav-font);
  font-size: clamp(28px, 2.2vw, 42px);
  font-weight: 600;
  line-height: 1;
}

.home-topic-images {
  display: grid;
  gap: 36px;
}

.home-topic-images figure {
  margin: 0;
}

.home-topic-images figure > a {
  display: block;
  border-radius: 8px;
}

.home-topic-images figure > a:focus-visible {
  outline: 3px solid rgba(47, 111, 78, 0.42);
  outline-offset: 4px;
}

.home-topic-images img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(25, 48, 77, 0.16);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 32, 54, 0.1);
}

.home-topic-images figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--nav-font);
  font-size: clamp(13px, 0.85vw, 16px);
  line-height: 1.35;
}

.publications-page h2,
.text-page h2 {
  margin: 0 0 72px;
  color: var(--lab-red);
  font-family: var(--nav-font);
  font-size: clamp(50px, 4.3vw, 78px);
  font-weight: 300;
  line-height: 1;
}

.publications-page {
  max-width: 1320px;
  padding-top: 58px;
  padding-bottom: 88px;
}

.publications-header {
  margin-bottom: clamp(38px, 4vw, 58px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.publications-page h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 2.7vw, 50px);
  font-weight: 600;
}

.publications-note {
  margin: 0;
  font-family: var(--nav-font);
  font-size: clamp(22px, 1.55vw, 29px);
  line-height: 1.45;
}

.scholar-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  color: var(--nav-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 78, 0.32);
  text-underline-offset: 5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.scholar-link:hover,
.scholar-link:focus-visible {
  color: #245b3f;
  text-decoration-color: currentColor;
}

.scholar-link:focus-visible {
  outline: 3px solid rgba(47, 111, 78, 0.24);
  outline-offset: 5px;
}

.publication-list {
  max-width: 1240px;
}

.publication-list p {
  margin: 0;
  padding: 0 0 24px;
  font-family: var(--body-font);
  font-size: clamp(19px, 1.25vw, 25px);
  font-weight: 400;
  line-height: 1.42;
}

.publication-list p + p {
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.publication-list em {
  font-style: italic;
  font-weight: 700;
}

.text-page {
  padding-top: 82px;
  color: var(--muted);
  font-family: var(--nav-font);
}

@media (max-width: 1180px) {
  .masthead-inner {
    padding: 40px 34px 28px;
  }

  .home-title-row {
    grid-template-columns: 1fr;
  }

  .primary-nav {
    gap: 26px;
  }
}

@media (max-width: 760px) {
  .masthead,
  .page-shell {
    width: 100%;
  }

  .masthead-inner {
    min-height: 0;
    padding: 28px 20px 20px;
  }

  .masthead h1 {
    margin-bottom: 16px;
  }

  .home-title-row {
    grid-template-columns: 1fr;
  }

  .primary-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    font-size: 18px;
  }

  .page-shell {
    padding: 0 20px;
  }

  .intro-copy {
    margin-top: 36px;
  }

  .home-topics {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-topic + .home-topic {
    margin-top: 18px;
  }

  .publications-page h2,
  .text-page h2 {
    margin-bottom: 34px;
  }

  .contact-page {
    padding-top: 52px;
  }

}

/* Team page */
.members-page {
  padding-bottom: 88px;
}

.pi-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(26px, 3.5vw, 52px);
  align-items: center;
  max-width: 980px;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.pi-portrait {
  width: clamp(210px, 17vw, 250px);
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #ffffff;
}

.pi-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.pi-details {
  max-width: 620px;
  color: var(--muted);
}

.member-role {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: clamp(14px, 0.95vw, 17px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pi-details h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--nav-font);
  font-size: clamp(30px, 2.6vw, 46px);
  font-weight: 500;
  line-height: 1.05;
}

.pi-title {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(20px, 1.35vw, 25px);
  font-weight: 400;
}

.pi-details > p:not(.member-role):not(.pi-title) {
  margin: 0 0 17px;
  font-size: clamp(18px, 1.2vw, 22px);
  line-height: 1.45;
}

.email-link {
  color: var(--nav-accent);
  font-size: clamp(17px, 1.1vw, 20px);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 78, 0.36);
  text-underline-offset: 5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.email-link:hover,
.email-link:focus-visible {
  color: #245b3f;
  text-decoration-color: currentColor;
}

.email-link:focus-visible,
.primary-nav a:focus-visible {
  outline: 3px solid rgba(47, 111, 78, 0.24);
  outline-offset: 4px;
}

.group-members {
  max-width: 980px;
  margin-top: clamp(48px, 5vw, 72px);
}

.group-members-heading {
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.group-members-heading h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--nav-font);
  font-size: clamp(26px, 2vw, 36px);
  font-weight: 500;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 42px;
}

.member-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: clamp(19px, 1.3vw, 24px);
  font-weight: 500;
}

@media (max-width: 760px) {
  .members-page {
    padding-top: 54px;
  }

  .pi-profile {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 22px 0;
  }

  .pi-portrait {
    width: 155px;
  }

  .pi-details h3 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .member-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .pi-profile {
    grid-template-columns: 1fr;
  }

  .pi-portrait {
    width: 140px;
  }
}

/* Contact page */
.contact-page {
  max-width: 1180px;
  padding-top: 72px;
  padding-bottom: 88px;
  color: var(--muted);
  font-family: var(--nav-font);
}

.contact-header {
  margin-bottom: clamp(34px, 4vw, 54px);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.contact-page h2 {
  margin: 0;
  color: var(--lab-red);
  font-size: clamp(34px, 2.7vw, 50px);
  font-weight: 600;
  line-height: 1.05;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: clamp(44px, 6vw, 84px);
  align-items: start;
}

.contact-block {
  min-width: 0;
}

.contact-label {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(14px, 0.95vw, 17px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-block address,
.contact-map-block > p:not(.contact-label) {
  margin: 0;
  font-size: clamp(20px, 1.35vw, 27px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}

.contact-map-block {
  padding-left: clamp(28px, 4vw, 52px);
  border-left: 1px solid var(--line-soft);
}

.contact-map-block > p:not(.contact-label) {
  margin-bottom: 24px;
}

.campus-map-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  color: var(--nav-accent);
  font-size: clamp(18px, 1.2vw, 23px);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 78, 0.34);
  text-underline-offset: 5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.campus-map-link:hover,
.campus-map-link:focus-visible {
  color: #245b3f;
  text-decoration-color: currentColor;
}

.campus-map-link:focus-visible {
  outline: 3px solid rgba(47, 111, 78, 0.24);
  outline-offset: 5px;
}

/* Positions available */
.positions-block {
  grid-column: 1 / -1;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
}

.positions-block p {
  max-width: 980px;
  margin: 0;
  font-size: clamp(18px, 1.2vw, 22px);
  line-height: 1.55;
}

.positions-block p + p {
  margin-top: 14px;
}

.position-link {
  color: var(--nav-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 78, 0.32);
  text-underline-offset: 4px;
}

.position-link:hover,
.position-link:focus-visible {
  color: #245b3f;
  text-decoration-color: currentColor;
}

.position-link:focus-visible {
  outline: 3px solid rgba(47, 111, 78, 0.24);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .contact-page {
    padding-top: 52px;
    padding-bottom: 64px;
  }

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .contact-map-block {
    padding-top: 30px;
    padding-left: 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

}
