:root {
  color-scheme: light;
  --background: #ffffff;
  --line: #e1e5e9;
  --ink: #20252b;
  --muted: #515c68;
  --link: #245b83;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); line-height: 1.65; }
a { color: var(--link); text-underline-offset: 0.22em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
.wrap { width: min(100% - 3rem, 54rem); margin-inline: auto; }
.skip { position: absolute; top: 0.5rem; left: 1rem; padding: 0.5rem; background: var(--background); transform: translateY(-150%); }
.skip:focus { transform: none; }
.header { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 650; }
nav, .actions, .links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem; }
nav a { color: var(--muted); font-size: 0.95rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero { padding-block: clamp(2.5rem, 6vw, 4.3rem); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.045em; font-weight: 650; }
.affiliation { margin-top: 0.25rem; color: var(--muted); }
.lead { margin-top: 1.15rem; max-width: 40rem; font-size: 1.15rem; }
.muted { color: var(--muted); }
.intro .muted { margin-top: 0.4rem; max-width: 43rem; }
.actions { margin-top: 1.1rem; font-size: 0.95rem; }

.section { border-top: 1px solid var(--line); padding-block: 2.05rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 1rem; }
h2 { font-size: clamp(1.55rem, 3vw, 1.85rem); letter-spacing: -0.025em; font-weight: 650; }
h3 { font-size: 1.18rem; font-weight: 650; }
.eyebrow { color: var(--muted); font-size: 0.875rem; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; align-items: start; gap: 0.75rem 1.75rem; padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.project:first-child { padding-top: 0.25rem; }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project p:not(.eyebrow) { max-width: 43rem; margin-top: 0.35rem; }
.project .eyebrow { margin-top: 0.18rem; }
.project .links { margin-top: 0.4rem; }
.project-preview { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f4f5f7; border: 1px solid var(--line); border-radius: 0.2rem; }
.links { font-size: 0.925rem; }
.other-projects { margin-top: 1.75rem; }
.other-projects h3 { margin-bottom: 0.6rem; }
.rows { padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: minmax(11rem, 1fr) 2fr; align-items: baseline; gap: 0.15rem 1.25rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.rows span { color: var(--muted); font-size: 0.925rem; }
.publications li { grid-template-columns: minmax(0, 1fr) auto; }

.experience-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; gap: clamp(1.4rem, 5vw, 3rem); }
.timeline { display: grid; gap: 1.25rem; }
.timeline h3 { margin-top: 0.15rem; }
.org { margin: 0.15rem 0 0.25rem; color: var(--muted); }
.profile { display: grid; gap: 0.4rem; }
.profile h3:not(:first-child) { margin-top: 0.5rem; }
.footer { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 0.7rem 1.5rem; padding-block: 1.4rem 2.2rem; border-top: 1px solid var(--line); }
.footer h2 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.footer p { color: var(--muted); }

@media (max-width: 38rem) {
  .wrap { width: calc(100% - 2rem); }
  .header { align-items: start; flex-direction: column; justify-content: center; padding-block: 0.75rem; }
  nav { column-gap: 0.9rem; }
  .affiliation { font-size: 0.925rem; }
  .project, .experience-grid, .rows li, .publications li { grid-template-columns: minmax(0, 1fr); }
  .project-preview { max-width: 18rem; }
}
