:root {
  color-scheme: light;
  --text: #232a31;
  --muted: #66717c;
  --link: #125fa8;
  --link-hover: #0a447d;
  --line: #e6e9ec;
  --surface: #f7f8f9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  border-radius: 2px;
  outline: 3px solid rgba(18, 95, 168, 0.24);
  outline-offset: 3px;
}

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

p {
  margin: 0 0 0.9rem;
}

.site-shell {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 56px;
  align-items: center;
  padding: 72px 0 44px;
}

h1,
h2,
h3 {
  color: #171c21;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.42;
}

h3 a {
  color: #162f48;
}

h3 a:hover {
  color: var(--link);
}

.portrait {
  margin: 0;
}

.portrait img {
  width: 230px;
  height: 230px;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.55rem;
  margin-top: 1.2rem;
  font-size: 0.9rem;
}

.profile-links a {
  white-space: nowrap;
}

.link-separator {
  color: #b0b7bd;
  pointer-events: none;
  text-decoration: none;
}

main > section {
  padding: 24px 0 30px;
}

.section-copy {
  margin-top: 1.1rem;
}

.updates-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.updates-list li {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.42rem 0;
}

.updates-list time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 620;
  white-space: nowrap;
}

.updates-list p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.publication-list {
  margin-top: 0.8rem;
}

.publication {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.publication-media {
  display: flex;
  width: 180px;
  height: 138px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.publication-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.authors,
.venue,
.paper-links,
.summary {
  margin-bottom: 0.35rem;
}

.authors,
.venue {
  font-size: 0.88rem;
  line-height: 1.5;
}

.venue {
  color: var(--muted);
}

.venue-secondary {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.82rem;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.42rem 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 620;
}

.thumbnail-trigger,
.thumbnail-separator {
  display: none;
}

.thumbnail-trigger,
.thumbnail-dialog-close {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  font: inherit;
  cursor: pointer;
}

.thumbnail-trigger:hover,
.thumbnail-dialog-close:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.thumbnail-trigger:focus-visible,
.thumbnail-dialog-close:focus-visible {
  border-radius: 2px;
  outline: 3px solid rgba(18, 95, 168, 0.24);
  outline-offset: 3px;
}

.summary {
  color: #3d474f;
  font-size: 0.9rem;
  line-height: 1.56;
}

sup {
  line-height: 0;
}

footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

footer p {
  margin: 0;
}

.thumbnail-dialog {
  width: min(92vw, 960px);
  max-width: none;
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(23, 28, 33, 0.24);
}

.thumbnail-dialog::backdrop {
  background: rgba(23, 28, 33, 0.62);
}

.thumbnail-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.thumbnail-dialog-header p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 620;
  line-height: 1.45;
}

.thumbnail-dialog-close {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 620;
}

.thumbnail-dialog-image {
  display: grid;
  max-height: calc(90dvh - 62px);
  place-items: center;
  overflow: auto;
  padding: 16px;
}

.thumbnail-dialog-image img {
  width: auto;
  max-width: 100%;
  max-height: calc(90dvh - 94px);
  object-fit: contain;
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 32px, 620px);
  }

  .hero {
    grid-template-columns: clamp(54px, 16vw, 72px) minmax(0, 1fr);
    column-gap: clamp(12px, 3.5vw, 18px);
    row-gap: 0;
    align-items: center;
    padding: 44px 0 28px;
  }

  .hero-copy {
    display: contents;
  }

  .hero h1 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: clamp(1.05rem, 5.8vw, 1.75rem);
    white-space: nowrap;
  }

  .hero-copy > p,
  .profile-links {
    grid-column: 1 / -1;
  }

  .hero-copy > h1 + p {
    margin-top: 1.4rem;
  }

  .portrait {
    grid-column: 1;
    grid-row: 1;
  }

  .portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  main > section {
    padding: 20px 0 25px;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 24px 0;
  }

  .publication > div {
    display: block;
  }

  .publication-media {
    display: none;
  }

  .thumbnail-trigger,
  .thumbnail-separator {
    display: inline;
  }

  .thumbnail-dialog {
    width: calc(100% - 24px);
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 0.35rem;
  }

  .updates-list li {
    grid-template-columns: 1fr;
    gap: 0.12rem;
    padding: 0.75rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
