:root {
  --card-radius: 20px;
  --card-shadow: 0 8px 28px rgba(23, 60, 93, 0.05);
}

.surface-card {
  border: 1px solid var(--blue-200);
  border-radius: var(--card-radius);
  background: white;
  box-shadow: var(--card-shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.surface-card:hover,
.surface-card:focus-within {
  transform: translateY(-5px);
  border-color: var(--blue-400);
  box-shadow: 0 18px 40px rgba(23, 60, 93, 0.13);
}

.surface-card:hover :is(h3, h4),
.surface-card:focus-within :is(h3, h4) {
  color: var(--blue-600);
}

.surface-card img {
  transition: transform 350ms ease;
}

.surface-card:hover > img {
  transform: scale(1.025);
}

.nav-inner,
html:lang(en) .nav-inner {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
}

.nav-inner a,
html:lang(en) .nav-inner a {
  padding-inline: 6px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin: 4px 0 36px;
}

.filter-bar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-900);
  font-size: 15px;
}

.filter-bar select {
  min-width: 115px;
  max-width: 235px;
  padding: 12px 32px 12px 12px;
  border: 1px solid var(--blue-200);
  border-radius: 7px;
  background: var(--blue-50);
  color: var(--text);
  font: inherit;
}

.filter-bar select:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
}

.editorial-page .filter-reset {
  border: 0;
  background: transparent;
  color: var(--blue-600);
  padding-inline: 10px;
}

.editorial-page .filter-reset:hover {
  color: var(--blue-900);
  text-decoration: underline;
}

.catalog-panel-title.centered-subheading {
  position: relative;
  width: fit-content;
  height: auto;
  overflow: visible;
  clip-path: none;
  margin: 56px auto 34px;
  font-size: 28px;
}

.catalog-entry.surface-card {
  grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 0;
  margin-top: 24px;
  overflow: hidden;
}

.catalog-entry .entry-image {
  height: 100%;
  min-height: 230px;
  max-height: 340px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: var(--blue-50);
}

.catalog-entry .entry-content {
  padding: 28px 32px;
}

.year-heading {
  margin-top: 38px;
}

.section > .centered-subheading {
  margin-bottom: 42px;
}

.pi-profile {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  max-width: 1050px;
  margin: 0 auto;
}

.pi-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 45% 45% 42% 42%;
}

.pi-profile h3 {
  margin-bottom: 20px;
  font-size: 34px;
}

.pi-experience {
  padding-left: 18px;
  margin: 0;
}

.pi-experience li + li {
  margin-top: 8px;
}

.team-page .people-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 44px 32px;
}

.team-page .people-grid > .member-profile {
  flex: 0 0 calc((100% - 96px) / 4);
  width: calc((100% - 96px) / 4);
  box-sizing: border-box;
}

.team-page .people-grid:has(> .member-profile:nth-child(5)) > .member-profile {
  flex: 0 0 calc((100% - 96px) / 4);
}

.member-profile {
  min-width: 0;
  text-align: center;
}

.member-profile > img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
}

.member-profile figcaption {
  padding: 15px 0;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
}

.member-profile h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.member-profile p {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.7;
}

.member-profile p span {
  color: var(--muted);
}

.lab-equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.equipment-figure {
  overflow: hidden;
}

.equipment-figure > img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  background: var(--blue-50);
}

.equipment-figure figcaption {
  padding: 10px;
  border: 0;
  text-align: center;
  background: white;
}

.equipment-figure .fields > div {
  grid-template-columns: 75px minmax(0, 1fr);
}

.resource-card.surface-card {
  padding: 30px;
  border-top: 1px solid var(--blue-200);
}

.internal-access {
  text-align: center;
}

.internal-access a {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.job-card.surface-card {
  margin: 0;
}

.job-card.surface-card + .job-card.surface-card {
  margin-top: 40px; 
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
}

.partner-logo .logo-window {
  width: 180px;
  height: 180px;
  margin: 0 auto 22px;
  overflow: hidden;
}

.partner-logo img {
  width: 260px;
  
  height: auto;
  
}

.partner-logo figcaption {
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

.partner-logo span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.location-map {
  min-width: 0;
}

.interactive-map {
  display: block;
  width: 100%;
  height: 360px;
  border: 1px solid var(--blue-200);
  border-radius: 16px;
  background: var(--blue-50);
  z-index: 0;
}

.location-map .map-status {
  margin: 8px 0;
}

.location-map p {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.location-map a {
  display: inline-block;
  margin-left: 8px;
}

.site-header {
  border-top-color: transparent;
}

.identity {
  padding-inline: 18px;
  border-radius: 0 0 16px 16px;
}

.brand {
  mix-blend-mode: multiply;
}

.primary-nav {
  border-color: transparent;
}

.site-header.is-stuck .primary-nav {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(23, 60, 93, 0.08);
}

.catalog-entry.news-entry {
  align-items: stretch;
}

.news-entry .entry-image {
  position: absolute;
  inset: 0;
  max-height: none;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: transparent;
}

.news-entry .entry-media {
  position: relative;
  min-height: 260px;
  background: var(--blue-50);
}

.entry-authors {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.entry-authors + .entry-meta {
  margin-top: 6px;
}

.empty-category-line {
  margin: 38px 0;
  border: 0;
  border-top: 1px solid var(--blue-300);
}

.home-sections .news-preview h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-preview {
  height: 180px;
}

.home-sections .news-preview p,
.home-sections .publication-preview > div > p:not(.preview-meta) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.home-sections .publication-preview h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 18px;
}

.research-preview > img {
  object-fit: cover;
}

html:lang(en) .cover-copy h2 {
  font-size: clamp(26px, 2.4vw, 38px);
}

html:lang(en) .cover-copy h3 {
  font-size: clamp(18px, 1.35vw, 22px);
}

@media (max-width: 1000px) {
  .identity {
    padding-inline: 10px;
  }

  .team-page .people-grid > .member-profile,
  .team-page .people-grid:has(> .member-profile:nth-child(5)) > .member-profile {
    flex-basis: calc((100% - 32px) / 2);
    width: calc((100% - 32px) / 2);
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav-inner a,
  html:lang(en) .nav-inner a {
    font-size: 15px;
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .pi-profile {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
  }

  .team-page .people-grid,
  .partner-grid,
  .lab-equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-entry .entry-content {
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .team-page .people-grid > .member-profile,
  .team-page .people-grid:has(> .member-profile:nth-child(5)) > .member-profile {
    flex-basis: calc((100% - 16px) / 2);
    width: calc((100% - 16px) / 2);
  }

  .catalog-entry.news-entry .entry-image {
    height: 100%;
  }

  .news-entry .entry-media {
    min-height: 240px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav-inner,
  html:lang(en) .nav-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 12px;
  }

  .nav-inner a,
  html:lang(en) .nav-inner a {
    flex: 0 0 auto;
    padding: 12px 4px;
    font-size: 15px;
    white-space: nowrap;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .filter-bar label {
    display: grid;
    gap: 6px;
    font-size: 14px;
  }

  .filter-bar select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .filter-bar label:has([name="direction"]) {
    grid-column: 1 / -1;
  }

  .catalog-entry.surface-card,
  .pi-profile,
  .lab-equipment-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-entry .entry-image {
    height: 220px;
    min-height: 0;
  }

  .catalog-entry .entry-content {
    padding: 22px;
  }

  .pi-portrait {
    max-width: 240px;
    margin: auto;
  }

  .team-page .people-grid,
  .partner-grid {
    gap: 24px 16px;
  }

  .member-profile h3 {
    font-size: 16px;
  }

  .partner-logo .logo-window {
    width: 120px;
    height: 120px;
  }

  .partner-logo img {
    width: 174px;
    margin-left: -15px;
  }

  .job-card.surface-card {
    padding: 24px;
  }

  .interactive-map {
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .surface-card,
  .surface-card img {
    transition: none;
  }

  .surface-card:hover,
  .surface-card:focus-within,
  .surface-card:hover > img {
    transform: none;
  }
}

@media (max-width: 760px) {
  .cover-copy {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% - 36px);
  }

  .cover-copy h2 {
    font-size: 30px;
  }

  .cover-copy h3 {
    font-size: 19px;
  }

  .cover-subtitle {
    font-size: 14px;
    letter-spacing: 1px;
  }
}

@media (max-width: 480px) {
  .identity {
    padding-inline: 0;
  }

  .news-preview {
    height: auto;
  }
}
