:root {
  color-scheme: light;
  --paper: #fafaf8;
  --ink: #242923;
  --muted: #646b61;
  --link: #345e47;
  --rule: #dedfd8;
  --font: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

::selection {
  color: var(--ink);
  background: #dfe8dc;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-line: underline;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 5px;
  border-radius: 1px;
}

.page {
  width: min(100% - 3rem, 46rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 8vw, 6.5rem) 2.5rem;
}

.header h1 {
  margin: 0 0 1.1rem;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.065em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
  font-size: 0.8125rem;
}

nav a {
  padding-block: 0.3rem;
  text-decoration: none;
}

.introduction {
  margin-block: 2.25rem 3.25rem;
  max-width: 44rem;
}

.introduction p {
  margin: 0;
}

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

section + section {
  margin-top: 3.5rem;
}

h2 {
  margin: 0 0 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.education-list,
.papers {
  padding: 0;
  margin: 0;
  list-style: none;
}

.education-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.5rem;
  align-items: baseline;
}

.education-list li + li {
  margin-top: 1.25rem;
}

.education-list h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.education-list p,
.dates {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.78125rem;
}

.dates {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.publication-year {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
}

.publication-year + .publication-year {
  margin-top: 2rem;
}

.year {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.78125rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.papers > li + li {
  margin-top: 1.6rem;
}

.papers h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.65;
}

.papers h4 a {
  text-decoration: none;
}

.papers h4 a:hover {
  text-decoration: underline;
}

.authors,
.venue {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.8;
}

.authors strong {
  color: var(--ink);
  font-weight: 500;
}

.venue {
  margin-top: 0.1rem;
}

.distinction {
  color: var(--link);
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 3.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
}

footer a {
  padding-block: 0.3rem;
  text-decoration: none;
}

.back-to-top {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
}

.skip-link:focus {
  top: 1rem;
}

@media (max-width: 540px) {
  .page {
    width: calc(100% - 2.5rem);
    padding-top: 2.75rem;
  }

  .header h1 {
    font-size: 1.75rem;
  }

  nav {
    column-gap: 1.15rem;
  }

  .introduction {
    margin-block: 2rem 2.75rem;
  }

  .education-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .dates {
    margin-top: 0.15rem;
    font-size: 0.75rem;
  }

  .publication-year {
    grid-template-columns: minmax(0, 1fr);
  }

  .year {
    margin-bottom: 0.75rem;
  }

  .publication-year + .publication-year {
    margin-top: 2.25rem;
  }
}

@media print {
  body {
    color: #000;
    background: #fff;
    font-size: 10pt;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  nav,
  .skip-link,
  .back-to-top {
    display: none;
  }

  .introduction,
  section + section,
  footer {
    margin-block: 1.5rem;
  }

  .papers > li {
    break-inside: avoid;
  }

  a {
    color: inherit;
  }
}
