@font-face {
  font-family: 'Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #201d19;
  --muted: #6d665e;
  --paper: #f5f1e9;
  --line: #d5cdbf;
  --accent: #a64f35;
  --forest: #34463a;
  --font-sans: 'Plex Sans', 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono: 'Plex Mono', 'IBM Plex Mono', Consolas, monospace;
  --meta-width: 176px;
  --column-gap: 2rem;
  --content-width: 1248px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  scrollbar-color: var(--muted) var(--paper);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
}
::selection { color: var(--ink); background: #ddc8bb; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover, button:hover { color: var(--accent); }
a, button, summary { -webkit-tap-highlight-color: #ddc8bb; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button { font: inherit; }
button, summary, a { touch-action: manipulation; }
[hidden] { display: none !important; }
.skip-link {
  position: fixed; z-index: 10; top: 1rem; left: 1rem;
  padding: .75rem 1rem; background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
main, footer { width: min(calc(100% - 6rem), var(--content-width)); margin-inline: auto; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: 'heading visual' 'copy visual';
  column-gap: 2rem;
  padding-block: 3.5rem 1.5rem;
  align-items: start;
}
.hero-heading { grid-area: heading; min-width: 0; }
.hero-identity { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center; margin-bottom: 2.25rem; }
.identity-portrait { width: 64px; aspect-ratio: 4/5; overflow: hidden; background: var(--line); }
.identity-portrait img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  object-position: 30% 50%; transform: scale(2.1); transform-origin: 30% 50%;
}
.affiliation { display: grid; gap: .35rem; max-width: 42ch; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.hero-name { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
h1 { max-width: 17ch; font-family: var(--font-mono); font-size: clamp(2.35rem, 4.1vw, 3.7rem); font-weight: 400; line-height: 1.08; letter-spacing: -.04em; }
.hero-copy { grid-area: copy; min-width: 0; margin-top: 1.5rem; }
.intro { max-width: 61ch; font-size: 1.0625rem; line-height: 1.6; }
.hero-detail { max-width: 63ch; margin-top: 1rem; color: var(--muted); font-size: .9375rem; }
.work-link { display: inline-flex; align-items: center; gap: 1rem; min-height: 44px; margin-top: 1.5rem; font-family: var(--font-mono); font-size: .875rem; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.hero-visual { grid-area: visual; align-self: center; position: relative; width: 100%; height: 520px; min-width: 0; }
.ascii-brain-canvas { display: block; position: absolute; inset: 0; width: 100%; height: calc(100% - 44px); opacity: .88; mix-blend-mode: multiply; cursor: grab; touch-action: pan-y; }
.ascii-brain-canvas.is-dragging { cursor: grabbing; }
.ascii-brain-canvas:focus-visible { outline-offset: -2px; }
.brain-instructions { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; position: absolute; inset: auto 0 0; color: var(--muted); font-family: var(--font-mono); font-size: .75rem; line-height: 1.5; }
.touch-instructions { display: none; }
@media (hover: none) and (pointer: coarse) {
  .pointer-instructions { display: none; }
  .touch-instructions { display: inline; }
}

.section, .field-notes { padding-block: 2.5rem; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: 1.25rem; }
h2 { font-family: var(--font-mono); font-size: clamp(1.5rem, 2.25vw, 2rem); line-height: 1.25; font-weight: 400; letter-spacing: -.03em; }
.section > h2 { margin-bottom: 1.5rem; }
.text-button { padding: .5rem 0; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: .25em; font-family: var(--font-mono); font-size: .8125rem; min-height: 44px; cursor: pointer; }
.project { border-top: 1px solid var(--line); }
.project-summary { display: grid; grid-template-columns: var(--meta-width) minmax(0, 1fr) 32px; gap: var(--column-gap); align-items: start; padding-block: 1.75rem; list-style: none; cursor: pointer; }
.project-summary::-webkit-details-marker { display: none; }
.project-summary::marker { content: ''; }
.project-meta, .publication-year, .timeline-date { font: 400 .8125rem/1.55 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.project-meta { display: grid; gap: .2rem; padding-top: .35rem; }
.project-heading { min-width: 0; }
.project h3 { font: 400 clamp(1.3rem, 2.15vw, 1.875rem)/1.28 var(--font-sans); letter-spacing: -.018em; text-wrap: pretty; }
.project-summary:hover h3 { color: var(--accent); }
.project .timeline-place { margin-top: .55rem; margin-bottom: 0; }
.project-toggle { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }
.project-toggle svg { transition: transform 200ms var(--ease-out); }
.project[open] .project-toggle svg { transform: rotate(45deg); color: var(--accent); }
.project-body { margin-left: calc(var(--meta-width) + var(--column-gap)); padding-bottom: 1.75rem; padding-right: calc(32px + var(--column-gap)); }
.project-copy > p { max-width: 72ch; margin-bottom: 1rem; }
.project-note { color: var(--muted); font-size: .9375rem; }
.project-tags { display: flex; flex-wrap: wrap; column-gap: 1.25rem; row-gap: .35rem; padding: 0; margin: 1rem 0 0; list-style: none; color: var(--muted); font: 400 .8125rem/1.5 var(--font-mono); }
.link-row, .footer-links { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.link-row a, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 500; }
.pipeline-visual { display: flex; flex-wrap: wrap; gap: .75rem; padding-block: .5rem; font: .8125rem/1.6 var(--font-mono); }

.publication-list { list-style: none; margin: 0; padding: 0; }
.publication, .timeline-entry { display: grid; grid-template-columns: var(--meta-width) minmax(0, 1fr); gap: var(--column-gap); padding-block: 1.125rem; }
.publication h3, .timeline-entry h3 { font-size: 1.125rem; font-weight: 500; line-height: 1.45; letter-spacing: -.006em; text-wrap: pretty; }
.publication > div, .timeline-entry > div { min-width: 0; }
.publication > div > p { margin-top: .45rem; max-width: 75ch; color: var(--muted); font-size: .875rem; }
.timeline-place { margin-block: .4rem .65rem; color: var(--muted); font: .8125rem/1.6 var(--font-mono); }
.timeline-entry > div > p { max-width: 72ch; }
.timeline-entry > div > p + p:not(.link-row) { margin-top: .5rem; }
.education-projects { max-width: 72ch; margin: .75rem 0; padding-left: 1.25rem; }
.education-projects li + li { margin-top: .75rem; }
.education-projects a, .education-project-link { font-weight: 500; }
.publication-year, .timeline-date { padding-top: .2rem; }
.section > .section-subtitle { margin-top: 3rem; margin-bottom: 1.5rem; }

.field-notes-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .75rem 2rem; margin-bottom: 1.5rem; }
.field-notes-header h2 { color: var(--forest); }
.field-notes-header p { color: var(--muted); font-size: .9375rem; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.photo-grid figure { overflow: hidden; background: var(--line); }
.photo-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-wide { grid-column: 1/-1; aspect-ratio: 16/7; }
.photo-wide img { object-position: 50% 48%; }
.photo-tall { aspect-ratio: 4/5; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: end; gap: 1rem 2rem; padding-block: 2rem max(3rem, env(safe-area-inset-bottom)); }
.footer-name { font: 500 .875rem/1.6 var(--font-mono); }
.footer-status { font-size: .8125rem; color: var(--muted); margin-top: .2rem; }
.progress-dots > span { opacity: 0; animation: progress-second 1.8s steps(1, end) infinite paused; }
.progress-dots > span + span { animation-name: progress-third; }
.progress-dots.is-active > span { animation-play-state: running; }
@keyframes progress-second { 0% { opacity: 0; } 33.333%, 100% { opacity: 1; } }
@keyframes progress-third { 0% { opacity: 0; } 66.667%, 100% { opacity: 1; } }
.footer-links { color: var(--muted); }

@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .project { interpolate-size: allow-keywords; }
    .project::details-content { block-size: 0; overflow: clip; transition: block-size 300ms var(--ease-out), content-visibility 300ms allow-discrete; }
    .project[open]::details-content { block-size: auto; }
  }
}
@supports (animation-timeline: view()) {
  @media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
    .hero { view-timeline: --hero-exit block; }
    .hero-visual { animation: brain-handoff linear both; animation-timeline: --hero-exit; animation-range: exit 0% exit 90%; }
    .hero-heading { animation: title-handoff linear both; animation-timeline: --hero-exit; animation-range: exit 0% exit 90%; }
    @keyframes brain-handoff { to { transform: translateY(48px); } }
    @keyframes title-handoff { to { transform: translateY(20px); } }
  }
}
@media (max-width: 1099px) {
  main, footer { width: calc(100% - 3rem); }
  :root { --meta-width: 150px; --column-gap: 1.5rem; }
  .hero { column-gap: 1.5rem; }
  .hero-visual { height: 430px; }
  h1 { font-size: clamp(2.2rem, 4.3vw, 3.1rem); }
  .hero-name { font-size: .9rem; }
}
/* Let the copy approach the brain's curved silhouette without moving its canvas. */
@media (min-width: 800px) {
  .hero-heading { width: calc(100% + clamp(3rem, 8vw, 8rem)); }
  .hero-heading h1 { max-width: 22ch; text-wrap: balance; }
  .hero-copy { width: calc(100% + clamp(2rem, 6vw, 6rem)); }
  .hero-copy::before {
    content: "";
    float: right;
    width: clamp(2rem, 6vw, 6rem);
    height: 12rem;
    shape-outside: ellipse(100% 65% at 100% 0%);
    pointer-events: none;
  }
  .hero-copy .intro, .hero-copy .hero-detail { max-width: none; }
}
@media (max-width: 799px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: 'heading' 'visual' 'copy'; padding-block: 2rem; }
  .hero-identity { margin-bottom: 1.5rem; }
  h1 { max-width: 24ch; font-size: clamp(2rem, 5.8vw, 2.75rem); }
  .hero-visual { width: min(100%, 620px); height: auto; aspect-ratio: 1.22; margin: .5rem auto 0; }
  .hero-copy { margin-top: 1.25rem; }
  .hero-detail, .intro { max-width: 72ch; }
  .brain-instructions { font-size: .6875rem; }
  .section, .field-notes { padding-block: 2rem; }
}
@media (max-width: 599px) {
  main, footer { width: calc(100% - 2rem); }
  .hero { padding-top: 1.5rem; }
  .hero-identity { grid-template-columns: 52px 1fr; gap: .875rem; margin-bottom: 1.25rem; }
  .identity-portrait { width: 52px; }
  .affiliation { font-size: .75rem; }
  .hero-name { font-size: .875rem; }
  h1 { font-size: clamp(1.875rem, 7.7vw, 2.75rem); letter-spacing: -.035em; }
  .intro { font-size: 1rem; }
  .hero-detail { font-size: .9375rem; }
  .work-link { margin-top: 1rem; }
  .section-heading { align-items: center; }
  .text-button { max-width: 12ch; text-align: right; font-size: .75rem; line-height: 1.5; }
  .project-summary { grid-template-columns: minmax(0, 1fr) 32px; gap: .75rem; padding-block: 1.25rem; }
  .project-meta { display: flex; flex-wrap: wrap; column-gap: 1rem; grid-column: 1/-1; padding: 0; font-size: .75rem; }
  .project-heading { grid-column: 1; }
  .project-toggle { grid-column: 2; }
  .project h3 { font-size: 1.4rem; }
  .project-body { margin-left: 0; padding-right: 0; padding-bottom: 1.5rem; }
  .project-tags { font-size: .75rem; gap: .4rem 1rem; }
  .publication, .timeline-entry { grid-template-columns: 1fr; gap: .4rem; padding-block: 1rem; }
  .publication-year, .timeline-date { padding-top: 0; }
  .publication h3, .timeline-entry h3 { font-size: 1.0625rem; }
  .photo-grid { gap: .4rem; }
  .photo-wide { aspect-ratio: 4/3; }
  .footer-links { column-gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  main, footer { width: 100%; }
  .hero { display: block; padding: 0; }
  h1 { max-width: none; font-size: 2rem; }
  .hero-visual, .work-link, .text-button, .project-toggle { display: none; }
  details::details-content { content-visibility: visible; block-size: auto; }
  .project-body { display: block; }
  .publication, .timeline-entry, .project { break-inside: avoid; }
}
