:root {
  color-scheme: light dark;
  --font-sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --bg: #f5f0e7;
  --bg-elevated: rgba(255, 252, 247, 0.74);
  --bg-strong: rgba(255, 252, 247, 0.9);
  --text: #181512;
  --muted: #6d6358;
  --border: rgba(24, 21, 18, 0.11);
  --shadow: 0 18px 60px rgba(39, 31, 23, 0.08);
  --accent: #9b6b3e;
  --accent-soft: rgba(155, 107, 62, 0.12);
  --hero-glow: radial-gradient(circle at top right, rgba(181, 140, 94, 0.16), transparent 34%);
  --page-gradient:
    radial-gradient(circle at top left, rgba(224, 198, 166, 0.32), transparent 34%),
    radial-gradient(circle at bottom right, rgba(189, 161, 120, 0.18), transparent 38%);
}

:root[data-theme="dark"] {
  --bg: #171412;
  --bg-elevated: rgba(29, 25, 22, 0.8);
  --bg-strong: rgba(24, 21, 18, 0.95);
  --text: #f2ece3;
  --muted: #b4a99d;
  --border: rgba(242, 236, 227, 0.1);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  --accent: #d0a16e;
  --accent-soft: rgba(208, 161, 110, 0.12);
  --hero-glow: radial-gradient(circle at top right, rgba(208, 161, 110, 0.14), transparent 34%);
  --page-gradient:
    radial-gradient(circle at top left, rgba(117, 89, 59, 0.28), transparent 30%),
    radial-gradient(circle at bottom right, rgba(66, 52, 39, 0.3), transparent 40%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171412;
    --bg-elevated: rgba(29, 25, 22, 0.8);
    --bg-strong: rgba(24, 21, 18, 0.95);
    --text: #f2ece3;
    --muted: #b4a99d;
    --border: rgba(242, 236, 227, 0.1);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    --accent: #d0a16e;
    --accent-soft: rgba(208, 161, 110, 0.12);
    --hero-glow: radial-gradient(circle at top right, rgba(208, 161, 110, 0.14), transparent 34%);
    --page-gradient:
      radial-gradient(circle at top left, rgba(117, 89, 59, 0.28), transparent 30%),
      radial-gradient(circle at bottom right, rgba(66, 52, 39, 0.3), transparent 40%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 24%),
    var(--page-gradient),
    var(--bg);
  color: var(--text);
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.14), transparent 62%);
  opacity: 0.25;
}

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

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

.page-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.wordmark {
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.theme-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.theme-button:hover,
.theme-button:focus-visible {
  color: var(--text);
  outline: none;
}

.theme-button.is-active {
  background: var(--bg-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 24px;
  padding: 42px 0 26px;
}

.hero-copy,
.hero-panel,
.publication-card,
.interest-card,
.note-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy {
  padding: 40px;
  background:
    var(--hero-glow),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 70%),
    var(--bg-elevated);
}

.publication-meta {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--muted);
}

h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h2 {
  font-family: var(--font-serif);
}

.hero-title {
  font-size: clamp(2.9rem, 6vw, 5.6rem);
  line-height: 0.94;
  max-width: 12ch;
}

.hero-text,
.prose p,
.interest-card p,
.publication-summary,
.timeline-content p,
.note-card,
.site-footer {
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-text {
  max-width: 56ch;
  margin: 24px 0 0;
}

.hero-panel {
  padding: 28px;
  align-self: end;
}

.panel-strong {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.panel-muted {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.hero-links a,
.publication-links a,
.secondary-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--bg-strong);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.hero-links a:hover,
.publication-links a:hover,
.secondary-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.section {
  padding: 32px 0;
}

.section-divider {
  border-top: 1px solid var(--border);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(50px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
}

.section-heading {
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1;
}

.prose p {
  margin: 0 0 18px;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.interest-card {
  padding: 24px;
}

.interest-card h3,
.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.publication-list {
  display: grid;
  gap: 18px;
}

.publication-card {
  padding: 26px;
}

.featured-publication {
  background:
    linear-gradient(135deg, rgba(155, 107, 62, 0.08), transparent 46%),
    var(--bg-elevated);
}

.publication-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.publication-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.1;
}

.publication-authors {
  margin: 14px 0 0;
  color: var(--text);
  font-weight: 600;
}

.publication-summary {
  margin: 12px 0 0;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-year {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-content p {
  margin: 0;
}

.inline-emphasis {
  color: var(--text);
  font-weight: 700;
}

.note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.note-card-copy {
  min-width: 0;
}

.compact-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.9;
}

.video-snapshot {
  display: block;
  position: relative;
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-strong);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.video-snapshot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-snapshot:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

@media (max-width: 920px) {
  .note-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .video-snapshot {
    width: min(300px, 100%);
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 32px 0 12px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .site-header,
  .hero,
  .two-column,
  .section-heading,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    display: grid;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

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

  .timeline-item {
    gap: 8px;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 1120px);
    padding-top: 10px;
  }

  .site-header,
  .hero-copy,
  .hero-panel,
  .publication-card,
  .interest-card,
  .note-card {
    border-radius: 22px;
  }

  .site-header,
  .hero-copy,
  .hero-panel,
  .publication-card,
  .interest-card,
  .note-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-copy {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .hero-panel,
  .publication-card,
  .interest-card,
  .note-card {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .theme-switcher {
    justify-content: space-between;
    width: 100%;
  }

  .theme-button {
    flex: 1 1 0;
  }
}
