:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #f5f7f6;
  --ink: #142821;
  --muted: #4b6057;
  --line: #d6e0da;
  --teal: #00674f;
  --blue: #2448a5;
  --berry: #a21b51;
  --amber: #976000;
  --header-height: 80px;
}
:root.dark {
  color-scheme: dark;
  --bg: #111e19;
  --paper: #1a2a23;
  --ink: #f3f7f4;
  --muted: #bbcec2;
  --line: #3d5447;
  --teal: #53dbac;
  --blue: #91b7ff;
  --berry: #ff8fba;
  --amber: #f4c359;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
#dna-field { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
main, footer { position: relative; z-index: 1; }
.hero-copy, .portrait-wrap, footer { background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
::selection { background: #00674f; color: white; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.035em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 4.5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3vw, 3.1rem); max-width: 900px; }
h3 { margin: 0; font-size: 1.12rem; line-height: 1.4; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 18px; background: var(--teal); color: var(--bg); }
.skip-link:focus { top: 10px; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-height); padding: 16px max(24px, calc((100% - 1180px)/2)); border-top: 4px solid var(--teal); border-bottom: 1px solid var(--line); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--teal); color: var(--bg); border-radius: 4px; }
.site-header nav { display: flex; gap: 27px; font-size: .9rem; font-weight: 650; }
.site-header nav a { border-bottom: 2px solid transparent; padding: 4px 0; }
.site-header nav a:hover { border-color: var(--teal); color: var(--teal); }
.header-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.language-switch { display: inline-flex; align-items: center; padding: 2px; border: 1px solid var(--line); border-radius: 5px; }
.language-switch a { display: grid; place-items: center; min-height: 28px; padding: 3px 8px; border-radius: 3px; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.4; }
.language-switch a[aria-current="page"] { background: var(--teal); color: var(--bg); }
.language-switch a:hover { color: var(--teal); }
.language-switch a[aria-current="page"]:hover { color: var(--bg); }
.icon-button { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; }
main, footer { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: center; gap: 72px; padding-block: 64px 54px; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
.hero-lede { max-width: 650px; color: var(--muted); margin: 24px 0 0; font-size: 1.14rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); font-size: .9rem; font-weight: 700; }
.button:hover { border-color: var(--teal); }
.button.primary { background: var(--teal); color: var(--bg); border-color: var(--teal); }
.portrait-wrap { width: 270px; margin: 0; }
.portrait-wrap img { width: 100%; height: auto; border-radius: 6px; }
.portrait-wrap figcaption { margin-top: 12px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.path-strip { display: flex; align-items: center; width: fit-content; max-width: 100%; flex-wrap: wrap; gap: 8px 16px; padding: 11px 18px; background: var(--teal); color: var(--bg); border-radius: 5px; font-size: .8rem; font-weight: 650; }
.path-strip b { font-weight: 400; }
.path-strip span { white-space: nowrap; }
.section { padding-block: 64px; border-bottom: 1px solid var(--line); background: var(--bg); }
.section-heading { margin-bottom: 30px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading > p:last-child:not(.eyebrow) { margin: 16px 0 0; color: var(--muted); }
.profile-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1080px; color: var(--muted); }
.research-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 24px; }
.research-grid article { padding-top: 18px; border-top: 4px solid var(--teal); }
.research-grid article:nth-child(2) { border-color: var(--blue); }
.research-grid article:nth-child(3) { border-color: var(--berry); }
.panel-kicker { margin-bottom: 8px; color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.research-grid article > p:not(.panel-kicker) { color: var(--muted); font-size: .96rem; margin: 12px 0; }
.text-link { display: inline-block; color: var(--teal); font-size: .84rem; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.school-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; list-style: none; margin: 0; padding: 0; counter-reset: schools; }
.school-grid li { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 22px; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 5px; }
.school-grid li:nth-child(2) { border-top-color: var(--berry); }
.school-grid li:nth-child(3) { border-top-color: var(--blue); }
.school-grid li:nth-child(4) { border-top-color: var(--amber); }
.school-number { display: block; color: var(--teal); font-size: .74rem; letter-spacing: .06em; font-weight: 800; margin-bottom: 10px; }
.school-grid h3 { font-size: 1.23rem; }
.school-degree { margin: 8px 0 12px; color: var(--teal); font-size: .8rem; font-weight: 700; line-height: 1.5; }
.school-copy > p:not(.school-degree) { font-size: .9rem; color: var(--muted); line-height: 1.65; }
.school-photo { margin: 0; align-self: start; }
.school-photo .photo-link { height: 230px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--paper); border-radius: 4px; }
.school-photo img { width: 100%; height: 100%; object-fit: cover; }
.school-photo--uci img { object-position: 35% 50%; }
.school-photo--cornell img { object-position: 50% 68%; }
.school-photo--rockefeller img { object-position: 62% 50%; }
.school-photo--iowa img { object-position: 67% 78%; transform: scale(1.5); transform-origin: 66% 75%; }
.school-photo figcaption, .story-photo figcaption { margin-top: 10px; font-size: .73rem; color: var(--muted); line-height: 1.5; }
.photo-link { cursor: zoom-in; }
.photo-link img { border-radius: 4px; }
.photo-hint { margin: 18px 0 0; color: var(--muted); font-size: .76rem; }
.story-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; align-items: start; }
.story-index { position: sticky; top: calc(var(--header-height) + 28px); }
.story-index nav { display: grid; gap: 3px; border-left: 2px solid var(--line); padding-left: 18px; }
.story-index .eyebrow { font-size: .67rem; margin-bottom: 10px; }
.story-index a { display: flex; gap: 12px; padding-block: 7px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.story-index a span { font-size: .66rem; padding-top: 2px; color: var(--teal); }
.story-index a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }
.story-body { min-width: 0; max-width: 820px; }
.story-body p { margin: 0 0 18px; }
.story-opening { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.story-opening > p:first-child { font-size: 1.15rem; line-height: 1.8; }
.story-chapter { display: flow-root; padding-top: 38px; margin-top: 16px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.story-chapter:last-child { border-bottom: 0; padding-bottom: 0; }
.story-chapter .chapter-label { color: var(--teal); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; margin-bottom: 14px; }
.story-body h3 { margin: 28px 0 16px; font: 600 1.6rem/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.story-chapter > .chapter-label + h3 { margin-top: 0; }
.story-photo { float: right; width: min(42%, 300px); margin: 5px 0 20px 28px; }
.story-photo img { width: 100%; height: auto; }
.story-chapter h3:not(:first-of-type) { clear: both; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.work-grid article { padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 5px; background: var(--bg); }
.work-grid article:nth-child(3n + 2) { border-top-color: var(--blue); }
.work-grid article:nth-child(3n) { border-top-color: var(--berry); }
.skill-number { display: block; margin-bottom: 14px; color: var(--teal); font-size: .66rem; letter-spacing: .09em; font-weight: 800; }
.work-grid h3 { min-height: 2.8em; }
.work-grid ul { list-style: none; padding: 0; margin: 16px 0 0; }
.work-grid li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; line-height: 1.65; }
.work-grid strong { color: var(--ink); font-weight: 650; }
.publications .section-heading { margin-bottom: 20px; }
.publication-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.publication-list article { padding: 16px 0; border-top: 1px solid var(--line); }
.publication-list h3, .forthcoming-publication h3 { font-size: 1.02rem; line-height: 1.5; }
.publication-list h3 a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.publication-list p, .forthcoming-publication > h3 + p { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }
.publication-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 4px; }
.publication-doi { display: inline-block; color: var(--teal); font-size: .76rem; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.publication-award { margin: 10px 0 0; color: var(--teal); font-size: .78rem; font-weight: 750; }
.publication-award::before { content: "★ "; }
.publication-pdf { color: var(--teal); font-size: .76rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.publication-license { color: var(--muted); font-size: .7rem; }
.publication-license a { text-decoration: underline; text-underline-offset: 2px; }
.forthcoming-publication { margin-top: 14px; padding: 16px 18px; background: var(--paper); border-left: 3px solid var(--amber); }
.publication-status { margin: 0 0 8px; color: var(--amber); font-size: .68rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.code-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.code-grid article { display: flex; flex-direction: column; padding: 22px 24px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 5px; background: var(--bg); }
.code-grid article:nth-child(3n + 2) { border-top-color: var(--blue); }
.code-grid article:nth-child(3n) { border-top-color: var(--berry); }
.code-meta { margin: 0 0 10px; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.code-grid h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.code-grid h3 a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.code-grid article > p:not(.code-meta) { flex: 1; margin: 10px 0 14px; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.code-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.code-links a { color: var(--teal); font-size: .8rem; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.code-all { margin-top: 22px; }
.future-section { padding: 40px; margin-block: 48px; border: 0; border-left: 6px solid var(--teal); background: var(--paper); border-radius: 4px; }
.future-section h2 { max-width: 760px; }
.future-section > p:not(.eyebrow) { max-width: 780px; color: var(--muted); margin-block: 22px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
footer p { margin: 0; }
footer a { color: var(--teal); }
@media (min-width: 1600px) { main, footer { width: min(1240px, calc(100% - 96px)); } }
@media (max-width: 1050px) {
  .hero { gap: 36px; grid-template-columns: minmax(0, 1fr) 230px; }
  .portrait-wrap { width: 230px; }
  .school-grid li { grid-template-columns: minmax(0, 1fr) 165px; gap: 16px; padding: 20px; }
  .school-photo .photo-link { height: 200px; }
  .story-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
  .work-grid, .code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  :root { --header-height: 116px; }
  .site-header { flex-wrap: wrap; gap: 10px 20px; padding: 10px 24px; }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: 16px; }
  .hero { padding-block: 40px; }
  .hero-lede { font-size: 1rem; }
  .path-strip { font-size: .76rem; gap: 8px 12px; }
  .school-grid { grid-template-columns: 1fr; }
  .school-grid li { grid-template-columns: minmax(0, 1fr) 210px; }
  .school-photo .photo-link { height: 220px; }
  .story-layout { grid-template-columns: 1fr; gap: 30px; }
  .story-index { position: static; }
  .story-index nav { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 16px 0; border: 0; border-block: 1px solid var(--line); }
  .story-index .eyebrow { width: 100%; margin-bottom: 0; }
  .story-index a { padding-block: 4px; }
  .story-body { max-width: none; }
  .research-grid { gap: 18px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  main, footer { width: calc(100% - 40px); }
  .site-header { padding-inline: 20px; }
  .site-header nav { font-size: .78rem; gap: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .hero .eyebrow { font-size: .65rem; }
  .portrait-wrap { width: 180px; }
  .portrait-wrap figcaption { font-size: .68rem; }
  .hero-actions { gap: 8px; }
  .button { padding-inline: 14px; }
  .path-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 10px 14px; border-radius: 5px; }
  .path-strip span { white-space: normal; }
  .path-strip b { display: none; }
  .section { padding-block: 44px; }
  .section-heading { margin-bottom: 24px; }
  .profile-intro, .research-grid, .work-grid, .code-grid { grid-template-columns: 1fr; gap: 12px; }
  .publication-list { grid-template-columns: 1fr; }
  .research-grid { gap: 22px; margin-top: 16px; }
  .school-grid li { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .school-photo .photo-link { height: 260px; max-width: 320px; margin-inline: auto; }
  .school-photo img { max-width: 100%; }
  .school-photo figcaption { text-align: center; }
  .story-index a { font-size: .76rem; }
  .story-opening > p:first-child { font-size: 1.06rem; }
  .story-body h3 { font-size: 1.4rem; }
  .story-chapter { padding-top: 28px; }
  .story-photo { float: none; width: min(100%, 320px); margin: 20px auto 24px; }
  .work-grid { gap: 18px; }
  .work-grid h3 { min-height: 0; }
  .future-section { padding: 28px 24px; margin-block: 32px; }
  footer { font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Native Chinese typography without a remote font dependency. */
html:lang(zh) body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; line-height: 1.85; }
html:lang(zh) h2, html:lang(zh) .story-body h3 { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-weight: 700; letter-spacing: 0; line-height: 1.45; }
html:lang(zh) h2 { font-size: clamp(1.75rem, 2.6vw, 2.65rem); }
html:lang(zh) .eyebrow, html:lang(zh) .chapter-label, html:lang(zh) .skill-number { letter-spacing: .06em; }
html:lang(zh) .story-body { max-width: 760px; }
html:lang(zh) .hero-lede { line-height: 1.9; }

/* Compact skill cards: readable labels, decorative icons, optional detail. */
.work-grid .skill-card { border-radius: 18px; border-top-width: 1px; padding: 24px; }
.skill-topline { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.skill-topline .skill-number { margin: 0; color: var(--muted); }
.skill-icon { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 16px; background: #e5f5ee; font-size: 1.65rem; line-height: 1; }
.skill-card:nth-child(2) .skill-icon { background: #e9efff; }
.skill-card:nth-child(3) .skill-icon { background: #fff0df; }
.skill-card:nth-child(4) .skill-icon { background: #ffeaf0; }
.skill-card:nth-child(5) .skill-icon { background: #edf4df; }
.skill-card:nth-child(6) .skill-icon { background: #f0eaff; }
.dark .skill-icon { background: #294237; }
.dark .skill-card:nth-child(2) .skill-icon { background: #29384f; }
.dark .skill-card:nth-child(3) .skill-icon { background: #473c2a; }
.dark .skill-card:nth-child(4) .skill-icon { background: #472e3a; }
.dark .skill-card:nth-child(5) .skill-icon { background: #36432c; }
.dark .skill-card:nth-child(6) .skill-icon { background: #3b3250; }
.skill-tags { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; margin-top: 16px; }
.skill-tags > .skill-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .76rem; line-height: 1.5; }
.skill-note { display: block; margin-top: 8px; color: var(--muted); font-size: .72rem; }
.skill-details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.skill-details summary { width: fit-content; color: var(--teal); font-size: .8rem; font-weight: 650; cursor: pointer; }
.skill-details summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.skill-details summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; border-radius: 2px; }
.skill-details ul { margin-top: 10px; }
.skill-details li:first-child { border-top: 0; padding-top: 0; }


/* Individual skill illustrations remain decorative beside explicit text. */
.skill-chip-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; font-size: .95rem; line-height: 1; }
img.skill-brand-icon { object-fit: contain; background: #fff; border-radius: 4px; padding: 1px; }
.skill-groups { margin-top: 16px; }
.skill-group + .skill-group { margin-top: 14px; }
.skill-group h4 { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.skill-group .skill-tags { margin-top: 7px; }
