:root {
  --bg: #f1f4f7;
  --bg-deep: #dce3eb;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: #ffffff;
  --navy: #142a45;
  --navy-soft: #315276;
  --gold: #6687a8;
  --gold-soft: #d7e0e9;
  --text: #26374a;
  --muted: #627286;
  --line: rgba(35, 61, 89, 0.14);
  --shadow: 0 18px 40px rgba(28, 49, 72, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #f8fafc 100%);
  color: var(--text);
  line-height: 1.7;
}

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

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

h1,
h2,
h3,
.brand {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h1,
h2,
h3 {
  margin: 0 0 0.7rem;
  line-height: 1.1;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(241, 244, 247, 0.84);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  font-size: clamp(1.8rem, 2vw, 2.5rem);
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  position: relative;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy-soft);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  height: 2px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  padding: 0.6rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 99px;
  margin: 2px 0;
}

.hero {
  padding: 4rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.portrait-block {
  display: flex;
  justify-content: center;
}

.portrait {
  width: min(100%, 300px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 8px solid rgba(102, 135, 168, 0.22);
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 0.8rem;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  margin-bottom: 0.8rem;
}

.intro {
  font-size: 1.12rem;
  color: var(--navy-soft);
}

.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: var(--navy-soft);
}

.contact-line span {
  font-weight: 700;
  color: var(--navy);
}

.section-shell {
  padding: 2rem 0 4rem;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-size: clamp(2.3rem, 3vw, 3rem);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.more-news-link {
  margin: 1.5rem 0 0;
  text-align: center;
}

.news-item,
.info-card,
.publication-item {
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(28, 49, 72, 0.05);
}

.news-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.news-item h3,
.publication-item h3 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.news-item a,
.news-link {
  color: var(--navy-soft);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.news-item a:hover,
.news-link:hover {
  color: var(--navy);
  text-decoration-color: var(--navy-soft);
}

.news-item a:focus-visible,
.news-link:focus-visible {
  outline: 2px solid var(--navy-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

.page-hero {
  padding-top: 3rem;
}

.narrow {
  max-width: 760px;
}

.content-page {
  padding-top: 0.5rem;
}

.group-page-hero {
  padding-bottom: 1.25rem;
}

.research-page-hero {
  padding-bottom: 1.25rem;
}

.teaching-page-hero {
  padding-bottom: 1.25rem;
}

.news-page-hero {
  padding-bottom: 1.25rem;
}

.group-page-content {
  padding-top: 0.5rem;
}

.teaching-page-content {
  padding-top: 0.5rem;
}

.news-page-content {
  padding-top: 0.5rem;
}

.research-intro {
  margin-inline: auto;
}

.project-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 1.75rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(28, 49, 72, 0.05);
}

.project-figure {
  margin: 0;
}

.project-figure svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.project-figure-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.featured-project {
  align-items: stretch;
}

.featured-project .project-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.featured-project .project-figure-image {
  flex: 0 0 auto;
  min-height: 0;
  max-width: 100%;
}

.project-figure figcaption {
  align-self: flex-start;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.project-copy h3 {
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
}

.project-copy p:last-child {
  margin-bottom: 0;
}

.info-card + .info-card {
  margin-top: 1.25rem;
}

.info-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.info-card li + li {
  margin-top: 0.7rem;
}

.timeline {
  list-style: none;
  padding-left: 0;
}

.timeline li {
  position: relative;
  padding-left: 1.3rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.cv-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.full-span {
  grid-column: 1 / -1;
}

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

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.opportunity-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(28, 49, 72, 0.05);
}

.opportunity-card h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
}

.opportunity-card p:last-child {
  margin-bottom: 0;
}

.group-contact {
  max-width: 760px;
  margin: 0 auto;
}

.group-page-content .opportunity-grid {
  margin-top: 2rem;
}

.mentees {
  margin-top: 2rem;
}

.mentees h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
}

.mentees li + li {
  margin-top: 0.4rem;
}

.group-email {
  color: var(--navy-soft);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.2em;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: var(--gold);
}

@media (max-width: 860px) {
  .hero-grid,
  .news-grid,
  .cv-layout,
  .project-card,
  .opportunity-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-copy {
    text-align: center;
  }

  .contact-line {
    justify-content: center;
    width: fit-content;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    background: rgba(248, 250, 252, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .footer-wrap {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
  }
}
