:root {
  --background: hsl(210 20% 98%);
  --foreground: hsl(215 25% 15%);
  --card: hsl(0 0% 100%);
  --primary: #0b2339;
  --primary-foreground: hsl(210 20% 98%);
  --secondary: #4f8ca6;
  --muted: hsl(210 15% 93%);
  --muted-foreground: hsl(215 18% 32%);
  --accent: #4f8ca6;
  --accent-foreground: hsl(0 0% 100%);
  --border: hsl(214 20% 88%);
  --ring: #0b2339;
  --hero-overlay: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.86),
    rgba(0, 0, 0, 0.72)
  );
  --section-alt: hsl(210 15% 96%);
  --shadow: 0 20px 50px rgba(10, 28, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  border-radius: 0.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(1, 23, 33, 0.88);
  backdrop-filter: blur(16px);
}

.nav-shell,
.container {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
}

.nav-shell {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--primary-foreground);
}

.brand img {
  display: block;
  width: auto;
  height: 3rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-links a,
.mobile-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.9);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.24em;
  transition: color 0.2s ease, opacity 0.2s ease, text-decoration-color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover,
.team-link:hover,
.contact-link:hover {
  color: var(--accent);
}

.nav-links a.active,
.mobile-menu a.active {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--primary-foreground);
  cursor: pointer;
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #011721;
  padding: 0 1rem 1rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.85rem 0;
}

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 64rem);
  padding-top: 4rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1.5rem;
  color: var(--primary-foreground);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  width: min(100%, 42rem);
  margin: 0 auto 2.5rem;
  color: rgba(248, 250, 252, 0.96);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  padding: 0.9rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}

.button-primary:hover {
  opacity: 0.92;
}

.button-secondary {
  border: 1px solid rgba(248, 250, 252, 0.55);
  color: var(--primary-foreground);
  background: rgba(255, 255, 255, 0.06);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--section-alt);
}

#research .container {
  width: min(100% - 2rem, 80rem);
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
}

.section-header h2,
.about-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.section-label {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.about-grid {
  display: grid;
  gap: 3rem;
}

.about-copy {
  max-width: 46rem;
}

.about-copy p,
.research-card p,
.team-card p,
.publication-item span,
.address-copy,
.footer {
  color: var(--muted-foreground);
}

.about-copy a:not(.brand):not(.button),
.team-card a,
.member-card a,
.cases-copy a,
.footer-links a,
.team-link,
.contact-link,
.cases-more a,
.publication-item a,
.bio-toggle {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.team-card a,
.member-card a,
.team-link {
  text-decoration: none;
}

.footer-links a {
  text-decoration: none;
}

.stats-grid,
.research-grid,
.cases-grid {
  display: grid;
  gap: 1.5rem;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.research-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-groups {
  display: grid;
  gap: 2.5rem;
}

.research-group {
  display: grid;
  gap: 1.4rem;
}

.research-group .research-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-group-tools .research-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-group-tools {
  border-top: 1px solid rgba(11, 35, 57, 0.12);
  padding-top: 2rem;
}

.research-group-header {
  display: grid;
  gap: 0.3rem;
}

.research-group-header h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--foreground);
}

.research-group-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cases-grid {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: start;
}

.cases-section {
  background: #fff;
}

.card,
.publication-item,
.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.card {
  padding: 1.5rem;
}

.card h3,
.team-card h3,
.publication-item span {
  color: var(--foreground);
}

.stat-card {
  text-align: center;
}

.icon-badge {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: rgba(79, 140, 166, 0.14);
  color: var(--accent);
}

.icon-badge svg {
  width: 1.4rem;
  height: 1.4rem;
}

.stat-card .icon-badge {
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
}

.stat-label {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: hsl(215 18% 28%);
}

.research-card:hover {
  border-color: rgba(79, 140, 166, 0.4);
}

.research-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.research-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.research-card .icon-badge {
  margin-bottom: 1rem;
}

.research-card-action {
  margin-top: auto;
  padding-top: 0.8rem;
}

.research-logo-image {
  display: block;
  margin-top: 1rem;
  width: auto;
  max-width: 9rem;
  height: 2.5rem;
}

.research-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  min-height: 2.5rem;
  min-width: 9rem;
  padding: 0.55rem 0.9rem;
  border: 1px dashed rgba(11, 35, 57, 0.26);
  border-radius: 0.8rem;
  background: rgba(79, 140, 166, 0.08);
  color: hsl(215 18% 28%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-more {
  margin: 1.75rem 0 0;
  text-align: center;
  color: var(--muted-foreground);
}

.team-photo-band {
  position: relative;
  padding: 0;
  background: var(--primary);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.team-photo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.team-photo-band img {
  width: 100%;
  height: auto;
  display: block;
}

.cases-photo-band {
  position: relative;
  padding: 0;
  background: var(--primary);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.cases-photo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.cases-photo-band img {
  width: 100%;
  height: min(24rem, 33vw);
  object-fit: cover;
  object-position: center;
  display: block;
}

.team-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.publication-shell,
.contact-shell {
  width: min(100%, 42rem);
  margin: 0 auto;
}

.team-shell {
  width: min(100%, 29rem);
  margin: 0 auto;
}

.team-card-offset {
  width: 100%;
}

.team-grid {
  display: grid;
  gap: 1rem 0.85rem;
}

.team-grid-wrap {
  width: 100%;
  padding: 0.25rem 0 0;
}

.team-grid-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--foreground);
}

.team-grid-intro {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted-foreground);
}

.team-card {
  padding: 2rem;
  text-align: center;
}

.avatar {
  width: 8.25rem;
  height: 8.25rem;
  margin: 0 auto 1.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(79, 140, 166, 0.14);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
  display: block;
}

.team-role {
  margin: 0.35rem 0 1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.team-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  margin-top: 2rem;
}

.member-card {
  padding: 0.35rem 0.15rem;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.member-card h3 {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.member-card h3 a {
  color: inherit;
}

.team-card h3 a {
  color: inherit;
}

.team-card h3 a:hover {
  color: var(--accent);
}

.member-card h3 a:hover {
  color: var(--accent);
}

.portrait {
  width: 3.9rem;
  height: 3.9rem;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(79, 140, 166, 0.2), rgba(11, 35, 57, 0.12));
  color: var(--accent);
}

.portrait svg {
  width: 1.45rem;
  height: 1.45rem;
}

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

.bio-toggle {
  margin: 0.5rem 0 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.inline-highlight-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.research-publications-button {
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration-thickness: 0.06em;
}

.bio-extra[hidden] {
  display: none;
}

.team-link,
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.team-link svg,
.contact-link svg,
.contact-row > svg,
.publication-item svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.publication-shell {
  display: grid;
  gap: 1rem;
}

.publication-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.publication-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.publication-item:hover,
.publication-button:focus-visible {
  border-color: rgba(79, 140, 166, 0.65);
  box-shadow: 0 16px 32px rgba(10, 28, 45, 0.08);
}

.cases-card {
  overflow: hidden;
}

.cases-image {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
}

.cases-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.65rem;
}

.cases-image svg {
  width: 2.1rem;
  height: 2.1rem;
}

.cases-copy {
  padding: 1.2rem;
}

.cases-copy h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.cases-copy h3 a {
  color: inherit;
}

.cases-copy h3 a:hover {
  color: var(--accent);
}

.cases-copy p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.94rem;
}

.case-read-more {
  display: inline;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  transition: color 0.2s ease;
}

.case-read-more:hover,
.case-read-more:focus-visible {
  color: var(--primary);
}

.cases-more {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted-foreground);
}

.cases-more a {
  color: var(--accent);
  font-weight: 600;
}

.publication-item .icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
}

.publication-item span {
  margin-right: auto;
}

.publication-open {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  white-space: nowrap;
}

.publication-open svg {
  width: 1rem;
  height: 1rem;
}

.publication-modal[hidden],
.highlight-modal[hidden] {
  display: none;
}

.publication-modal,
.highlight-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  animation: modalFadeIn 0.22s ease;
}

.publication-modal-backdrop,
.highlight-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 45, 0.55);
  backdrop-filter: blur(6px);
  animation: modalBackdropIn 0.22s ease;
}

.publication-modal-panel,
.highlight-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 46rem);
  max-height: min(90vh, 48rem);
  overflow: auto;
  border: 1px solid rgba(11, 35, 57, 0.12);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 60px rgba(10, 28, 45, 0.24);
  padding: 1.5rem;
  animation: modalPanelIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.publication-modal-top,
.highlight-modal-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.publication-modal-top h3,
.highlight-modal-top h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.publication-modal-close,
.highlight-modal-close {
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.publication-meta {
  margin: 0 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.publication-modal-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-abstract {
  margin: 0;
  color: var(--foreground);
}

.publication-actions {
  margin-top: 1.4rem;
}

.project-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--foreground);
}

.project-list li + li {
  margin-top: 0.7rem;
}

.publication-placeholder-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--foreground);
}

.publication-placeholder-list li + li {
  margin-top: 0.7rem;
}

.publication-placeholder-list a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 0.06em;
  transition: color 0.2s ease;
}

.publication-placeholder-list a:hover,
.publication-placeholder-list a:focus-visible {
  color: var(--accent);
  outline: none;
}

.cases-link-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--foreground);
}

.cases-link-list li + li {
  margin-top: 0.65rem;
}

.cases-link-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.contact-shell {
  display: grid;
  gap: 1.5rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-row > svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.address-title {
  margin: 0 0 0.35rem;
  color: var(--foreground);
  font-weight: 600;
}

.footer {
  background: #011721;
  color: rgba(248, 250, 252, 0.88);
  padding: 3rem 1rem;
}

.footer-shell {
  width: min(100%, 72rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(248, 250, 252, 0.9);
}

.footer-links svg {
  width: 1rem;
  height: 1rem;
}

.fade-up {
  animation: fadeUp 0.6s ease both;
}

.fade-up-delay {
  animation: fadeUp 0.6s ease 0.2s both;
}

.fade-up-delay-2 {
  animation: fadeUp 0.6s ease 0.4s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 48rem) {
  .nav-links {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .hero-actions,
  .team-links,
  .footer-shell {
    flex-direction: row;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(36rem, 1.1fr);
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(12rem, 1fr));
    width: calc(100% + 4rem);
    margin-right: -4rem;
  }

  .research-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .research-group .research-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .research-group-tools .research-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-layout {
    grid-template-columns: minmax(22rem, 29rem) minmax(0, 1fr);
  }

  .team-card-offset {
    width: calc(100% + 4rem);
    margin-left: -4rem;
  }

  .team-grid-wrap {
    width: calc(100% + 4rem);
    margin-right: -4rem;
  }

  .team-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .footer-shell {
    justify-content: space-between;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
