:root {
  color-scheme: light;
  --text: #173144;
  --body: #4a5f6d;
  --muted: #607582;
  --accent: #146488;
  --sky: #78c9ee;
  --soft: #eff9fe;
  --line: #dbe8ef;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--body); font-size: 18px; line-height: 1.8; }
.resume-page { max-width: 1160px; margin: 0 auto; padding: 64px 56px 30px; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 5px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
p, h1, h2, h3, h4 { margin: 0; }
strong { color: var(--text); font-weight: 600; }

.resume-header { position: relative; display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 44px; align-items: center; padding: 0 0 36px; border-bottom: 1px solid var(--line); }
.resume-header::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 56px; height: 3px; background: var(--sky); }
.header-copy { grid-column: 2; grid-row: 1; }
h1 { font-size: 56px; font-weight: 750; line-height: 1.1; letter-spacing: -.055em; color: var(--text); margin-bottom: 13px; }
.name-accent { background: linear-gradient(transparent 78%, #dff3fd 78%); }
.headline { font-size: 21px; color: var(--text); line-height: 1.5; margin-bottom: 13px; }
.location { display: inline; font-size: 16px; color: var(--muted); }
.location::after { content: "/"; color: #8bb6ce; margin: 0 12px; }
.email { font-size: 16px; overflow-wrap: anywhere; }
.portrait-frame { position: relative; isolation: isolate; grid-column: 1; grid-row: 1; align-self: start; width: 144px; padding: 5px; border: 1px solid var(--sky); border-radius: 50%; }
.portrait-frame::before { content: ""; position: absolute; z-index: -1; inset: -14px -12px 7px 10px; border-radius: 12px; background: radial-gradient(#9bd7f1 1px, transparent 1px) 0 0 / 9px 9px; transform: rotate(6deg); }
.portrait-frame::after { content: ""; position: absolute; bottom: 7px; right: 6px; width: 13px; height: 13px; border: 3px solid white; background: var(--sky); border-radius: 50%; }
.portrait { display: block; width: 132px; height: 132px; object-fit: cover; border-radius: 50%; }
.profile-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 22px; font-size: 16px; }
.profile-links > a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.profile-links > a:hover { text-decoration: none; border-color: var(--accent); }

main > section { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 0 44px; padding: 36px 0; border-bottom: 1px solid var(--line); }
main > section > :not(h2):not(.section-title) { grid-column: 2; min-width: 0; }
h2 { grid-column: 1; grid-row: 1; align-self: start; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; color: var(--accent); padding-top: 4px; }
h2::before { content: ""; display: block; width: 22px; height: 3px; background: var(--sky); margin-bottom: 13px; }
.summary > p { font-size: 21px; line-height: 1.75; color: var(--body); }
.summary > p + p { margin-top: 18px; }
.entry-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.entry-header > div:first-child { min-width: 0; }
.entry-identity { display: flex; align-items: center; gap: 16px; }
.entry-identity > div { min-width: 0; }
.organization-logo { display: block; flex: 0 0 96px; width: 96px; height: 64px; object-fit: contain; }
h3 { font-size: 22px; color: var(--text); line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
.entry-role { font-size: 18px; margin-top: 6px; }
.entry-meta { flex-shrink: 0; color: var(--muted); text-align: right; font-size: 14px; line-height: 1.7; }
.job { counter-reset: project; }
.job + .job { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.initiative { transition: background .18s ease; counter-increment: project; position: relative; padding: 25px 14px 25px 42px; border-bottom: 1px solid var(--line); }
.initiative:hover, .initiative:focus-within { background: #f7fcff; }
.project-icon { width: 22px; height: 22px; align-self: center; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.initiative:first-of-type { margin-top: 10px; }
.initiative:last-child { border-bottom: 0; padding-bottom: 0; }
.initiative::before { content: counter(project, decimal-leading-zero); position: absolute; top: 29px; left: 0; font-family: var(--mono); color: var(--accent); font-size: 13px; }
h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; color: var(--text); font-size: 23px; font-weight: 600; line-height: 1.5; letter-spacing: -.025em; }
h4 a { color: var(--text); }
h4 a:hover { color: var(--accent); }
h4 > span { font-size: 13px; color: var(--muted); font-family: var(--mono); font-weight: 400; letter-spacing: -.02em; }
h4 a span { color: var(--accent); font-size: 18px; }
.project-title-row { display: flex; align-items: baseline; gap: 18px; }
.project-title-row h4 { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 3px 10px; flex: 1; min-width: 0; }
.project-title-row h4 > span { grid-column: 2; }
.learn-more { flex-shrink: 0; color: var(--accent); font-size: 14px; font-weight: 500; white-space: nowrap; }
.learn-more:hover { text-decoration: underline; }
.project-summary { margin-top: 10px; }
.project-summary p { font-size: 18px; line-height: 1.8; }
.collaborators { display: block; margin-top: 12px; color: #000; font-size: 14px; font-weight: 600; line-height: 1.7; }
.project-summary strong { font-weight: 600; background: linear-gradient(transparent 64%, #dff3fd 64%); }
ul { margin: 16px 0 0; padding-left: 22px; font-size: 18px; }
li { padding-left: 3px; }
ul li + li { margin-top: 10px; }
ul li::marker { color: var(--accent); }
.education-entry + .education-entry { margin-top: 25px; }
.education-entry h3 { font-size: 20px; }
.advisers { margin-top: 8px; font-size: 16px; color: var(--muted); }
.skills { margin: 0; font-size: 18px; }
.skills > div { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 18px; }
.skills > div + div { padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); }
.skills dt { font-size: 16px; font-weight: 600; color: var(--text); }
.skills dd { margin: 0; }
.section-title { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.section-title > a { font-size: 13px; line-height: 1.7; }
.publications { margin: 0; padding: 0; list-style: none; grid-row: 1; }
.publications li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 0; }
.publications li + li { margin-top: 25px; }
.publication-year { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 4px; }
.publications h3 { font-size: 18px; line-height: 1.65; font-weight: 500; letter-spacing: -.01em; }
.publications h3 a { color: var(--text); }
.publications h3 a:hover { color: var(--accent); }
.publications p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.award { color: var(--accent); }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); transform: translateY(-180%); z-index: 10; }
.skip-link:focus { transform: translateY(0); }

@media (max-width: 900px) {
  .resume-page { padding: 44px 32px 28px; }
  .resume-header, main > section { grid-template-columns: 120px minmax(0, 1fr); column-gap: 30px; }
  .portrait-frame { width: 120px; }
  .portrait { width: 108px; height: 108px; }
  h1 { font-size: 48px; }
  .entry-header { flex-direction: column; gap: 9px; }
  .entry-meta { text-align: left; }
  .entry-header > .entry-meta { margin-left: 112px; }
  .entry-meta p { display: inline; }
  .entry-meta p + p::before { content: " · "; }
  .skills > div { grid-template-columns: 1fr; gap: 5px; }
}
@media (max-width: 640px) {
  .resume-page { padding: 30px 24px 24px; }
  .resume-header { grid-template-columns: 1fr; gap: 23px; padding-bottom: 28px; }
  .portrait-frame { grid-column: 1; grid-row: 1; width: 104px; }
  .portrait { width: 92px; height: 92px; }
  .header-copy { grid-column: 1; grid-row: 2; }
  h1 { font-size: 46px; }
  .headline { font-size: 20px; }
  .location { display: block; margin-bottom: 3px; }
  .location::after { display: none; }
  .profile-links { gap: 12px 21px; }
  main > section { display: block; padding: 29px 0; }
  h2 { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
  h2::before { display: inline-block; margin: 0; width: 18px; flex-shrink: 0; }
  .summary > p { font-size: 20px; }
  .entry-identity { gap: 12px; }
  .organization-logo { flex-basis: 72px; width: 72px; height: 56px; }
  .entry-header > .entry-meta { margin-left: 84px; }
  .initiative { padding-left: 32px; }
  h4 { font-size: 22px; }
  .project-title-row { gap: 12px; }
  .learn-more { font-size: 13px; }
  .section-title { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 23px; }
  .section-title h2 { margin-bottom: 0; }
  .section-title > a { font-size: 12px; }
  .publications li { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  @page { margin: 16mm; }
  .resume-page { max-width: none; padding: 0; }
  body { font-size: 10pt; }
  .skip-link, footer, .learn-more { display: none; }
  .resume-header { grid-template-columns: 80px minmax(0, 1fr); gap: 22px; border-bottom-width: 2px; padding-bottom: 18px; }
  .portrait-frame { grid-row: 1; width: 80px; border: 0; padding: 0; }
  .portrait { width: 80px; height: 80px; }
  .header-copy { grid-column: 2; grid-row: 1; }
  h1 { font-size: 28pt; }
  .profile-links { font-size: 10pt; margin-top: 10px; }
  main > section { display: block; padding: 20px 0; }
  h2 { display: block; margin-bottom: 16px; }
  h2::before { display: none; }
  .summary > p, .project-summary p, ul, .skills, .publications h3 { font-size: 10pt; }
  .project-summary strong, .name-accent { background: none; }
  .portrait-frame::before, .portrait-frame::after, .resume-header::after, .project-icon { display: none; }
  .initiative:hover, .initiative:focus-within { background: none; }
  h3, h4 { font-size: 12pt; }
  .initiative { padding-top: 15px; padding-bottom: 15px; }
  .initiative::before { top: 18px; }
  .section-title { display: block; margin-bottom: 16px; }
  .section-title > a { display: none; }
  h2, h3, h4, .entry-header { break-after: avoid; }
  .initiative, .education-entry, .publications li { break-inside: avoid; }
}
