@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap");

:root {
  --site-font: "Raleway", sans-serif;
  --stanford-red: #8c1515;
  --stanford-red-dark: #6e1010;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html, body, div, span, h1, h2, h3, h4, p, a, ul, li, section, header, nav, footer, main, button, figure, article, address {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

body {
  font-family: var(--site-font);
  font-size: 14pt;
  font-weight: 300;
  line-height: 1.75;
  color: #555;
  background: #fff;
}

img {
  max-width: 100%;
}

.banner-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

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

.skip-link {
  position: absolute;
  left: 0.75em;
  top: -100%;
  z-index: 1000;
  background: #fff;
  color: var(--stanford-red);
  padding: 0.5em 1em;
  font-weight: 600;
  border: 2px solid var(--stanford-red);
  border-radius: 2px;
}

.skip-link:focus {
  top: 0.75em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--stanford-red);
  outline-offset: 3px;
}

a {
  color: var(--stanford-red);
  text-decoration: none;
  border-bottom: dotted 1px;
}

a:hover {
  color: var(--stanford-red-dark);
  border-bottom-color: transparent;
}

h1, h2, h3 {
  color: #333;
  font-weight: 600;
  line-height: 1.5;
}

h1 { font-size: 2.25em; }
h2 { font-size: 1.75em; margin-top: 1.5em; }
h3 { font-size: 1.25em; margin-top: 1.5em; }

p { margin: 0 0 1.5em 0; }

.inner {
  max-width: 75em;
  margin: 0 auto;
  padding: 0 2em;
}

/* Cardinal-red emphasis for key phrases */
.accent {
  color: var(--stanford-red);
  font-weight: 600;
}

/* Cardinal-red text without added weight */
.cardinal {
  color: var(--stanford-red);
}

/* Header */
#header {
  width: 100%;
  background: #2f2f2f;
  color: #fff;
  padding: 1.25em 0;
  position: relative;
  z-index: 100;
}

#header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  padding-left: 1.25em;
  padding-right: 2em;
  position: relative;
}

#header .logo {
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  gap: 1.1em;
}

#header .logo:hover,
#header .logo:focus-visible {
  color: #fff;
  opacity: 0.9;
  outline-color: #fff;
}

#header .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

#header .logo-title {
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
}

#header .logo-tagline {
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #ccc;
  line-height: 1.3;
  max-width: 22em;
}

#header .logo-mark {
  /* Layout box stays small so the header bar doesn't grow */
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  margin-left: -0.25em;
  margin-right: 0.35em;
  transform: scale(1.45);
  transform-origin: left center;
  /* Black logo backgrounds blend into the dark header */
  mix-blend-mode: lighten;
}

#nav a {
  color: #fff;
  border: none;
  margin-left: 1.5em;
  font-weight: 500;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  position: relative;
  display: inline-block;
}

#nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4em;
  width: 0;
  height: 4px;
  background: #fff;
  transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#nav a:hover::after,
#nav a:focus-visible::after,
#nav a[aria-current="page"]::after {
  width: 100%;
}

#nav a:hover,
#nav a:focus-visible {
  color: #fff;
  outline-color: #fff;
}

.navPanelToggle {
  display: none;
  position: absolute;
  top: 50%;
  right: 1em;
  transform: translateY(-50%);
  z-index: 200;
  background: var(--stanford-red);
  color: #fff;
  width: 2.75em;
  height: 2.75em;
  line-height: 1;
  text-align: center;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 1.25em;
  font-family: inherit;
  padding: 0;
}

/* Banner — home (welcome text blending into photo carousel) */
#banner.banner-home {
  /* Matches the header */
  --banner-bg: #2f2f2f;
  color: #fff;
  overflow: hidden;
  background: var(--banner-bg);
}

.banner-split {
  display: flex;
  align-items: stretch;
  min-height: 36em;
}

.banner-text-box {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1em;
  padding: 2.5em 1em 2.5em 2em;
  box-sizing: border-box;
  color: #fff;
  position: relative;
  z-index: 2;
}

.banner-media {
  position: relative;
  flex: 1 1 75%;
  overflow: hidden;
  min-height: 16em;
}

.banner-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.banner-slide {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.banner-slide.active {
  opacity: 1;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to right,
      var(--banner-bg, #2f2f2f) 0%,
      rgba(47, 47, 47, 0) 40%
    ),
    linear-gradient(rgba(35, 35, 35, 0) 75%, rgba(35, 35, 35, 0.3));
  pointer-events: none;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.4em;
  height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(35, 35, 35, 0.45);
  color: #fff;
  font-size: 1.1em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.banner-arrow:hover {
  background: rgba(35, 35, 35, 0.75);
}

.banner-arrow-prev {
  left: 0.75em;
}

.banner-arrow-next {
  right: 0.75em;
}

.banner-dots {
  position: absolute;
  bottom: 1em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.banner-pause {
  padding: 0.3em 0.65em;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(35, 35, 35, 0.55);
  color: #fff;
  font-family: inherit;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
}

.banner-pause:hover,
.banner-pause:focus-visible {
  background: rgba(35, 35, 35, 0.85);
  outline-color: #fff;
}

.banner-dot {
  width: 0.7em;
  height: 0.7em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.banner-dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

.banner-dot.active {
  background: #fff;
  transform: scale(1.2);
}

#banner.banner-home .banner-welcome-title {
  font-size: 2.5em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: none;
  margin: 0;
  color: #fff;
}

#banner.banner-home .banner-welcome-body {
  font-size: 1.1em;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.02em;
  margin: 0;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.92);
}

/* Banner — other pages (no image) */
#banner.banner-page {
  background: #2f2f2f;
  color: #fff;
  padding: 2.25em 0;
  text-align: left;
}

#banner.banner-page h1 {
  color: #fff;
  font-weight: 400;
  font-size: 1.75em;
}

#banner.banner-page h1 span {
  display: block;
  font-weight: 300;
  font-size: 0.85em;
  margin-top: 0.25em;
  color: #ccc;
}

/* Page title shown in the content area (outside the gray banner) */
h1.page-title {
  color: var(--stanford-red);
  font-size: 2.5em;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 0.75em;
}

/* Main content pages (People, Research, Publications, …) */
#people-content,
#research_summary,
#research-area-content,
#contact-content {
  padding: 2.5em 0 4em;
}

/* Publications page (McMahon-style layout) */

.publications-year-heading {
  font-weight: 600;
  font-size: 1.75em;
  color: var(--stanford-red);
  margin: 0 0 0.75em;
}

.publication-block {
  font-size: 1em;
  line-height: 1.5;
  margin-bottom: 1.75em;
  max-width: 100%;
}

.publication-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.publication-title {
  font-weight: 700;
}

.publication-journal {
  font-weight: 700;
  color: var(--stanford-red);
}

.publication-text a {
  color: var(--stanford-red);
  font-weight: 700;
}

.publication-text a:hover {
  color: var(--stanford-red-dark);
  border-bottom-color: transparent;
}

.publication-link-sep {
  color: #999;
  margin: 0 0.15em;
}

.publications-status {
  color: #666;
}

/* People page */
.people-carousel {
  position: relative;
  width: 100%;
  max-width: 40em;
  margin: 0 auto 2.5em;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
}

.people-carousel .banner-slide img {
  display: block;
  object-position: center center;
}

.people-status {
  text-align: center;
  color: #666;
  margin-bottom: 2em;
}

.people-status.error {
  color: var(--stanford-red);
}

.people-group {
  margin-bottom: 3em;
}

.people-group h2 {
  font-weight: 600;
  font-size: 1.5em;
  margin: 0 0 1.25em;
  padding-bottom: 0.35em;
  border-bottom: 2px solid #eee;
}

.people-group--alumni h2 {
  margin-bottom: 1.75em;
}

.people-group--alumni .alumni-group + .alumni-group {
  margin-top: 2.75em;
  padding-top: 0.25em;
}

.alumni-subgroup {
  font-weight: 600;
  font-size: 1.05em;
  margin: 0 0 1em;
  color: #333;
  letter-spacing: 0.01em;
}

.alumni-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.alumni-entry {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  margin: 0 0 1.1em;
  line-height: 1.5;
}

.alumni-name {
  color: var(--stanford-red);
  font-weight: 600;
  font-size: 1em;
}

.alumni-meta {
  display: block;
  color: #666;
  font-size: 0.92em;
  font-weight: 400;
  line-height: 1.55;
}

.alumni-sep {
  margin: 0 0.45em;
  color: #bbb;
}

.alumni-thesis {
  color: #666;
  border-bottom: dotted 1px #aaa;
}

.alumni-thesis:hover {
  color: var(--stanford-red);
  border-bottom-color: transparent;
}

@media (min-width: 52em) {
  .alumni-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25em 3em;
  }

  .alumni-entry {
    margin-bottom: 1em;
  }
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16em, 1fr));
  gap: 2em 1.75em;
}

.person-card {
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.person-body {
  text-align: center;
  width: 100%;
  max-width: 280px;
}

.person-photo-link {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-bottom: 0.85em;
  border: none;
  transition: opacity 0.15s ease;
}

.person-photo-link:hover {
  border: none;
  opacity: 0.88;
}

.person-photo {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin-bottom: 0;
  border-radius: 4px;
  background: #eee;
}

.person-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: 600;
  color: #888;
  background: #e8e8e8;
}

.person-name {
  font-weight: 600;
  font-size: 1.1em;
  margin: 0 0 0.35em;
  color: #333;
}

.person-name a {
  color: var(--stanford-red);
  border-bottom: dotted 1px;
}

.person-name a:hover {
  color: var(--stanford-red-dark);
  border-bottom-color: transparent;
}

.person-title {
  margin: 0;
  font-size: 0.95em;
  color: #555;
}

.person-detail {
  margin: 0 0 0.25em;
  font-size: 0.95em;
  color: #555;
}

.person-email {
  display: inline-block;
  margin-top: 0.35em;
  border: none;
}

.person-email:hover {
  border: none;
}

/* Contact page */
.contact-staff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3em 4em;
  margin-bottom: 3.5em;
}

.contact-staff-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-staff-member p {
  margin: 0 0 0.35em;
  line-height: 1.65;
  color: #444;
}

.contact-heading {
  font-size: 1.1em;
  font-weight: 700;
  margin: 0 0 0.75em;
  color: #222;
}

.contact-photo-link {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-top: 1.25em;
  border: none;
  transition: opacity 0.15s ease;
}

.contact-photo-link:hover {
  border: none;
  opacity: 0.88;
}

.contact-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 4px;
  background: #eee;
}

.contact-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3em 4em;
}

.contact-location address {
  font-style: normal;
  line-height: 1.65;
  color: #444;
}

/* Individual profile page */
#person-content {
  padding: 2.5em 0 4em;
}

.person-back {
  margin: 0 0 1.5em;
}

.person-back a {
  color: #666;
  font-size: 0.95em;
  border: none;
}

.person-back a:hover {
  color: var(--stanford-red);
  border: none;
}

.person-profile-header {
  display: flex;
  align-items: center;
  gap: 1.75em;
  margin-bottom: 2.5em;
}

.person-profile-photo {
  width: 9.5em;
  height: 9.5em;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  flex-shrink: 0;
  background: #eee;
}

.person-profile-name {
  margin: 0;
  font-size: 2.25em;
  font-weight: 600;
  color: #222;
  line-height: 1.15;
}

.person-profile-pronouns {
  margin: 0.4em 0 0;
  font-size: 1em;
  font-weight: 400;
  color: #555;
}

.person-profile-identity {
  min-width: 0;
}

.person-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(16em, 1fr);
  gap: 3em 4em;
  align-items: start;
}

.person-profile-main {
  min-width: 0;
}

.person-profile-section {
  margin-bottom: 2em;
}

.person-profile-section h2 {
  font-size: 1.35em;
  font-weight: 700;
  margin: 0 0 0.75em;
  color: #222;
}

.person-profile-section p {
  margin: 0 0 1em;
  line-height: 1.65;
  color: #444;
}

.person-profile-list {
  margin: 0;
  padding-left: 1.25em;
  line-height: 1.65;
  color: #444;
}

.person-profile-list li {
  margin-bottom: 0.35em;
}

.person-research-list {
  list-style: disc;
}

.person-profile-sidebar {
  min-width: 0;
}

.person-sidebar-section {
  margin-bottom: 2em;
  padding-top: 1.5em;
  border-top: 1px solid #ddd;
}

.person-sidebar-section:first-child {
  padding-top: 0;
  border-top: none;
}

.person-sidebar-heading {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0 0 0.85em;
  font-size: 1.1em;
  font-weight: 700;
  color: #222;
}

.person-sidebar-icon {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  color: #222;
}

.person-sidebar-section p {
  margin: 0 0 0.5em;
  line-height: 1.55;
  color: #444;
}

.person-sidebar-label {
  font-weight: 600;
  margin-right: 0.35em;
}

.person-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.person-link-list li {
  margin-bottom: 0.45em;
}

.person-link-list a {
  border: none;
}

.person-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  border: none;
}

.person-inline-link:hover {
  border: none;
}

.person-inline-icon {
  width: 0.9em;
  height: 0.9em;
  flex-shrink: 0;
}

/* Main content */
#research_summary h3 {
  font-weight: 600;
}

.research-back-link {
  margin: 0 0 1.25em;
}

.research-back-link a {
  color: #666;
  font-weight: 500;
}

.research-back-link a:hover {
  color: var(--stanford-red);
}

.research-area-overview {
  margin: 0 0 2.5em;
}

.research-area-overview p {
  margin: 0 0 1em;
  line-height: 1.65;
}

.research-area-overview p:last-child {
  margin-bottom: 0;
}

.research-project-group {
  margin-bottom: 3em;
}

.research-project-group h2 {
  font-weight: 600;
  font-size: 1.5em;
  margin: 0 0 1.25em;
  padding-bottom: 0.35em;
  border-bottom: 2px solid #eee;
}

.research-project-body.has-figure::after {
  content: "";
  display: table;
  clear: both;
}

.research-project-figure {
  float: right;
  width: min(62%, 680px);
  margin: 0.15em 0 1em 2em;
}

.research-project-figure img {
  display: block;
  width: 100%;
  height: auto;
}

#nanomechanical-mass-sensing .research-project-figure {
  width: min(32%, 210px);
}

.research-project-text p {
  margin: 0;
  line-height: 1.65;
}

.research-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3em;
  width: 100%;
  max-width: 50em;
  margin: 1.5em auto 0;
  /* Tuned to research photo sizes: 778×1024, 1024×768, 1024×863, 1024×768 */
  --research-panel-ratio: 1 / 1;
}

.research-panels .summary-panel {
  flex: none;
  max-width: none;
  width: auto;
}

.research-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: var(--research-panel-ratio);
  width: 100%;
  min-height: 0;
  padding: 0;
  background-color: #1a1a1a;
  border-top: none;
}

.research-panel-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#nonlinear-optics .research-panel-media {
  background-image: url("../../images/research/nonlinear-optics.png");
}

#transduction .research-panel-media {
  background-image: url("../../images/research/transduction.png");
}

#acoustics .research-panel-media {
  background-image: url("../../images/research/acoustics.png");
}

#superconducting-circuits .research-panel-media {
  background-image: url("../../images/research/superconducting-circuits.png");
}

.research-panel-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  padding: 1em 1.25em;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.research-panel-media,
.research-panel-label,
.research-panel-cta {
  pointer-events: none;
}

.research-panel-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.research-panel-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.9em 1.25em;
  background: rgba(140, 21, 21, 0.92);
  color: #fff;
  font-family: var(--site-font);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.research-panel-link:hover .research-panel-cta,
.research-panel-link:focus-visible .research-panel-cta {
  transform: translateY(0);
}

.research-panel-link:focus-visible {
  outline: 2px solid var(--stanford-red);
  outline-offset: 3px;
}

.research-panel .research-panel-label h2 {
  margin: 0;
  text-transform: none;
  letter-spacing: 0.03em;
  font-size: 1.3em;
  line-height: 1.35;
  font-weight: 600;
  text-align: left;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.summary-panels {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 3em;
  margin: 2.5em 0 3em;
}

.summary-panel {
  flex: 1 1 0;
  min-height: 20em;
  border: none;
  border-top: 4px solid var(--stanford-red);
  border-radius: 6px;
  padding: 2.75em 1.35em 2.25em;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.summary-panel h2 {
  font-size: 1.55em;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
  text-align: center;
}

.summary-panel p {
  flex: 1;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 2em;
  text-align: center;
  color: #555;
}

.summary-panel .panel-button {
  display: inline-block;
  align-self: center;
  padding: 0.65em 1.75em;
  background: transparent;
  color: var(--stanford-red);
  border: 2px solid var(--stanford-red);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9em;
  letter-spacing: 0.04em;
}

.summary-panel .panel-button:hover {
  background: var(--stanford-red);
  color: #fff;
  border-color: var(--stanford-red);
}

.research-panel.summary-panel {
  padding: 0;
  background-color: #1a1a1a;
  border-top: none;
  min-height: 0;
  display: block;
}

.research-panel.summary-panel:hover,
.research-panel-link:hover {
  transform: translateY(-5px);
}

.funding-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: center;
  margin-top: 1.25em;
}

.funding-logos img {
  height: 64px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

footer {
  background: #2f2f2f;
  color: #ccc;
  padding: 2em 0;
  text-align: center;
  font-size: 0.85em;
}

footer p {
  margin: 0;
}

.footer-legal {
  margin-top: 0.5em;
}

.footer-legal a {
  color: #ccc;
  border-bottom: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: #fff;
  outline-color: #fff;
}

/* Mobile nav panel */
#navPanel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(16em, 100%);
  height: 100%;
  height: 100dvh;
  background: #2f2f2f;
  z-index: 150;
  padding: 4.5em 1.5em 1.5em;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.nav-open {
  overflow: hidden;
}

#navPanel.visible {
  display: block;
}

#navPanel a {
  display: block;
  width: fit-content;
  color: #fff;
  border: none;
  padding: 0.75em 0;
  font-size: 1.1em;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
}

#navPanel a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.45em;
  width: 0;
  height: 4px;
  background: #fff;
  transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#navPanel a:hover::after,
#navPanel a:focus-visible::after,
#navPanel a[aria-current="page"]::after {
  width: 100%;
}

#navPanel a:hover,
#navPanel a:focus-visible {
  color: #fff;
  outline-color: #fff;
}

@media screen and (max-width: 980px) {
  #nav { display: none; }
  .navPanelToggle { display: block; }
  body { font-size: 12pt; }
  #header .inner {
    flex-wrap: nowrap;
    padding-right: 4.5em;
  }
  #header .logo {
    min-width: 0;
    flex: 1 1 auto;
  }
  #header .logo-mark {
    transform: none;
    width: 48px;
    height: 48px;
  }
  #header .logo-title {
    font-size: 1.15em;
  }
  #header .logo-tagline {
    font-size: 0.62em;
    max-width: 14em;
  }
  .publications-year-heading {
    font-size: 1.35em;
  }
  .banner-split {
    flex-direction: column;
    min-height: 0;
  }
  .banner-text-box {
    flex: none;
    width: 100%;
    align-items: center;
    text-align: center;
    padding: 2em 1.5em;
  }
  .banner-media {
    flex: none;
    width: 100%;
    min-height: 0;
    height: 18em;
  }
  .banner-slide {
    background-position: center center;
    background-size: cover;
  }
  .banner-overlay {
    background:
      linear-gradient(
        to bottom,
        var(--banner-bg, #2f2f2f) 0%,
        rgba(47, 47, 47, 0) 40%
      ),
      linear-gradient(rgba(35, 35, 35, 0) 75%, rgba(35, 35, 35, 0.3));
  }
  #banner.banner-home .banner-welcome-title {
    font-size: 2em;
  }
  #banner.banner-home .banner-welcome-body {
    font-size: 1.1em;
  }
  #banner.banner-page h1 {
    font-size: 1.45em;
  }
  h1.page-title {
    font-size: 2em;
  }
  .summary-panels {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  .summary-panel {
    max-width: 20em;
    min-height: auto;
    width: 100%;
  }
  .research-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .research-panels .summary-panel {
    max-width: none;
    width: auto;
  }
  .people-grid {
    grid-template-columns: 1fr;
  }

  .research-project-figure {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0 0 1em;
  }

  .person-photo {
    max-width: 100%;
  }
  .person-profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25em;
  }
  .person-profile-name {
    font-size: 1.75em;
  }
  .person-profile-layout {
    grid-template-columns: 1fr;
    gap: 2em;
  }
  .contact-staff,
  .contact-locations {
    grid-template-columns: 1fr;
    gap: 2.5em;
  }
}

@media screen and (max-width: 600px) {
  .inner {
    padding-left: 1.25em;
    padding-right: 1.25em;
  }
  h1.page-title {
    font-size: 1.65em;
  }
  .research-panels {
    grid-template-columns: 1fr;
  }
  #header .logo-tagline {
    max-width: none;
  }
}
