:root {
  color-scheme: light;
  --background: #fafafa;
  --surface: #f1f2f4;
  --text: #1d1d1f;
  --body: #55555b;
  --muted: #68686d;
  --line: #dedee2;
  --accent: #0066cc;
  --accent-dark: #004a99;
  --content-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  border-radius: 3px;
}

::selection {
  background: #cfe5fc;
  color: var(--text);
}

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

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.shell {
  width: min(var(--content-width), calc(100% - 96px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 16px;
  padding: 12px;
  background: white;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(0 0 0 / 6.5%);
  background: rgb(250 250 250 / 86%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.wordmark {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.wordmark span,
h1 span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a,
.contact-pill {
  color: #424246;
  font-size: 0.875rem;
}

.contact-pill {
  padding: 7px 16px;
  border-radius: 24px;
  background: #ededf0;
  white-space: nowrap;
}

.contact-pill span {
  padding-left: 3px;
}

.site-header a,
.hero a,
.site-footer a {
  text-decoration: none;
}

.site-header a,
.hero-copy > p a,
.hero-links a,
.site-footer a {
  transition: color 180ms ease, background-color 180ms ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  align-items: start;
  gap: 72px;
  min-height: 520px;
  padding-top: 56px;
  padding-bottom: 48px;
}

h1 {
  margin-left: -4px;
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.06em;
}

.hero-copy > p {
  color: var(--body);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-copy > p:first-of-type {
  margin-top: 27px;
}

.hero-copy > p + p {
  margin-top: 18px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 31px;
}

.hero-links a {
  font-size: 0.9375rem;
  white-space: nowrap;
}

.hero-links .primary-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 22px;
  border-radius: 30px;
  background: #0071e3;
  color: white;
  font-size: 0.875rem;
  transition: background 200ms ease, transform 200ms ease;
}

.hero-links .primary-link:hover,
.hero-links .primary-link:focus-visible {
  background: #0077ed;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
}

.contact-pill span,
.hero-links span,
.site-footer a span {
  display: inline-block;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.portrait {
  width: 100%;
  max-width: 300px;
  margin-top: 8px;
  justify-self: end;
}

.portrait img {
  display: block;
  width: 100%;
  height: 300px;
  border-radius: 10px;
  object-fit: cover;
  object-position: 59% 50%;
}

.section {
  padding-block: 48px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.section-tinted {
  padding-block: 64px;
  background: var(--surface);
}

.section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.publications-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.publications-heading > a {
  padding-bottom: 4px;
  font-size: 0.9375rem;
  white-space: nowrap;
}

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

.paper-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}

.paper-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 55px 32px 12px;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: contain;
}

.paper-badge {
  position: absolute;
  top: 22px;
  left: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.paper-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 27px 32px 34px;
}

.paper-topic {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.5;
}

.paper-copy h3 {
  margin-top: 15px;
  font-size: 1.25rem;
  font-weight: 550;
  letter-spacing: -0.018em;
  line-height: 1.4;
}

.paper-copy h3 a {
  color: var(--text);
}

.paper-copy h3 a:hover,
.paper-copy h3 a:focus-visible {
  color: var(--accent);
}

.paper-authors {
  margin-top: 17px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.paper-authors strong {
  color: #414146;
  font-weight: 600;
}

.paper-venue {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
  color: #c5c5c9;
  font-size: 0.875rem;
}

.paper-summary {
  margin-top: 17px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.resume-list {
  min-width: 0;
}

.resume-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 24px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
}

.resume-item:first-child {
  padding-top: 0;
}

.resume-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.resume-item h3 {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.5;
}

.resume-item h3 a {
  color: var(--text);
}

.resume-item p {
  font-size: 1rem;
  line-height: 1.75;
}

.resume-item .date {
  color: var(--body);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.site-footer {
  margin-top: 48px;
  padding-top: 40px;
  background: #ededf0;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 35px;
}

.site-footer h2 {
  font-size: 1.75rem;
}

.site-footer a {
  color: var(--accent);
}

.email {
  font-size: 1.125rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-block: 25px;
  border-top: 1px solid #d4d4d9;
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.footer-bottom a {
  color: var(--body);
}

@media (hover: hover) and (pointer: fine) {
  .site-header a:hover {
    color: var(--accent);
  }

  .contact-pill:hover {
    background: #e2e8ef;
  }

  .hero-copy > p a:hover,
  .hero-links a:not(.primary-link):hover,
  .resume-item h3 a:hover,
  .site-footer a:hover {
    color: var(--accent-dark);
  }

  .contact-pill:hover span,
  .hero-links a:hover span,
  .site-footer a:hover span {
    transform: translate(3px, -3px);
  }
}

@media (max-width: 1000px) {
  .shell {
    width: calc(100% - 64px);
  }

  .hero {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 35px;
  }

  .hero-links {
    gap: 16px;
  }

  .paper-copy {
    padding-inline: 25px;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 116px;
  }

  .shell {
    width: calc(100% - 40px);
  }

  .nav {
    flex-wrap: wrap;
    gap: 0 16px;
    height: auto;
    min-height: 90px;
    padding-block: 12px 10px;
  }

  .wordmark {
    font-size: 1.25rem;
  }

  .contact-pill {
    margin-left: auto;
    padding: 5px 12px;
    font-size: 0.8125rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
  }

  .nav-links a {
    font-size: 0.8125rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: 0;
    padding-top: 36px;
    padding-bottom: 32px;
  }

  h1 {
    margin-left: -3px;
    font-size: clamp(2.5rem, 9vw, 3rem);
  }

  .hero-links {
    gap: 21px;
    margin-top: 25px;
  }

  .hero-links .primary-link {
    padding: 11px 18px;
  }

  .hero-links a {
    font-size: 0.875rem;
  }

  .portrait {
    max-width: 260px;
    margin-top: 0;
    justify-self: center;
  }

  .portrait img {
    height: 260px;
  }

  .section {
    padding-block: 36px;
  }

  .section-tinted {
    padding-block: 40px;
  }

  .section-inner {
    gap: 24px;
  }

  .publications-heading {
    display: block;
    margin-bottom: 28px;
  }

  .publications-heading > a {
    display: inline-block;
    margin-top: 18px;
  }

  .paper-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .paper-figure {
    padding: 54px 22px 8px;
  }

  .paper-figure img {
    height: 205px;
  }

  .paper-copy {
    padding: 25px 24px 30px;
  }

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

  .resume-item .date {
    text-align: left;
  }

  .site-footer {
    margin-top: 32px;
    padding-top: 36px;
  }

  .footer-top {
    gap: 26px;
    padding-bottom: 40px;
  }

  .site-footer h2 {
    font-size: 1.5rem;
  }

  .email {
    overflow-wrap: anywhere;
    font-size: 1rem;
  }

  .footer-bottom {
    font-size: 0.75rem;
  }

  .footer-meta {
    gap: 19px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .primary-link,
  .contact-pill span,
  .hero-links span,
  .site-footer a span {
    transform: none !important;
  }
}

@media print {
  .site-header,
  .hero-links,
  .site-footer,
  .skip-link {
    display: none;
  }

  .shell {
    width: 100%;
  }

  .hero,
  .section,
  .section-tinted {
    padding-block: 20px;
  }
}
