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

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f9faf7;
  --ink: #182320;
  --body: #44504b;
  --muted: #59645e;
  --line: #cdd3cd;
  --panel: #ecf0eb;
  --accent: #b70e22;
  --accent-bright: #dc1027;
  --button: #1c2925;
  --button-text: #fcfcf6;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(1.3rem, 6vw, 6.5rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151e1b;
  --ink: #f1f4ec;
  --body: #c6cfc7;
  --muted: #aab6ad;
  --line: #3b4942;
  --panel: #202d26;
  --accent: #ff7984;
  --accent-bright: #ff3749;
  --button: #ecf1e6;
  --button-text: #17231d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body, button { font-family: var(--sans); }
a { color: inherit; }
button { cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-weight: 550; letter-spacing: -.055em; line-height: 1.08; }
h2 { font-size: clamp(2.55rem, 4.1vw, 4.1rem); }
h3 { font-size: 1.45rem; letter-spacing: -.035em; line-height: 1.23; font-weight: 600; }
h1 em, h2 em {
  font: italic 400 1.085em/.92 var(--serif);
  letter-spacing: -.035em;
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
::selection { color: #172321; background: #ffcbd1; }
[id] { scroll-margin-top: 1.5rem; }
.wrap {
  width: min(78rem, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  z-index: 5;
  top: .75rem;
  left: var(--gutter);
  transform: translateY(-180%);
  padding: .5rem 1rem;
  color: var(--button-text);
  background: var(--button);
}
.skip-link:focus { transform: none; }

.site-head { border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; min-height: 5rem; gap: 2.25rem; }
.wordmark {
  width: fit-content;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 650;
}
.main-nav, .head-tools { display: flex; align-items: center; }
.main-nav { gap: clamp(1.3rem, 2.4vw, 2.65rem); }
.main-nav a, .cv-link {
  font-size: .935rem;
  font-weight: 550;
  text-decoration: none;
  line-height: 1.2;
}
.main-nav a { color: var(--body); padding-block: .7rem; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--accent); }
.head-tools { gap: .85rem; }
.theme-switch {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.theme-switch span {
  display: block;
  border: 1.5px solid currentColor;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transform: rotate(-34deg);
}
.theme-switch:hover { background: var(--panel); }
.cv-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .53rem;
  min-height: 2.45rem;
  padding: .2rem .85rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
}
.cv-link:hover { border-color: var(--ink); }
.doc-icon {
  display: inline-block;
  position: relative;
  width: .68rem;
  height: .86rem;
  border: 1px solid currentColor;
  border-radius: 1px;
}
.doc-icon::after {
  content: "";
  position: absolute;
  height: 1px;
  background: currentColor;
  left: 2px;
  right: 2px;
  top: 4px;
  box-shadow: 0 3px currentColor;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6.2vw, 6.9rem);
  align-items: end;
  padding-block: clamp(2.65rem, 4.6vw, 5.45rem) clamp(2.8rem, 4.8vw, 5rem);
}
.eyebrow, .date, .paper-status, .note-figure figcaption, .colophon {
  font-family: var(--mono);
  font-weight: 400;
}
.eyebrow {
  font-size: .78rem;
  line-height: 1.5;
  letter-spacing: .085em;
  text-transform: uppercase;
}
.eyebrow { color: var(--muted); }
.with-rule { display: flex; align-items: center; gap: .7rem; }
.with-rule::before { content: ""; width: 1.65rem; height: 2px; background: var(--accent-bright); }
.hero-name {
  margin: clamp(1.15rem, 1.7vw, 1.75rem) 0 0 -.04em;
  font-size: clamp(5.6rem, 8.55vw, 8.55rem);
  line-height: .86;
  letter-spacing: -.085em;
  font-weight: 540;
}
.hero-name em { display: block; width: fit-content; font-size: 1.175em; line-height: .9; letter-spacing: -.055em; }
.accent { color: var(--accent-bright); }
.intro { max-width: 31rem; font-size: clamp(1.12rem, 1.5vw, 1.43rem); line-height: 1.48; color: var(--body); letter-spacing: -.027em; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.65rem; margin-top: 1.75rem; }
.button, .text-link {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  width: fit-content;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 2.95rem;
  padding: .81rem 1.2rem;
  border-radius: .31rem;
  color: var(--button-text);
  background: var(--button);
  transition: transform .18s, background-color .18s;
}
.button:hover { background: var(--accent); color: var(--paper); transform: translateY(-2px); }
.text-link, .portrait figcaption a, .note-figure figcaption a, .contact-links a, .email-link {
  text-decoration-thickness: 1px;
  text-underline-offset: .27em;
  text-decoration-color: var(--line);
}
.text-link:hover, figcaption a:hover { color: var(--accent); text-decoration-color: currentColor; }
figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.portrait figcaption, .note-figure figcaption { padding-top: .67rem; }
figcaption strong { font-weight: 600; color: var(--ink); }
figcaption a { white-space: nowrap; }

.research-section { border-top: 1px solid var(--line); padding: clamp(2.3rem, 3.9vw, 4.25rem) 0 clamp(3.65rem, 6.8vw, 6.5rem); }
.org-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 9.5rem;
  max-width: 100%;
  height: 4.25rem;
  padding: .5rem .7rem;
  background: white;
  border-radius: .32rem;
}
.org-logo img { width: 100%; height: 100%; object-fit: contain; }
.org-logo:has(img[src$="openai.svg"]) { padding: 0; }
.entry-meta .org-logo { margin-bottom: .5rem; }
.entry .text-link { display: inline-block; margin-top: .65rem; }
.lab-history { margin: 1.15rem 0 0; }
.lab-history dt { font-weight: 600; }
.lab-history dt:not(:first-child) { margin-top: 1.05rem; }
.lab-history dt .date { display: block; font-weight: 400; }
.lab-history dd { margin: .3rem 0 0; color: var(--body); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.9rem; }
.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1.1rem, 2.1vw, 2.1rem); }
.project-link { display: block; text-decoration: none; }
.project-image { aspect-ratio: 1.93; overflow: hidden; background: #152320; border-radius: .34rem; }
.project-image > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease-out; }
.project-link:hover .project-image > img, .project-link:focus-visible .project-image > img { transform: scale(1.035); }
.experience-cover { position: relative; }
.cover-logo {
  position: absolute;
  left: .85rem;
  bottom: .85rem;
  display: grid;
  place-items: center;
  width: 6.4rem;
  height: 2.7rem;
  padding: .35rem .55rem;
  background: #fff;
  border-radius: .2rem;
}
.cover-logo img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.cover-logo:has(img[src$="openai.svg"]) { padding: 0; }
.project .eyebrow { margin: 1.15rem 0 .45rem; }
.project h3 { font-size: clamp(1.32rem, 1.75vw, 1.8rem); }
.project-link:hover h3 { color: var(--accent); }
.project > p { color: var(--body); margin-top: .55rem; line-height: 1.53; max-width: 38ch; }

.papers { padding-block: clamp(3.3rem, 6vw, 6.1rem); background: var(--panel); border-block: 1px solid var(--line); }
.papers-layout, .bio-section {
  display: grid;
  grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr);
  gap: clamp(2rem,6vw,6rem);
}
.papers h2, .bio-section h2 { align-self: start; }
.papers h2 em, .bio-section h2 em { display: block; }
.paper { padding: 1.55rem 0 1.65rem; border-top: 1px solid var(--line); }
.paper:first-child { border-color: var(--ink); }
.paper:last-child { padding-bottom: 0; }
.paper-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1.1rem; margin-bottom: .9rem; font-size: .8rem; }
.paper-status span:first-child { color: var(--accent); }
.paper-status span:last-child { color: var(--muted); }
.paper h3 { font-size: clamp(1.34rem, 1.75vw, 1.7rem); max-width: 39ch; }
.paper h3 + p { margin: .65rem 0 .7rem; color: var(--body); }
.paper strong { font-weight: 600; color: var(--ink); }

.contact { background: #17241f; color: #f2f4ec; }
.contact-main { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-block: clamp(3.1rem,5.1vw,5rem) 2.85rem; }
.contact h2 { font-size: clamp(3rem, 5.6vw, 6rem); }
.contact h2 em { color: #ff7889; }
.email-link { display: inline-block; margin-top: .9rem; font-size: clamp(1.03rem,1.4vw,1.23rem); text-decoration-color: #647a6c; }
.contact-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.contact-links a { font-size: .95rem; text-decoration-color: #647a6c; }
.contact a:hover { color: #ff9ba7; text-decoration-color: currentColor; }
.contact a:focus-visible { outline-color: #ff8d9b; }
.colophon { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem 2rem; padding-block: 1.15rem; border-top: 1px solid #44564c; font-size: .78rem; color: #b7c5bc; }

.page-heading { padding: clamp(3.2rem,6.1vw,6rem) 0 2rem; }
.page-heading h1, .about-copy h1 { font-size: clamp(3.7rem,7.1vw,7rem); margin: 1rem 0 .2rem -.045em; }
.jump-nav { display: flex; gap: .65rem 1.8rem; flex-wrap: wrap; padding: .85rem 0 1.1rem; border-block: 1px solid var(--line); }
.jump-nav a { font-size: .95rem; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .25em; }
.jump-nav a:hover { color: var(--accent); }
.note {
  display: grid;
  grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr);
  gap: clamp(2rem,5.4vw,5.25rem);
  align-items: start;
  padding-block: clamp(3.2rem,6vw,5.75rem);
}
.note + .note { border-top: 1px solid var(--line); }
.note-figure img { width: 100%; height: auto; border-radius: .35rem; }
.note-figure figcaption { font-size: .76rem; }
.note-copy h2 { margin: .65rem 0 1.3rem; font-size: clamp(2.3rem,3.5vw,3.6rem); }
.note-copy > p:not(.eyebrow), .bio-text p:not(.eyebrow), .entry div > p:last-child, .about-copy > p:not(.eyebrow) { color: var(--body); }
.note-copy p + p, .about-copy p + p { margin-top: 1rem; }
.note-copy p.lead { font-size: 1.22rem; letter-spacing: -.02em; color: var(--ink); line-height: 1.48; }
.note-copy > .text-link, .bio-text article > .text-link { display: inline-block; margin-top: 1.15rem; }
.inline-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.4rem; margin-top: 1.15rem; }

.about-intro { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 8vw, 9rem); align-items: center; padding-block: clamp(3rem,5.8vw,5.5rem); }
.about-copy h1 { margin-bottom: 1.2rem; }
.about-copy .intro { color: var(--ink); font-size: clamp(1.2rem,1.8vw,1.55rem); }
.about-copy > p { max-width: 57ch; }
.portrait { width: min(100%,24rem); justify-self: end; }
.portrait img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: .36rem; }
.bio-section { border-top: 1px solid var(--line); padding-block: clamp(2.75rem,5.2vw,5rem); }
.entry { display: grid; grid-template-columns: minmax(8.3rem,.52fr) minmax(0,1fr); gap: 1.1rem; border-bottom: 1px solid var(--line); padding: 1.35rem 0; }
.entry:first-child { padding-top: .25rem; }
.entry:last-child { border: none; padding-bottom: 0; }
.date { font-size: .8rem; color: var(--muted); line-height: 1.5; padding-top: .23rem; }
.entry h3, .bio-text h3 { font-size: 1.38rem; }
.entry .role { color: var(--accent); font-size: .95rem; margin: .3rem 0 .55rem; font-weight: 550; }
.bio-text > h3:not(:first-child) { margin-top: 2.1rem; }
.bio-text h3 + p { margin-top: .6rem; }
.side-projects article:not(:first-child) { border-top: 1px solid var(--line); margin-top: 1.65rem; padding-top: 1.6rem; }
.side-projects .eyebrow { margin-bottom: .5rem; }
.honors { padding: 0; margin: 0; list-style: none; }
.honors li { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.honors li:first-child { padding-top: .3rem; }
.honors li:last-child { border: none; }
.honors li span:first-child { font-weight: 550; }
.honors li span:last-child { color: var(--muted); white-space: nowrap; font: .8rem/1.5 var(--mono); }

@media (max-width: 59rem) {
  .hero { column-gap: 2.25rem; }
  .hero-name { font-size: clamp(5rem,9.4vw,6rem); }
  .intro { font-size: 1.12rem; }
  .head-inner { gap: 1.25rem; }
  .papers-layout, .bio-section { grid-template-columns: .7fr 1.3fr; gap: 2rem; }
  .entry { display: block; }
  .entry .date { margin-bottom: .45rem; }
  .honors li { flex-direction: column; }
}

@media (max-width: 46rem) {
  .head-inner { gap: 1rem; min-height: 4.2rem; }
  .main-nav { gap: 1.05rem; }
  .head-tools { gap: .25rem; }
  .hero { grid-template-columns: 1fr; gap: 1.15rem; padding-block: 2.7rem 2.5rem; }
  .hero-name { font-size: clamp(3.6rem,12vw,5.9rem); line-height: 1; margin-block: .65rem 0; }
  .hero-name em { display: inline; font-size: 1.08em; margin-inline-start: .075em; }
  .hero .intro { max-width: 32rem; }
  .actions { margin-top: 1.25rem; }
  .project-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .project .eyebrow { margin-top: .9rem; }
  .project > p { max-width: 56ch; }
  .project h3 { font-size: 1.55rem; }
  .papers-layout, .bio-section, .note, .about-intro { grid-template-columns: 1fr; gap: 1.8rem; }
  .papers h2 em, .bio-section h2 em { display: inline; }
  .contact-main { align-items: start; flex-direction: column; gap: 1.65rem; }
  .note-copy { order: -1; }
  .note-figure { max-width: 35rem; }
  .arm-note img { width: min(100%, 27rem); }
  .arm-note { max-width: 27rem; }
  .portrait { max-width: 23rem; justify-self: start; }
  .entry { display: grid; grid-template-columns: minmax(7rem,.42fr) 1fr; }
  .honors li { flex-direction: row; }
}

@media (max-width: 39rem) {
  .head-inner { display: grid; grid-template-columns: 1fr auto; gap: 0; padding-top: .48rem; }
  .wordmark { font-size: 1.05rem; }
  .head-tools { justify-self: end; }
  .main-nav { order: 1; grid-column: 1 / -1; flex-wrap: wrap; column-gap: clamp(.75rem, 3.2vw, 1.4rem); row-gap: 0; }
  .main-nav a { font-size: .9rem; padding-block: .54rem .67rem; }
}

@media (max-width: 35rem) {
  .portrait figcaption { font-size: .8rem; }
  .section-heading { flex-wrap: wrap; gap: .6rem 1.3rem; margin-bottom: 1.25rem; }
  .section-heading .text-link { font-size: .9rem; }
  .entry { display: block; }
  .honors li { flex-direction: column; }
}

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