:root {
  color-scheme: light;
  --paper: #f7f4ed; --ink: #23231f; --muted: #68675e; --line: #d8d5cb; --focus: #325849;
  --serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.85 var(--sans); }
::selection { background: #dce5d6; color: var(--ink); }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { color: var(--focus); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font: 500 46px/1.4 var(--serif); }
h2 { font-weight: 600; font-size: 26px; line-height: 1.5; }
h3 { font-size: 21px; font-weight: 600; line-height: 1.6; }
p { overflow-wrap: anywhere; }
button, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.site-header, main, .site-footer { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 30px; border-bottom: 1px solid var(--line); }
.wordmark { text-decoration: none; font-weight: 600; font-size: 20px; white-space: nowrap; }
.wordmark span { margin-left: 12px; font-family: Georgia, serif; font-size: 15px; font-weight: 400; color: var(--muted); }
nav { display: flex; gap: 28px; }
nav a { text-decoration: none; font-size: 14px; padding: 10px 0; color: var(--muted); border-bottom: 1px solid transparent; }
nav a[aria-current] { color: var(--ink); border-color: var(--ink); }
main:focus { outline: none; }
.introduction { display: grid; grid-template-columns: 1.25fr 1fr; gap: 100px; padding-block: 76px 88px; }
.bio-copy h1 { font-size: 56px; }
.bio-copy h1 span { display: block; font: 400 24px/1.5 Georgia, serif; color: var(--muted); margin-top: 5px; }
.lead { font: 500 29px/1.75 var(--serif); margin: 28px 0 22px; }
.bio-copy > p:not(.lead) { margin-top: 14px; max-width: 36em; }
.intro-links { display: flex; gap: 28px; margin-top: 28px; font-size: 15px; }
.intro-links a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.intro-links span { margin-left: 10px; }
.education { padding-top: 10px; }
.education > h2 { font-size: 17px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.education article { padding-top: 23px; }
.education article + article { margin-top: 23px; border-top: 1px solid var(--line); }
.period, .school-en, .school-detail { font-size: 13px; color: var(--muted); }
.period { font-variant-numeric: tabular-nums; margin-bottom: 7px; }
.school-en { margin-top: 2px; margin-bottom: 9px; }
.school-detail { margin-top: 8px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 26px; }
.section-heading > p, .section-heading > a { font-size: 14px; color: var(--muted); }
.work-preview { border-top: 1px solid var(--line); padding-top: 38px; }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
figure a { display: block; background: #fff; }
figure a[data-lightbox] { cursor: zoom-in; }
figure img { display: block; width: 100%; height: auto; object-fit: contain; }
figcaption { font-size: 12px; line-height: 1.7; color: var(--muted); padding-top: 9px; }
.preview-grid figure img { height: 285px; }
.preview-grid h3 { margin-top: 20px; }
.preview-grid h3 a { text-decoration: none; }
.preview-grid p { font-size: 15px; margin-top: 12px; }
.home-notes { margin-top: 76px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 13px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; line-height: 1.85; background: var(--tag-bg); color: var(--tag-ink); white-space: nowrap; }
.tag-ai { --tag-bg: #e9e4f3; --tag-ink: #53416d; }
.tag-rag { --tag-bg: #e5e8f5; --tag-ink: #414f79; }
.tag-backend { --tag-bg: #e6eaed; --tag-ink: #455663; }
.tag-database { --tag-bg: #e2ecf4; --tag-ink: #305b79; }
.tag-ml { --tag-bg: #f3e3d8; --tag-ink: #824b2d; }
.tag-dataviz { --tag-bg: #f1e8ca; --tag-ink: #705b20; }
.tag-engineering { --tag-bg: #e9e7e2; --tag-ink: #53534b; }
.tag-bioinfo { --tag-bg: #dfece7; --tag-ink: #315f51; }
.tag-wetlab { --tag-bg: #f3e1e1; --tag-ink: #7c4147; }
.tag-ecology { --tag-bg: #e6ebd9; --tag-ink: #4d612e; }
.page-heading { padding: 60px 0 34px; }
.page-heading > p { margin-top: 16px; max-width: 48em; color: var(--muted); }
.page-heading .cross-reference { font-size: 13px; margin-top: 12px; }
.filter-panel { padding-bottom: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 9px 13px; font: 13px/1.5 var(--sans); border-radius: 4px; cursor: pointer; min-height: 40px; }
.filters button:hover { background: var(--tag-bg, #e9e7e2); }
.filters button[aria-pressed="true"] { background: var(--tag-bg, var(--ink)); color: var(--tag-ink, var(--paper)); border-color: var(--tag-ink, var(--ink)); }
.filter-count { font-size: 12px; color: var(--muted); margin-top: 12px; }
.project { border-top: 1px solid var(--line); padding: 36px 0 40px; scroll-margin-top: 28px; }
.project.with-media { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.project h2 { font-size: 23px; }
.project-meta { font-size: 12px; color: var(--muted); margin-top: 10px; font-variant-numeric: tabular-nums; }
.project-meta span { display: block; }
.project-intro { max-width: 46em; margin-top: 16px; }
.project-media { padding-top: 7px; }
.project-media figure + figure { margin-top: 20px; }
.project-media img { max-height: 310px; }
details { max-width: 46em; margin-top: 18px; }
summary { cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; padding: 7px 0; width: fit-content; }
details ul { padding-left: 22px; margin: 13px 0; font-size: 14px; }
details li + li { margin-top: 10px; }
.tools { font-size: 12px; color: var(--muted); margin-top: 18px; }
.note { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 23px 0 28px; border-top: 1px solid var(--line); }
.note h2 { font-size: 21px; font-weight: 500; }
.note .tags { margin-top: 0; margin-bottom: 9px; }
.note-status { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.notes-list { min-height: 44vh; }
.site-footer { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; border-top: 1px solid var(--line); margin-top: 68px; padding-block: 27px 32px; font-size: 12px; color: var(--muted); }
.site-footer > span { color: var(--ink); font-weight: 500; }
.site-footer a { margin-left: auto; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 10; background: var(--paper); padding: 10px; }
.skip-link:focus { top: 10px; }
.lightbox { position: fixed; inset: 0; width: fit-content; max-width: min(94vw, 1200px); max-height: 94dvh; padding: 48px 18px 15px; border: 0; background: var(--paper); color: var(--ink); text-align: center; }
.lightbox::backdrop { background: rgb(25 25 23 / 82%); }
.lightbox img { display: block; max-width: calc(94vw - 36px); max-height: 78dvh; width: auto; height: auto; margin: 0 auto; object-fit: contain; }
.lightbox p { padding-top: 8px; color: var(--muted); font-size: 13px; }
.lightbox-close { position: absolute; top: 10px; right: 12px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); padding: 5px 12px; font: 14px var(--sans); cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 850px) {
  .site-header, main, .site-footer { width: calc(100% - 48px); }
  .site-header { flex-wrap: wrap; gap: 16px; padding-block: 22px 16px; }
  nav { gap: 23px; }
  .introduction { gap: 40px; grid-template-columns: 1.2fr 1fr; padding-block: 48px 60px; }
  .bio-copy h1 { font-size: 45px; }
  .lead { font-size: 25px; }
  .project.with-media { gap: 28px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .preview-grid { gap: 24px; }
  .preview-grid figure img { height: 235px; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .site-header, main, .site-footer { width: calc(100% - 40px); }
  .site-header { display: block; }
  nav { justify-content: space-between; gap: 8px; margin-top: 13px; }
  nav a { font-size: 13px; white-space: nowrap; }
  .introduction { display: block; padding-block: 36px 42px; }
  .bio-copy h1 { font-size: 43px; }
  .bio-copy h1 span { font-size: 22px; }
  .lead { font-size: 25px; margin-top: 25px; }
  .education { margin-top: 40px; }
  .education h3 { font-size: 20px; }
  .section-heading { display: block; margin-bottom: 20px; }
  .section-heading > p, .section-heading > a { display: block; margin-top: 6px; }
  .section-heading h2 { font-size: 25px; }
  .preview-grid { grid-template-columns: 1fr; gap: 35px; }
  .preview-grid figure img { height: 260px; }
  .home-notes { margin-top: 48px; }
  .page-heading { padding: 36px 0 27px; }
  .page-heading h1 { font-size: 36px; }
  .project.with-media { display: block; }
  .project { padding-block: 28px 32px; }
  .project h2 { font-size: 21px; }
  .project-media { margin-top: 20px; }
  .project-media img { max-height: 340px; }
  .note h2 { font-size: 19px; }
  .note { gap: 14px; align-items: flex-start; }
  .note-status { padding-top: 4px; }
  .site-footer { margin-top: 45px; gap: 10px; }
  .site-footer p { width: 100%; order: 3; }
}
