:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-muted: #eeeee8;
  --text: #1d1f22;
  --muted: #4f555a;
  --soft-muted: #6c7277;
  --line: #d9d8d0;
  --accent: #0f766e;
  --accent-dark: #134e4a;
  --shadow: 0 18px 60px rgba(29, 31, 34, 0.09);
  --max-width: 1040px;
}

body[data-theme="dark"] {
  --bg: #161819;
  --surface: #202326;
  --surface-muted: #24282b;
  --text: #f1eee7;
  --muted: #c8c2b8;
  --soft-muted: #9f9990;
  --line: #363a3d;
  --accent: #5eead4;
  --accent-dark: #8ee7db;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(247, 245, 240, 0)),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

body[data-theme="dark"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(22, 24, 25, 0)),
    var(--bg);
}

a {
  color: inherit;
  text-decoration-color: rgba(15, 118, 110, 0.35);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
}

.theme-toggle {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

main {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  min-height: auto;
  padding: 54px 0 64px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 500;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 500;
}

h3 {
  font-size: 1.1rem;
}

.lead {
  max-width: 630px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .publication-teaser {
  background: rgba(255, 255, 255, 0.04);
}

.icon-button:hover {
  border-color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: currentColor;
}

.portrait {
  position: relative;
  margin: 0;
}

.portrait::before {
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--line);
  content: "";
}

.portrait img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.section {
  padding: 58px 0;
  border-top: 1px solid var(--line);
}

.two-column {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.prose {
  color: var(--muted);
  font-size: 1rem;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text);
}

.hero-bio {
  max-width: 670px;
  margin-top: 18px;
}

.hero-bio p {
  margin: 0 0 10px;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.news-list,
.publication-list {
  display: grid;
  gap: 8px;
}

.news-item,
.publication-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.news-item {
  padding: 9px 0;
  border-top: 0;
}

.publication-item.has-teaser {
  grid-template-columns: 78px 180px minmax(0, 1fr);
}

.news-item:first-child,
.publication-item:first-child {
  border-top: 0;
}

.date,
.pub-meta {
  color: var(--soft-muted);
  font-size: 0.92rem;
}

.pub-meta {
  font-weight: 700;
}

.news-content p,
.publication-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.publication-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 720;
}

.publication-authors {
  margin-top: 7px;
  color: var(--text);
}

.publication-authors strong {
  font-weight: 760;
}

.publication-authors sup {
  margin-left: 3px;
  color: var(--accent-dark);
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: super;
}

.author-note {
  margin-top: 3px;
  color: var(--soft-muted);
  font-size: 0.86rem;
}

.publication-venue {
  font-style: italic;
}

.publication-teaser {
  display: block;
  align-self: start;
  overflow: hidden;
  width: 180px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.56);
  text-decoration: none;
}

.publication-teaser img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.publication-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.publication-links a:hover {
  border-color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
}

.gallery-carousel {
  position: relative;
}

.gallery-viewport {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.gallery-track {
  display: flex;
  transition: transform 420ms ease;
}

.gallery-slide {
  flex: 0 0 50%;
  margin: 0;
  padding: 0 8px;
}

.gallery-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery-slide figcaption {
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: center;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transform: translateY(-50%);
}

.gallery-nav:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.gallery-nav.prev {
  left: 12px;
}

.gallery-nav.next {
  right: 12px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}

.gallery-dot.is-active {
  background: var(--accent);
}

.publication-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.filter.is-active {
  border-color: var(--accent);
  background: rgba(15, 118, 110, 0.09);
  color: var(--accent-dark);
}

.contact-row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.contact-label::after {
  content: ":";
}

.contact-label {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.is-hidden {
  display: none;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }


  .hero,
  .two-column,
  .news-item,
  .publication-item,
  .publication-item.has-teaser {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 32px 0 50px;
  }

  .portrait {
    max-width: 360px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .publication-controls {
    justify-content: flex-start;
  }

  .news-item,
  .publication-item {
    gap: 8px;
  }

  .publication-teaser {
    width: min(100%, 260px);
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, var(--max-width));
  }

  h1 {
    font-size: 2.85rem;
  }

  .section {
    padding: 46px 0;
  }

  .contact-row {
    width: 100%;
  }

  .gallery-slide img {
    aspect-ratio: 4 / 3;
  }

  .gallery-slide {
    flex-basis: 100%;
    padding: 0;
  }

  .gallery-nav {
    width: 34px;
    height: 34px;
  }
}
