:root {
  --accent: #1f5f8b;
  --accent-dark: #164867;
  --text: #33383d;
  --muted: #65707a;
  --rule: #e4e8eb;
  --background: #fff;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(100% - 40px, 860px);
  margin: 0 auto;
  padding: 48px 0 24px;
}

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

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

a:focus-visible {
  border-radius: 2px;
  outline: 3px solid rgb(31 95 139 / 28%);
  outline-offset: 3px;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: #22272b;
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 14px;
  color: #252a2e;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
}

.profile-copy > p {
  margin-bottom: 18px;
}

.profile-copy > p.job-market {
  color: #a12f2b;
  font-weight: 700;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.profile-links span {
  color: #abb2b8;
}

.profile-links .email {
  color: var(--accent);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 7%);
}

section {
  margin-bottom: 46px;
}

.publication-list {
  border-top: 1px solid var(--rule);
}

.publication {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

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

.publication-thumbnail {
  width: 160px;
  height: 110px;
  border-radius: 4px;
  object-fit: cover;
}

.publication h3 {
  margin-bottom: 5px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}

.authors,
.venue,
.paper-links {
  margin-bottom: 2px;
}

.venue {
  color: #444a50;
  font-style: italic;
}

.distinction {
  color: #9b3b37;
  font-style: normal;
  font-weight: 700;
}

sup {
  font-size: 0.7em;
  line-height: 0;
}

footer {
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 30px, 860px);
    padding-top: 30px;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 40px;
  }

  .profile-copy {
    order: 2;
  }

  .profile-photo {
    order: 1;
    width: min(100%, 220px);
    margin: 0 auto;
  }

  h1 {
    text-align: center;
  }

  .profile-links {
    justify-content: center;
  }

  section {
    margin-bottom: 38px;
  }

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

  .publication-thumbnail {
    width: min(100%, 240px);
    height: auto;
    aspect-ratio: 16 / 11;
  }

  footer {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
