:root {
  --ink: #17203a;
  --text: #2b3448;
  --muted: #657085;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #dbe0e8;
  --gold: #c59a28;
  --teal: #0f7c80;
  --rose: #9a3d5f;
  --shadow: 0 22px 60px rgba(23, 32, 58, 0.14);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(15, 124, 128, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 224, 232, 0.85);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(16px);
}

.nav {
  width: calc(100% - 2rem);
  max-width: var(--max-width);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(197, 154, 40, 0.5);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  font-size: 0.82rem;
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(23, 32, 58, 0.08);
}

.brand-text {
  font-size: 0.98rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.45rem, 1vw, 1rem);
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  padding: 0.38rem 0.15rem;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links .nav-cv {
  color: var(--ink);
  border-bottom: 2px solid var(--gold);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 124, 128, 0.08), transparent 34%),
    linear-gradient(45deg, rgba(197, 154, 40, 0.12), transparent 36%),
    var(--paper);
}

.hero-inner {
  width: calc(100% - 2rem);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(2.4rem, 5vw, 4.2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-copy {
  max-width: 730px;
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  color: var(--ink);
  font-size: clamp(3rem, 8vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-title {
  margin: 1.25rem 0 0;
  color: var(--rose);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.hero-lede {
  max-width: 64ch;
  margin: 1.1rem 0 0;
  color: #384257;
  font-size: clamp(1.04rem, 1.45vw, 1.2rem);
  overflow-wrap: anywhere;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-weight: 750;
  text-decoration: none;
  line-height: 1.15;
  overflow-wrap: anywhere;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-secondary {
  background: #fff;
  color: var(--ink);
  border-color: rgba(23, 32, 58, 0.18);
}

.button-plain {
  color: var(--ink);
  border-color: rgba(197, 154, 40, 0.55);
  background: rgba(255, 255, 255, 0.52);
}

.hero-portrait {
  margin: 0;
  position: relative;
  min-width: 0;
}

.hero-portrait img {
  width: min(100%, 430px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(23, 32, 58, 0.12);
  box-shadow: var(--shadow);
}

.hero-portrait figcaption {
  width: min(88%, 340px);
  margin: -1.8rem auto 0;
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(219, 224, 232, 0.9);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  padding: 0.82rem 1rem;
  box-shadow: 0 12px 32px rgba(23, 32, 58, 0.1);
}

.section {
  border-bottom: 1px solid var(--line);
}

.section-inner {
  width: calc(100% - 2rem);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3.2rem, 6vw, 5rem) 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.35fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}

.section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.8rem;
}

.section-heading.compact {
  margin-bottom: 1.1rem;
}

.section-heading p:last-child {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.prose p {
  margin: 0 0 1rem;
  color: #3f495b;
  font-size: 1.02rem;
}

.two-column > *,
.contact-panel > *,
.timeline-item > * {
  min-width: 0;
}

.facts {
  display: grid;
  gap: 0.8rem;
  margin: 1.4rem 0 0;
}

.facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--ink);
  font-weight: 800;
}

.facts dd {
  margin: 0;
  color: var(--muted);
}

.research-section {
  background: #fff;
}

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

.topic-card,
.teaching-list article,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-card {
  min-height: 180px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.topic-card h3,
.teaching-list h3,
.timeline-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.topic-card p,
.teaching-list p,
.timeline-item p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.topic-card:nth-child(1) {
  border-top: 4px solid var(--gold);
}

.topic-card:nth-child(2) {
  border-top: 4px solid var(--teal);
}

.topic-card:nth-child(3) {
  border-top: 4px solid var(--rose);
}

.topic-card:nth-child(4) {
  border-top: 4px solid #60794f;
}

.topic-card:nth-child(5) {
  border-top: 4px solid #4972a2;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.1rem;
}

.timeline-date {
  color: var(--teal);
  font-weight: 850;
}

.meta {
  color: #7a6270;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  margin-top: 0.3rem;
  color: var(--teal);
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.teaching-section,
.contact-section {
  background: #fff;
}

.teaching-list {
  display: grid;
  gap: 0.9rem;
}

.teaching-list article {
  padding: 1.1rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.contact-panel p {
  max-width: 58ch;
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer {
  width: calc(100% - 2rem);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .nav {
    min-height: 96px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 0.8rem 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-inner,
  .two-column,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-portrait img {
    width: min(100%, 380px);
  }

  .research-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .nav {
    width: calc(100% - 2.5rem);
    max-width: var(--max-width);
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 0.45rem 1rem;
    font-size: 0.86rem;
    overflow: hidden;
  }

  .hero-inner,
  .section-inner,
  .site-footer {
    width: calc(100% - 2.5rem);
    max-width: var(--max-width);
  }

  .hero h1 {
    font-size: clamp(2.35rem, 13vw, 3rem);
    line-height: 1;
    max-width: 7.6ch;
  }

  .eyebrow,
  .hero-title,
  .hero-lede,
  .hero-actions {
    max-width: 20rem;
  }

  .hero-portrait img {
    width: min(100%, 20rem);
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .research-grid,
  .facts div,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: auto;
  }

  .timeline-date {
    font-size: 0.9rem;
  }
}
