:root {
  color-scheme: light dark;
  --bg: #f6f2ea;
  --surface: #fbfaf7;
  --text: #171717;
  --muted: #615f59;
  --line: #d8d1c5;
  --accent: #284a5e;
  --accent-strong: #173447;
  --accent-soft: #e5edf0;
  --link: #234b62;
  --shadow: 0 16px 50px rgba(23, 23, 23, 0.08);
  --max-width: 1120px;
}

[data-theme="dark"] {
  --bg: #171717;
  --surface: #20201f;
  --text: #f5f0e8;
  --muted: #c2bbb0;
  --line: #3a3936;
  --accent: #9fb7c4;
  --accent-strong: #d3e3ea;
  --accent-soft: #243139;
  --link: #bad0dc;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 10;
  transform: translateY(-180%);
  background: var(--text);
  color: var(--bg);
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 2vw, 1.25rem);
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--text);
}

.theme-toggle {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.hero,
.section,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: clamp(4rem, 10vh, 7rem);
  padding-bottom: clamp(4rem, 10vh, 7rem);
}

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

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

h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  max-width: 9ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 760px;
}

h3 {
  font-size: 1.1rem;
}

.dek {
  max-width: 760px;
  margin: 1.35rem 0 1.2rem;
  color: var(--text);
  font-size: clamp(1.28rem, 2.5vw, 1.85rem);
  line-height: 1.35;
}

.hero-copy > p:not(.eyebrow):not(.dek) {
  max-width: 760px;
  color: var(--muted);
}

.actions,
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button,
.pub-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.button.primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--bg);
}

.status-panel {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.status-panel dl {
  margin: 0;
}

.status-panel div + div {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.status-panel dt {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-panel dd {
  margin: 0.15rem 0 0;
  color: var(--text);
}

.section {
  padding-top: clamp(4rem, 9vw, 6.5rem);
  padding-bottom: clamp(4rem, 9vw, 6.5rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

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

.theme-card,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  padding: clamp(1.1rem, 3vw, 1.6rem);
}

.theme-card p,
.timeline-item p,
.pub-note,
.note {
  color: var(--muted);
}

.inline-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.inline-list a {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: var(--accent-soft);
  text-decoration: none;
}

.publication-list {
  padding-left: 1.3rem;
  margin: 0;
}

.publication-list > li + li {
  margin-top: 1.35rem;
}

.publication-list h3 a {
  color: var(--text);
  text-decoration-thickness: 1px;
}

.publication-list p {
  margin: 0.4rem 0 0;
}

.publication-list.compact > li {
  padding-left: 0.25rem;
}

.publication-list.compact > li + li {
  margin-top: 0.75rem;
}

.complete-publications {
  margin-top: clamp(3.5rem, 8vw, 5rem);
}

.complete-publications h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.complete-publications h3 {
  margin: 2.2rem 0 1rem;
  color: var(--accent-strong);
}

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

.timeline-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.timeline-meta p {
  margin: 0;
  font-size: 0.95rem;
}

.contact-heading {
  margin-bottom: 1.35rem;
}

.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.icon-link {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.icon-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.icon-link:hover,
.icon-link:focus-visible {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.button.compact {
  min-height: 2.75rem;
  padding-inline: 1rem;
}

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

.site-footer {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

@media (max-width: 900px) {
  .hero,
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    align-self: auto;
  }

  .timeline-meta {
    display: block;
  }
}

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

  .nav {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
  }

  .nav-links a {
    font-size: 0.88rem;
  }

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

  h1 {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
  }
}
