:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --paper: #fffefb;
  --ink: #171a1f;
  --muted: #656b73;
  --quiet: #8b9097;
  --line: #ded9cf;
  --line-strong: #c8c0b2;
  --accent: #163b64;
  --accent-soft: #eef3f7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(23, 26, 31, 0.026) 1px, transparent 1px);
  background-size: 100% 1.72rem;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(22, 59, 100, 0.28);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(222, 217, 207, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

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

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

.layout {
  display: grid;
  grid-template-columns: minmax(13rem, 16rem) minmax(0, 52rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0 5rem;
}

.profile {
  position: sticky;
  top: 6rem;
  align-self: start;
  display: grid;
  gap: 1.1rem;
}

.profile-photo {
  width: min(100%, 11.5rem);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  padding: 0.35rem;
  background: var(--paper);
}

.profile h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.65rem);
  line-height: 1;
  letter-spacing: 0;
}

.role,
.intro p,
.timeline span,
.paper p {
  color: var(--muted);
}

.role {
  margin: 0.55rem 0 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.quick-links a,
.paper-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.95rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.quick-links a:hover,
.paper-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.content {
  display: grid;
  gap: clamp(2.2rem, 4.5vw, 3.5rem);
}

.intro {
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.intro h2,
.section-heading h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.intro p {
  max-width: 68ch;
}

.intro p:first-of-type {
  margin-top: 1rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--quiet);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading {
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 0.65rem;
  text-align: left;
}

.section-heading h2 {
  font-size: clamp(1.28rem, 2.4vw, 1.65rem);
}

.section-note {
  margin: 0 0 1rem;
  color: var(--muted);
}

.paper-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: papers;
}

.paper {
  position: relative;
  padding: 1rem 0 1rem 2.8rem;
  border-bottom: 1px solid var(--line);
}

.paper::before {
  position: absolute;
  top: 1.05rem;
  left: 0;
  width: 1.55rem;
  color: var(--quiet);
  content: counter(papers, decimal-leading-zero);
  counter-increment: papers;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 850;
}

.paper h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.paper p {
  margin: 0.18rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.paper-link {
  margin-top: 0.65rem;
  margin-right: 0.4rem;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.paper-actions {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.paper-actions .paper-link {
  margin-top: 0;
  margin-right: 0;
  line-height: 1.2;
}

details {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.paper-erratum {
  margin-top: 0;
  margin-right: 0;
}

summary {
  cursor: pointer;
  color: var(--accent);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

.paper-erratum summary {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 0;
  list-style: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.paper-erratum summary::-webkit-details-marker {
  display: none;
}

.paper-erratum summary::marker {
  content: "";
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

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

.timeline li {
  padding-left: 0.9rem;
  border-left: 2px solid var(--line-strong);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  line-height: 1.32;
  font-size: 0.98rem;
}

.timeline span {
  margin-top: 0.18rem;
  font-size: 0.94rem;
  line-height: 1.5;
}

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

.topic-layout {
  width: min(100% - 2rem, 62rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0 5rem;
}

.page-intro {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.02;
}

.page-intro p {
  max-width: 62ch;
  color: var(--muted);
}

.topic-group {
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .topic-layout {
    padding-top: 2rem;
  }

  .profile {
    position: static;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .profile-photo {
    width: 7.5rem;
  }

  .profile h1 {
    font-size: clamp(1.9rem, 10vw, 2.8rem);
  }

  .quick-links {
    grid-column: 1 / -1;
  }

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

  .awards-list,
  .experience-list {
    grid-template-columns: 1fr;
  }
}

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

  .layout {
    width: min(100% - 1.2rem, 78rem);
  }

  .topic-layout {
    width: min(100% - 1.2rem, 78rem);
  }

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

  .profile-photo {
    width: 9.5rem;
  }

  .paper {
    padding: 0.9rem 0;
  }

  .paper::before {
    position: static;
    display: block;
    margin-bottom: 0.35rem;
  }
}
