/* Base: edit these colors to change the site's palette. */
:root {
  color-scheme: light;
  --ink: #292e32;
  --muted: #626b70;
  --secondary: #515c62;
  --accent: #285e63;
  --link-hover: #163e42;
  --rule: #e5e8e9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 28px;
}

p {
  margin: 0 0 15px;
}

strong {
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
}

/* Links: one shared treatment for profiles, papers, inline links, and email. */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 16px;
  padding: 6px 12px;
  background: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header: portrait size controls both the image and its grid column. */
.intro {
  --portrait-size: 112px;
  display: grid;
  grid-template-columns: var(--portrait-size) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

h1 {
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.5px;
}

.role {
  margin: 4px 0 1px;
  color: var(--secondary);
}

.location {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: .875rem;
}

.portrait-frame {
  width: var(--portrait-size);
  height: var(--portrait-size);
  overflow: hidden;
  border-radius: 50%;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep the face centered within the circular crop. */
  object-position: center 28%;
  transform: scale(1.8);
  transform-origin: center 28%;
}

.contact-links,
.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 18px;
  font-size: .9375rem;
}

/* Introduction and research interests. */
.about {
  margin-top: 30px;
}

.training {
  margin-bottom: 0;
}

.research-interests {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.7;
}

.interests-label {
  color: var(--ink);
  font-weight: 500;
}

/* Shared section headings. */
section {
  margin-top: 32px;
}

h2 {
  margin-bottom: 17px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 600;
}

/* Publications: title, authors, venue, description, and resource links. */
.publication h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.authors {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.65;
}

.authors strong {
  color: var(--ink);
  font-weight: 650;
}

.venue {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .875rem;
  font-style: italic;
}

.venue strong {
  color: var(--secondary);
  font-weight: 500;
}

.paper-description {
  margin-bottom: 8px;
  font-size: .9375rem;
}

/* Experiences: organization and dates on the left, role and work on the right. */
.entries {
  margin: 0;
}

.entry {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 26px;
  margin-bottom: 20px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry dt {
  font-weight: 600;
  line-height: 1.5;
}

.entry dd {
  margin: 0;
}

.entry dd p {
  margin: 2px 0 0;
  color: var(--secondary);
}

.date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
}

.position {
  display: block;
  font-weight: 500;
}

.secondary-entry dt,
.secondary-entry .position {
  font-weight: 400;
}

/* Footer. */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 36px;
  padding-top: 17px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
}

/* Mobile: smaller portrait and a single column for experiences. */
@media (max-width: 520px) {
  .page {
    padding: 30px 22px 24px;
  }

  .intro {
    --portrait-size: 84px;
    gap: 20px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .role {
    font-size: .9375rem;
    line-height: 1.5;
  }

  .contact-links {
    column-gap: 14px;
    font-size: .875rem;
  }

  .location {
    margin: 3px 0 8px;
  }

  .about {
    margin-top: 25px;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 21px;
  }

  .entry dt {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 3px 10px;
  }

  .date {
    display: inline;
    margin: 0;
    white-space: nowrap;
  }

  footer {
    margin-top: 30px;
  }
}

@media (max-width: 360px) {
  .intro {
    --portrait-size: 68px;
    gap: 17px;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* Print. */
@media print {
  .page {
    max-width: none;
    padding: 0;
  }

  body {
    font-size: 10pt;
  }

  .publication,
  .entry {
    break-inside: avoid;
  }

  .skip-link,
  footer {
    display: none;
  }
}
