:root {
  color-scheme: light;
  --ink: #20242a;
  --text: #373d45;
  --muted: #535e6a;
  --link: #17558a;
  --line: #e1e5e9;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: white;
  color: var(--ink);
  scroll-padding-top: calc(var(--header-height, 3.25rem + 1px) + 1.25rem);
}

body {
  margin: 0;
  font: 1rem/1.6 system-ui, sans-serif;
}

h1, h2, h3, p, ul {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 680;
  letter-spacing: -0.045em;
}

h2 {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
}

ul {
  padding: 0;
  list-style: none;
}

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

a:hover {
  color: #103e67;
}

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

.skip-link {
  position: fixed;
  z-index: 3;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: white;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(100% - 2.5rem, 54rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: white;
}

.site-header nav {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-header a {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 550;
}

.site-header a:hover,
.site-header a[aria-current="page"] {
  color: var(--ink);
}

.site-header a[aria-current="page"] {
  border-color: var(--link);
  font-weight: 680;
}

.scroll-progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: var(--link);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

main.container {
  padding-block: 2.25rem 3.5rem;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(11.5rem, 30vw, 14rem);
  align-items: center;
  gap: 0.85rem 2rem;
}

.profile p {
  margin-top: 0.7rem;
  color: var(--text);
}

@media (width > 36rem) {
  .portrait {
    grid-area: 1 / 2;
    transform: translateY(1.625rem);
  }
}

.research-highlights {
  margin-top: 0.25rem;
  padding-inline-start: 1.15rem;
  list-style: disc;
  color: var(--text);
}

.research-highlights li + li {
  margin-top: 0.35rem;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
}

.profile-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem clamp(0.85rem, 3vw, 1.6rem);
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  color: var(--ink);
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 550;
}

.profile-links img {
  display: block;
  flex: none;
}

.section {
  margin-top: 2rem;
}

.section h2 {
  margin-bottom: 0.7rem;
}

.home-section {
  margin-top: 2.5rem;
}

.home-section h2 {
  font-size: 1.5rem;
}

.section-heading, .page-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.section-heading {
  margin-bottom: 0.7rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading a, .page-heading a {
  font-size: 0.9375rem;
}

.news-scroll {
  max-block-size: 13.5rem;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border-block: 1px solid var(--line);
}

.news-list li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.1rem 0.75rem;
  min-height: 2.65rem;
  padding: 0.45rem 0.65rem 0.45rem 0;
  color: var(--text);
  font-size: 0.9375rem;
}

.news-date {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.paper-list {
  border-top: 1px solid var(--line);
}

.authors {
  margin-top: 0.15rem;
  color: var(--text);
  font-size: 0.9375rem;
}

.spotlight-highlight {
  color: #b42318;
  font-weight: 700;
}

.paper {
  display: grid;
  grid-template-columns: minmax(0, clamp(6.75rem, 25vw, 8.5rem)) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(0.75rem, 3vw, 1.5rem);
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.paper-venue {
  grid-area: 1 / 1;
}

.venue-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 0.35rem;
  background: #edf3f8;
  color: #285476;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.35;
}

.paper-distinction {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.paper-content {
  grid-area: 1 / 2;
  line-height: 1.5;
}

.paper-content h3 {
  display: inline;
  font-size: 1.0625rem;
  line-height: inherit;
}

.repository-link {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-inline-start: 0.1rem;
  border-radius: 0.25rem;
  vertical-align: middle;
}

.repository-link:hover {
  background: #eef1f4;
}

.repository-link img {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.cv-section {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

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

.cv-entry-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 1rem;
}

.cv-list li > p {
  margin-top: 0.125rem;
  color: var(--text);
  font-size: 0.9375rem;
}

.cv-date {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.cv-list li > .cv-detail {
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 36rem) {
  .container {
    width: calc(100% - 2rem);
  }

  main.container {
    padding-top: 1.5rem;
  }

  .profile {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .profile-links {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-items: center;
  }

  .portrait {
    width: min(100%, 12rem);
    justify-self: center;
  }

  .news-scroll {
    max-block-size: 15rem;
  }

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

  .cv-entry-heading {
    flex-direction: column;
    align-items: start;
  }
}
