:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-strong: #f4efe7;
  --ink: #18222d;
  --muted: #5d6670;
  --line: #ded8cd;
  --teal: #16737c;
  --teal-dark: #0e4f57;
  --burgundy: #8d2f4d;
  --green: #4f7a52;
  --gold: #b7842e;
  --shadow: 0 18px 45px rgba(24, 34, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.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;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 160ms ease;
}

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

.site-header {
  background: #111821;
}

.nav-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
  padding: 0.75rem max(1.25rem, calc((100vw - 1160px) / 2));
  color: #fff;
  background: rgba(17, 24, 33, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark,
.person-avatar {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.2;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}

.nav-links a {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: transparent;
  color: #fff;
}

.hero {
  position: relative;
  min-height: 41rem;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(11, 17, 24, 0.88), rgba(11, 17, 24, 0.54) 46%, rgba(11, 17, 24, 0.18)),
    linear-gradient(0deg, rgba(11, 17, 24, 0.74), rgba(11, 17, 24, 0.08) 54%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 10rem 0 5.5rem;
}

.kicker,
.section-label {
  margin: 0 0 0.65rem;
  color: var(--burgundy);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.hero .kicker {
  color: #f3cf84;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

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

h1 {
  max-width: 12ch;
  font-size: 3.35rem;
}

h2 {
  font-size: 2.15rem;
}

h3 {
  font-size: 1.08rem;
}

.hero-summary {
  max-width: 42rem;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

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

.button {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 760;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  background: var(--gold);
  color: #12100c;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.section {
  padding: 5rem 0;
  background: var(--paper);
}

.section[id] {
  scroll-margin-top: 5rem;
}

.band-light {
  background: #fff;
}

.band-warm {
  background: var(--surface-strong);
}

.section-inner {
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.two-column,
.contact-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 3rem;
  align-items: start;
}

.section-heading,
.publication-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.flow p {
  margin: 0;
}

.flow p + p {
  margin-top: 1rem;
}

.flow a,
.quick-facts a {
  color: var(--teal-dark);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.8rem 0 0;
}

.quick-facts div,
.interest-card,
.person-card,
.teaching-list article,
.publication-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quick-facts div {
  padding: 1rem;
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 0.35rem 0 0;
  font-weight: 700;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.8rem, 1fr));
  gap: 1rem;
}

.interest-card {
  padding: 1.25rem;
  border-top: 4px solid var(--teal);
}

.interest-card:nth-child(2) {
  border-top-color: var(--burgundy);
}

.interest-card:nth-child(3) {
  border-top-color: var(--green);
}

.interest-card:nth-child(4) {
  border-top-color: var(--gold);
}

.interest-card:nth-child(5) {
  border-top-color: var(--teal-dark);
}

.interest-card p,
.person-card p,
.teaching-list p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.publication-count {
  min-width: 11rem;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.publication-toolbar {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1.15rem;
}

.search-box {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filter-group {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.filter-button {
  min-width: 4.8rem;
  min-height: 2.35rem;
  padding: 0 0.72rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.filter-button.active {
  background: var(--teal-dark);
  color: #fff;
}

.select-label {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 760;
}

.select-label select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}

.publication-list {
  display: grid;
  gap: 0.9rem;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: pubs;
}

.publication-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.15rem;
  box-shadow: 0 8px 24px rgba(24, 34, 45, 0.05);
  counter-increment: pubs;
}

.publication-index {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 8px;
  background: #eaf5f4;
  color: var(--teal-dark);
  font-weight: 850;
}

.publication-index::before {
  content: counter(pubs, decimal-leading-zero);
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.48rem;
  border-radius: 999px;
  background: #f2ebe1;
  color: #624826;
  font-size: 0.76rem;
  font-weight: 800;
}

.tag.type-preprint {
  background: #f8e9ee;
  color: var(--burgundy);
}

.tag.type-book {
  background: #ecf4ec;
  color: var(--green);
}

.tag.type-chapter {
  background: #fff3db;
  color: #7a4f11;
}

.tag.type-thesis {
  background: #eef0fb;
  color: #384377;
}

.publication-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.28;
}

.authors,
.venue {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.publication-link,
.publication-copy {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 760;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.publication-link:hover,
.publication-link:focus-visible,
.publication-copy:hover,
.publication-copy:focus-visible {
  border-color: var(--teal);
  color: var(--teal-dark);
  outline: none;
}

.publication-copy {
  border-color: #c9dbd8;
}

.empty-state {
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 1rem 0 0;
  color: var(--muted);
  text-align: center;
}

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

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

.teaching-list ul {
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

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

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

.people-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.15rem;
}

.people-panel h3 {
  margin-bottom: 0.85rem;
}

.people-list {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.people-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #eee7dd;
}

.people-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.people-list a {
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.people-note {
  margin: 0;
  color: var(--muted);
}

.person-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
}

.person-avatar {
  background: var(--burgundy);
}

.person-card:nth-child(2) .person-avatar {
  background: var(--teal);
}

.person-card:nth-child(3) .person-avatar {
  background: var(--green);
}

.person-card:nth-child(4) .person-avatar {
  background: var(--gold);
  color: #17120a;
}

.contact-section {
  background: #14202a;
  color: #fff;
}

.contact-section .section-label {
  color: #f3cf84;
}

.contact-section p {
  color: rgba(255, 255, 255, 0.76);
}

.contact-actions {
  display: grid;
  gap: 0.75rem;
}

.contact-link {
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem max(1.25rem, calc((100vw - 1160px) / 2));
  background: #0e151d;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #fff;
  font-weight: 760;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  max-width: min(26rem, calc(100% - 2.5rem));
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(17, 24, 33, 0.97);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    justify-content: flex-start;
  }

  .hero {
    min-height: 38rem;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .two-column,
  .contact-grid,
  .publication-toolbar {
    grid-template-columns: 1fr;
  }

  .quick-facts,
  .interest-grid,
  .people-grid,
  .people-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .publication-count {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    min-height: 4rem;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 36rem;
  }

  .hero-content {
    width: min(100% - 2rem, 1160px);
    padding: 7rem 0 3.5rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.58rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-inner {
    width: min(100% - 2rem, 1160px);
  }

  .quick-facts,
  .interest-grid,
  .people-grid,
  .people-columns {
    grid-template-columns: 1fr;
  }

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

  .filter-button {
    min-width: 0;
  }

  .publication-item {
    grid-template-columns: 1fr;
  }

  .publication-index {
    width: 2.35rem;
    height: 2.35rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
