:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --ink: #1f2a2d;
  --muted: #687275;
  --line: #d9dedc;
  --teal: #2f6f73;
  --teal-dark: #214d50;
  --clay: #8d4f32;
  --sage: #dfe9e5;
  --shadow: 0 20px 70px rgba(31, 42, 45, 0.1);
  color-scheme: light;
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(47, 111, 115, 0.04), transparent 34%),
    linear-gradient(180deg, rgba(141, 79, 50, 0.05), transparent 42%);
  z-index: -1;
}

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

a {
  color: inherit;
  text-decoration-color: rgba(47, 111, 115, 0.35);
  text-underline-offset: 0.18em;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

a:hover {
  color: var(--teal);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
.brand,
.button,
.nav-links {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.96;
  font-weight: 650;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
}

h4 {
  margin-bottom: 0.15rem;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 650;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 247, 244, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.nav-toggle {
  display: none;
}

.section-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6.5rem 0;
}

.section-shell.compact {
  padding: 4.5rem 0;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.56fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding-top: 5rem;
}

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

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--clay);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 690px;
  color: #3f4d50;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.55;
}

.hero-actions,
.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--teal);
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

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

.button.primary {
  background: var(--teal);
  color: white;
}

.button.primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: white;
}

.button.secondary {
  background: transparent;
  color: var(--teal-dark);
}

.portrait-frame {
  margin: 0;
  justify-self: end;
  width: min(360px, 100%);
  border: 1px solid rgba(31, 42, 45, 0.12);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
}

.research-themes {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.research-themes .compact {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) 1.28fr;
  gap: 3rem;
  align-items: start;
}

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

.theme-card,
.project-card,
.resource-feature,
.cv-panel,
.info-grid article,
.publication-group {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(31, 42, 45, 0.12);
  border-radius: 8px;
}

.theme-card {
  padding: 1.25rem;
}

.theme-card p,
.section-heading p,
.project-meta,
.supervisor,
.muted,
.contact-section p,
.cv-panel p {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(2rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.sticky-heading {
  align-self: start;
  position: sticky;
  top: 102px;
}

.section-body > p {
  font-size: 1.08rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.info-grid article {
  padding: 1.35rem;
}

.timeline {
  display: grid;
  gap: 1.1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.timeline-period {
  color: var(--clay);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 750;
}

.tag-cloud,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(47, 111, 115, 0.18);
  border-radius: 999px;
  background: rgba(223, 233, 229, 0.58);
  color: var(--teal-dark);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
}

.clean-list {
  margin: 0;
  padding-left: 1.1rem;
}

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

.project-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.project-meta,
.supervisor {
  margin-bottom: 0.65rem;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.contribution {
  padding-left: 1rem;
  border-left: 3px solid var(--teal);
  color: #314043;
}

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

.publication-group {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.publication-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-left: 1.25rem;
}

.doi-link {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.35rem, 4vw, 2.4rem);
  border-color: rgba(47, 111, 115, 0.26);
  background:
    linear-gradient(135deg, rgba(223, 233, 229, 0.92), rgba(255, 255, 255, 0.74)),
    var(--surface);
}

.resource-links {
  align-content: center;
  margin-top: 0;
}

.resource-links .button {
  width: 100%;
}

.cv-panel {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.contact-link {
  color: var(--teal-dark);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 750;
}

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

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

@media (max-width: 900px) {
  .nav {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.75);
  }

  .nav-toggle span:not(.sr-only) {
    width: 1.1rem;
    height: 2px;
    background: var(--ink);
  }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 1rem;
    right: 1rem;
    display: none;
    padding: 1rem;
    align-items: stretch;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero,
  .research-themes .compact,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .portrait-frame {
    justify-self: start;
    width: min(310px, 100%);
  }

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

  .sticky-heading {
    position: static;
  }

  .resource-feature {
    grid-template-columns: 1fr;
  }

  .resource-links .button {
    width: auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .section-shell {
    width: min(100% - 1.25rem, 1180px);
    padding: 4.5rem 0;
  }

  .hero-actions,
  .resource-links {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .site-footer {
    flex-direction: column;
  }
}
