:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1f1f1f;
  --muted: #6e6e73;
  --accent: #1f3c66;
  --link: #1d4f91;
  --rule: #d0d0d0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1d;
    --text: #e6e6e6;
    --muted: #a3a3ab;
    --accent: #a8bfe6;
    --link: #8fb4f5;
    --rule: #3d3d42;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.page {
  max-width: 54rem;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2rem;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
}

/* Header */

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

h1 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: normal;
  line-height: 1.15;
  color: var(--accent);
}

h1 a {
  color: inherit;
}

.links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.links a {
  color: var(--text);
}

.links a:hover,
.links a:focus-visible {
  color: var(--link);
}

.links svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.address {
  margin: 0.55rem 0 0;
  font-family: Monaco, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Bio */

.bio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 2rem;
  align-items: start;
  margin-top: 1.9rem;
}

.bio p {
  margin: 0 0 0.9rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

.photo {
  display: block;
  width: 100%;
  height: auto;
}

.mono {
  font-family: Monaco, monospace;
  font-size: 0.88em;
}

/* Selected papers */

.papers {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

h2 {
  margin: 0 0 0.3rem;
  font-size: 1.45rem;
  font-weight: normal;
  color: var(--accent);
}

.note {
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.paper-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.paper-list li {
  margin-bottom: 1.4rem;
}

.paper-title {
  font-weight: bold;
}

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

.paper-link {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.paper-link:hover,
.paper-link:focus-visible {
  color: var(--link);
  text-decoration: underline;
}

/* Footer */

footer {
  margin-top: 3rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}

.not-found {
  margin-top: 1.9rem;
}

@media (max-width: 40rem) {
  .page {
    padding-top: 1.75rem;
  }

  h1 {
    font-size: 1.8rem;
  }

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

  .photo {
    order: -1;
    max-width: 20rem;
  }
}
