@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --ink: #172e38;
  --text: #354a54;
  --muted: #536773;
  --accent: #09675e;
  --rule: #dbe4e6;
  --surface: #f5f8f8;
  --serif: "Source Serif 4", Georgia, serif;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 1.0625rem/1.55 "Source Sans 3", "Segoe UI", sans-serif;
}

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

h1, h2, h3, strong {
  color: var(--ink);
}

a {
  color: var(--accent);
  text-underline-offset: 0.19em;
  text-decoration-color: #93b9b3;
}

a:hover {
  text-decoration-color: currentColor;
}

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

.site-width {
  width: min(calc(100% - 3rem), 63rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1;
  top: 0.5rem;
  left: 0.75rem;
  padding: 0.55rem 0.75rem;
  transform: translateY(-150%);
  background: #fff;
  border: 1px solid var(--rule);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  min-height: 4rem;
}

.site-name {
  color: var(--ink);
  font: 600 1.25rem/1.25 var(--serif);
}

.site-nav, .link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a, .site-name {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.site-nav a {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.site-name:hover, .site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

main:focus {
  outline: none;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  grid-template-areas: "identity portrait" "intro portrait";
  align-items: start;
  gap: 1.2rem 3.5rem;
  padding-block: 3rem 2.75rem;
}

.profile-identity { grid-area: identity; }
.profile-intro { grid-area: intro; max-width: 41rem; }

.profile h1 {
  font: 600 3.625rem/1.08 var(--serif);
  margin-bottom: 0.35rem;
}

.affiliation {
  color: var(--muted);
  font-size: 1.125rem;
}

.research-question {
  max-width: 32rem;
  margin-bottom: 0.55rem;
  color: var(--ink);
  font: 550 1.5rem/1.36 var(--serif);
  text-wrap: balance;
}

.profile-photo {
  grid-area: portrait;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--surface);
}

.profile-links {
  margin-top: 0.48rem;
}

.link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

.home-section {
  padding-block: 1.95rem 2.2rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}

.home-section h2 {
  margin-bottom: 1.05rem;
  font: 600 1.75rem/1.25 var(--serif);
}

.publication {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 19.5rem);
  align-items: start;
  gap: 1rem 2.4rem;
}

.publication h3 {
  margin-bottom: 0.45rem;
  font: 600 1.4rem/1.34 var(--serif);
  text-wrap: balance;
}

.publication h3 a {
  color: var(--ink);
  text-decoration: none;
}

.publication h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.publication-text p + p {
  margin-top: 0.55rem;
}

.paper-meta {
  margin-bottom: 0.38rem;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.paper-authors {
  color: var(--muted);
  font-size: 1rem;
  text-wrap: pretty;
}

.paper-figure > a {
  display: block;
  padding: 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--surface);
}

.paper-figure > a:hover {
  border-color: var(--accent);
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.paper-figure figcaption {
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.paper-links {
  margin-top: 0.22rem;
}

.research-description {
  max-width: 72ch;
}

.research-description p + p {
  margin-top: 0.6rem;
}

.experience-entry {
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr);
  gap: 0.7rem;
  padding-block: 0.72rem;
}

.experience-entry + .experience-entry {
  border-top: 1px solid var(--rule);
}

.experience-entry dt {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.experience-entry a {
  font-weight: 600;
}

.experience-affiliation {
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer {
  padding-block: 1.2rem 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a { transition: color 140ms, border-color 140ms; }
}

@media (max-width: 43rem) {
  .site-width { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 3.5rem; }
  .site-name { font-size: 1.125rem; }
  .site-nav { gap: 0 0.9rem; }
  .site-nav a { font-size: 0.9375rem; }

  .profile {
    grid-template-columns: minmax(0, 1fr) 5.75rem;
    grid-template-areas: "identity portrait" "intro intro";
    align-items: center;
    gap: 1rem;
    padding-block: 1.35rem 1.15rem;
  }

  .profile h1 { font-size: 2.625rem; }
  .affiliation { font-size: 1rem; }
  .research-question { font-size: 1.25rem; }
  .home-section { padding-block: 1.55rem 1.75rem; }
  .home-section h2 { font-size: 1.55rem; }
  .publication { grid-template-columns: minmax(0, 1fr); }
  .publication h3 { font-size: 1.3125rem; }
  .paper-figure { max-width: 24rem; }
  .experience-entry { grid-template-columns: 4.55rem minmax(0, 1fr); }
}

@media (max-width: 24rem) {
  .header-inner { flex-wrap: wrap; gap: 0 1rem; }
  .profile { grid-template-columns: minmax(0, 1fr) 5rem; }
  .profile h1 { font-size: 2.25rem; }
}
