@font-face {
  font-family: Inter;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 750;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #fff;
  --soft: #f8f8f8;
  --text: #2f2f2f;
  --heading: #222;
  --muted: #686868;
  --accent: #b03b3b;
  --accent-hover: #8c242d;
  --rule: #e5e5e5;
  --tint: #fbf1f1;
  --shadow: #18181825;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #000;
  --soft: #161b22;
  --text: #e6edf3;
  --heading: #e6edf3;
  --muted: #a5aeb7;
  --accent: #ed7676;
  --accent-hover: #ff9eab;
  --rule: #30363d;
  --tint: #2a191d;
  --shadow: #0008;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 22px }
body { margin: 0; font: 1rem/1.65 Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif; background: var(--page); color: var(--text); -webkit-font-smoothing: antialiased }
body:has(dialog[open]) { overflow: hidden }
h1, h2, h3, p, figure, ul { margin: 0 }
h1, h2, h3 { color: var(--heading); line-height: 1.2 }
a { color: var(--accent); text-decoration: none; text-underline-offset: .2em }
a:hover { color: var(--accent-hover); text-decoration: underline }
button { color: inherit; font: inherit; cursor: pointer }
button, a { -webkit-tap-highlight-color: transparent }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px }
svg { width: 1.12em; height: 1.12em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
.icons { position: absolute; width: 0; height: 0; overflow: hidden }
[hidden], .js-only { display: none !important }
.enhanced .js-only { display: inline-flex !important }
.skip { position: fixed; left: 10px; top: -80px; z-index: 10; border: 1px solid var(--accent); background: var(--page); padding: 7px 14px }
.skip:focus { top: 10px }
.page-layout { width: min(70rem, calc(100% - 4rem)); margin: 58px auto 2.5rem; display: grid; grid-template-columns: minmax(12.5rem,18.75rem) minmax(0,48.75rem); gap: 2.5rem; align-items: start; }
.profile { position: sticky; top: 28px; text-align: center; align-self: start; max-height: calc(100dvh - 38px); overflow-y: auto; scrollbar-width: thin; padding: 3px 8px 12px; }
.profile h1 { margin: 0 0 .9375rem; font-size: 1.75rem; font-weight: 600; letter-spacing: -.035em }
.profile h1 a:hover { text-decoration: none }
.portrait { display: block; width: 10rem; aspect-ratio: 1; margin: 0 auto .5rem; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 4px 20px var(--shadow) }
@media (hover: hover) and (pointer: fine) {
  .portrait { cursor: zoom-in }
  .profile:has(.portrait[data-enlarged]) { z-index: 5 }
  .portrait[data-enlarged] img { position: fixed; z-index: 1; left: var(--peek-x); top: var(--peek-y); width: var(--peek-w); height: var(--peek-h); pointer-events: none; box-shadow: 0 12px 38px var(--shadow), 0 0 0 3px var(--page) }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .portrait[data-enlarged] img { animation: portrait-peek-in .18s ease-out }
  @keyframes portrait-peek-in { from { transform: scale(.65) } }
}
.email { display: inline-block; font-size: 1rem; }
.socials { display: flex; align-items: center; justify-content: center; gap: .875rem; margin: .625rem 0 1.3125rem }
.socials a { display: grid; place-items: center; width: 2.1875rem; height: 2.1875rem }
.socials svg { width: 2rem; height: 2rem }
.socials a:hover { transform: translateY(-1px) }
#navigation { display: grid; justify-items: center; gap: .375rem }
#navigation a { padding: 0 .1875rem; font-size: 1.1rem; line-height: 1.65; letter-spacing: .01em }
#navigation a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; font-weight: 650 }
.profile-foot { display: flex; align-items: center; justify-content: center; gap: .4375rem; margin-top: 1.4375rem; color: var(--muted) }
.profile-foot small { font-size: .85rem }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent) }
.theme-toggle:hover { background: var(--tint) }
main { min-width: 0; padding-top: .625rem }
main:focus { outline: none }
main > section { margin-bottom: 1.875rem }
#about-me p + p { margin-top: 1.25rem }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .625rem }
.section-head h2 { display: inline-block; padding-bottom: .625rem; background: linear-gradient(var(--accent),var(--accent)) left bottom / 100% .1875rem no-repeat; font-size: 1.75rem; line-height: 1.15; font-weight: 600; letter-spacing: -.02em }
.reel-controls { gap: 5px; align-items: center }
.reel-controls button, .scholar-link, .paper-links a { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--accent); border: 1px solid var(--accent); background: var(--page); border-radius: 20px; }
.reel-controls button:hover, .scholar-link:hover, .paper-links a:hover { background: var(--tint); color: var(--accent-hover); text-decoration: none }
.reel-controls button { min-width: 30px; height: 30px; padding: 0; }
.reel-controls .reel-toggle { padding: 0 10px; font-size: .8rem }
.reel-controls svg { width: 14px; height: 14px }
.film-shell { overflow: hidden; border-radius: 8px; background: #1d1d20 }
.film-window { overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; touch-action: pan-x pan-y pinch-zoom }
.enhanced .film-window { scrollbar-width: none }
.enhanced .film-window::-webkit-scrollbar { display: none }
.film-track, .film-sequence { display: flex; width: max-content; align-items: stretch }
.film-sequence { position: relative; gap: 6px; padding-block: 12px; padding-inline-end: 6px }
.film-sequence::before, .film-sequence::after {
  content: ""; position: absolute; inset-inline: 0; height: 5px; pointer-events: none;
  background-image: linear-gradient(90deg, transparent 28%, #d1cbc5 28% 72%, transparent 72%);
  background-size: 23px 100%; background-repeat: round no-repeat;
}
.film-sequence::before { top: 3px }
.film-sequence::after { bottom: 3px }
.film-card { display: block; width: clamp(13.4375rem,18vw,16.5625rem); color: #fff; background: #272629; overflow: hidden; border-radius: 2px }
.film-card:hover { text-decoration: none; color: #fff }
.film-card:focus-visible { outline-offset: -3px; outline-color: #ffc1bf }
.media-frame { position: relative; display: block; isolation: isolate }
.media-frame img, .media-frame video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .2s }
.media-frame video { position: absolute; inset: 0; opacity: 0; pointer-events: none }
.media-frame.is-playing video { opacity: 1 }
.film-card .media-frame { aspect-ratio: 1.86; overflow: hidden; background: #18181a }
.film-card[data-zoom] .media-frame img { object-fit: contain; background: #fff }
.film-card.film-photo .media-frame img { object-fit: cover; background: #202224 }
.film-play { display: grid; place-items: center; width: 28px; height: 28px; position: absolute; right: 8px; bottom: 8px; border: 1px solid #ffffff8a; border-radius: 50%; background: #101014bb; color: white }
.film-play svg { width: 15px; height: 15px }
.film-copy { display: grid; gap: 3px; padding: 9px 12px 11px }
.film-copy strong { font-weight: 600; font-size: 1rem; line-height: 1.25 }
.film-copy small { font-size: .79rem; line-height: 1.35; color: #d0cdd1 }
.film-card.film-full-frame .media-frame :is(img,video) { object-fit: contain; transform: none }
.film-card[data-enlarged] .media-frame { z-index: 5 }
.film-card[data-enlarged] .media-frame video,
.film-card[data-zoom][data-enlarged] .media-frame img {
  pointer-events: none;
  position: fixed; inset: auto; left: var(--peek-x); top: var(--peek-y);
  width: var(--peek-w); height: var(--peek-h); object-fit: contain;
  border-radius: 6px; background: #18181a; box-shadow: 0 8px 26px var(--shadow);
}
.news .section-head h2 { background: none; padding: 0; font-size: 1.5rem; font-weight: 500 }
.news-list { list-style: none; padding: 0 0 0 .5625rem }
.news-list li { padding: 0 0 .625rem 1.1875rem; position: relative; border-left: .125rem solid var(--rule) }
.news-list li::before { content: ""; position: absolute; top: .295rem; left: -.4375rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--accent) }
.news-list time { display: block; margin-bottom: -.125rem; color: var(--accent); font-size: .8125rem; font-weight: 600; letter-spacing: .01em }
.news-list span { display: block; font-size: 1rem }
.earlier-news { margin-left: 4px }
.earlier-news summary { width: fit-content; cursor: pointer; color: var(--accent); font-size: .86rem }
.earlier-news ul { margin-top: 8px }
.scholar-link { font-size: .8rem; padding: 2px 10px }
.paper { display: grid; grid-template-columns: minmax(0,min(49%,23.75rem)) minmax(0,1fr); gap: 1.25rem; align-items: center; padding: .9375rem 0; border-bottom: 1px solid var(--rule) }
.paper:first-child { padding-top: 8px }
.paper-gallery { position: relative; min-width: 0; width: 100% }
.gallery-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; touch-action: pan-x pan-y pinch-zoom }
.enhanced .gallery-track { scrollbar-width: none }
.enhanced .gallery-track::-webkit-scrollbar { display: none }
.gallery-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none }
.gallery-track.is-dragging a { cursor: grabbing }
.gallery-slide { min-width: 0; scroll-snap-align: start }
.gallery-slide figcaption { display: flex; align-items: center; min-height: 33px; padding: 3px 0; color: var(--muted); font-size: .76rem; line-height: 1.22; font-weight: 520 }
.paper-gallery:has(.media-pagination) figcaption { padding-right: 90px }
.media-pagination { display: inline-flex; gap: 1px; align-items: center; color: var(--muted) }
.paper-gallery > .media-pagination { position: absolute; right: 0; bottom: 0; height: 33px; background: var(--page) }
.media-pagination button { display: grid; place-items: center; width: 27px; height: 27px; border: 0; border-radius: 50%; padding: 0; color: var(--accent); background: transparent }
.media-pagination button:hover { background: var(--tint); color: var(--accent-hover) }
.media-pagination svg { width: 15px; height: 15px }
.media-counter { min-width: 27px; text-align: center; font-size: .67rem; font-variant-numeric: tabular-nums; white-space: nowrap }
.paper-media { aspect-ratio: 16 / 9; border-radius: 6px; }
.paper-visual { position: absolute; inset: 0; display: block; pointer-events: none; border-radius: inherit; overflow: hidden; background: #fff; border: 1px solid var(--rule) }
.paper-visual img, .paper-visual video { object-fit: contain }
.paper-media:focus-visible { outline-offset: -3px; z-index: 1 }
.paper-visual::after { position: absolute; bottom: 6px; right: 6px; padding: 2px 6px; border-radius: 3px; font-size: .69rem; line-height: 1.45; color: white; background: #1b1b1de6; opacity: 0 }
.paper-media[data-demo] .paper-visual::after { content: "▶"; opacity: 1; border-radius: 50%; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; font-size: .65rem }
.paper-media.is-playing .paper-visual::after { opacity: 0 }
.paper-media[data-zoom] .paper-visual::after { content: "放大" }
.paper-media:hover .paper-visual::after, .paper-media:focus-visible .paper-visual::after { opacity: 1 }
@media(hover:hover) and (min-width:721px) and (prefers-reduced-motion:no-preference) {
  .paper-gallery:has([data-enlarged]) { z-index: 4 }
  .gallery-track:has([data-enlarged]) { z-index: 1 }
  .paper-media[data-enlarged] .paper-visual::after { opacity: 0 }
  .paper-media[data-enlarged] .paper-visual { position: fixed; inset: auto; left: var(--peek-x); top: var(--peek-y); width: var(--peek-w); height: var(--peek-h); box-shadow: 0 8px 26px var(--shadow); animation: paper-peek-in .16s ease-out }
}
@keyframes paper-peek-in { from { opacity: .65; transform: scale(.98) } }
@media(hover:none) { .paper-visual::after { opacity: 1 } }
.paper-copy { min-width: 0 }
.paper h3 { font-size: 1rem; font-weight: 700; line-height: 1.65; letter-spacing: normal; color: var(--accent) }
.paper-links { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 9px }
.paper-links a { padding: 1px 9px; font-weight: 570; font-size: .74rem; line-height: 1.55; letter-spacing: .015em; text-transform: uppercase }
.paper-summary { font-size: 1rem; line-height: 1.65 }
.paper-authors { margin-top: 1em; font-size: 1rem; line-height: 1.65; color: var(--muted) }
.paper-authors strong { color: var(--text); font-weight: 650 }
.paper-venue { margin-top: 4px; font-size: .85rem; font-weight: 570 }
.paper-venue span { color: var(--accent) }
.paper-venue span::before { content: " · "; color: var(--muted) }
.paper-note { color: var(--muted); margin-top: 5px; font-size: .78rem }
.background-grid { display: grid; gap: 20px }
.background-column { display: grid; gap: 20px }
.background h3 { font-size: 1.18rem; margin-bottom: 9px; font-weight: 630 }
.background p, .background li { font-size: .95rem }
.background p + p { margin-top: 7px }
.education-row { display: grid; gap: 14px; grid-template-columns: 7.5rem 1fr }
.education-row + .education-row { margin-top: 10px }
.background time { font-size: .85rem; color: var(--muted); padding-top: 2px }

.intern-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px }
.internship { border: 1px solid var(--rule); border-radius: 9px; background: var(--page); padding: 16px 18px }
.intern-heading { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin-bottom: 10px }
.intern-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px #232a301a }
.intern-mark.nio-mark { background: #182126; box-shadow: inset 0 0 0 1px #ffffff24 }
.intern-mark img { display: block; object-fit: contain }
.intern-heading h3 { font-size: 1.16rem; letter-spacing: -.025em }
.intern-heading time { color: var(--accent); font-size: .85rem; font-weight: 610; font-variant-numeric: tabular-nums }
.internship p { font-size: .94rem; line-height: 1.48 }
.internship .intern-team { color: var(--muted); margin: 5px 0 9px; font-size: .88rem }
.undergrad-stats { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 14px; border-block: 1px solid var(--rule); padding: 12px 0; margin: 15px 0 8px }
.undergrad-stats dt { font-size: .8rem; color: var(--muted); line-height: 1.4 }
.undergrad-stats dd { margin: 5px 0 0; font-size: 1.2rem; font-weight: 660; line-height: 1.25; color: var(--heading); font-variant-numeric: tabular-nums }
.undergrad-stats dd small { font-size: .8rem; font-weight: 460 }
.coursework summary, .award-archive summary { cursor: pointer; width: fit-content; color: var(--accent); padding-block: 5px; font-size: .9rem; font-weight: 550 }
.coursework table { border-collapse: collapse; margin: 7px 0 0; width: 100%; font-size: .9rem; line-height: 1.45 }
.coursework th, .coursework td { padding: 6px 10px; border-bottom: 1px solid var(--rule); text-align: left }
.coursework thead th { background: var(--soft) }
.coursework tbody th { font-weight: 460 }
.coursework tr > :last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.honors h3 { font-size: 1.1rem; margin: 0 0 15px }
.award-group + .award-group { margin-top: 25px }
.award-timeline, .award-items { padding: 0; margin: 0; list-style: none }
.award-year { display: grid; grid-template-columns: 6.1rem minmax(0,1fr); gap: 16px; position: relative; margin-left: 4px; border-left: 1px solid var(--rule); padding: 0 0 15px 15px; }
.award-year:last-child { padding-bottom: 5px }
.award-year::before { content: ""; position: absolute; left: -4px; top: .46rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent) }
.award-date { font-size: .86rem; line-height: 1.7; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600 }
.award-items { display: grid; gap: 5px; font-size: .95rem; line-height: 1.42 }
.award-items li { padding-left: 11px; position: relative }
.award-items li::before { content: ""; position: absolute; top: .62em; left: 0; width: 4px; height: 4px; background: var(--muted); border-radius: 50% }
.award-items strong { font-weight: 660; color: var(--heading) }
.award-items small { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px }
.award-archive { margin-top: 4px }
.award-archive[open] > summary { margin-bottom: 8px }
.paper-text { grid-template-columns: 1fr }
.paper-venue .journal-name { color: inherit }
.paper-venue .journal-name::before { content: none }
.demo-dialog { width: min(960px,calc(100% - 26px)); max-height: 93dvh; margin: auto; padding: 0; color: var(--text); background: var(--page); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 24px 90px #0005 }
.demo-dialog::backdrop { background: #151519c9; backdrop-filter: blur(3px) }
.dialog-bar, .dialog-details { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 18px }
.dialog-bar h2 { font-size: clamp(1rem,2.2vw,1.35rem); line-height: 1.3; margin-right: auto; overflow-wrap: anywhere }
.dialog-bar > button { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; color: var(--accent); background: var(--page); border: 1px solid var(--rule) }
.mode-switch { display: inline-flex; align-items: center; border: 1px solid var(--accent); border-radius: 5px; overflow: hidden; flex: none }
.mode-switch button { padding: 4px 9px; font-size: .85rem; color: var(--accent); background: transparent; border: 0 }
.mode-switch button[aria-pressed=true] { color: var(--page); background: var(--accent) }
.demo-dialog > video { display: block; width: 100%; max-height: 70dvh; background: #111; object-fit: contain }
.figure-pane { overflow: auto; max-height: 70dvh; background: var(--soft) }
.figure-pane img { display: block; margin-inline: auto; width: auto; height: auto; max-width: 100%; max-height: 70dvh }
.figure-pane.full-size img { max-width: none; max-height: none }
.full-figure { border: 0; padding: 0; color: var(--accent); background: transparent; font: inherit }
.full-figure:hover { text-decoration: underline }
.dialog-details { font-size: .88rem; flex-wrap: wrap }
.dialog-details p { flex: 1 1 22em }
.dialog-details p:empty { display: none }
.dialog-links { display: flex; flex-wrap: wrap; gap: 12px }
@media(min-width:1500px) { html { font-size: 105% } }
@media(min-width:1700px) { html { font-size: 110% } }
@media(min-width:1900px) { html { font-size: 118% } }
@media(min-width:2300px) { html { font-size: 132% } }
@media(min-width:2800px) { html { font-size: 150% } }
@media(max-width:960px) {
  .page-layout { display: block; width: min(780px,calc(100% - 40px)); margin-block: 28px }
  .profile { position: static; max-height: none; overflow: visible; padding: 0 0 18px; border-bottom: 1px solid var(--rule) }
  .profile h1 { font-size: 1.85rem; margin-bottom: 11px }
  .portrait { width: 135px }
  .socials { margin: 7px 0 10px }
  #navigation { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px 13px }
  #navigation a { font-size: .93rem }
  .profile-foot { margin-top: 8px }
  main { padding-top: 22px }
  main > section { margin-bottom: 30px }
  .film-card { width: clamp(218px,35vw,260px) }
}
@media(max-width:600px) {
  .page-layout { width: calc(100% - 34px); margin-block: 18px }
  .profile { display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: "photo name" "photo email" "photo social" "navigation navigation" "foot foot"; text-align: left; column-gap: 14px; align-items: center; padding-bottom: 10px }
  .profile h1 { grid-area: name; margin: 0; font-size: clamp(1.34rem,5.7vw,1.75rem); line-height: 1.15 }
  .portrait { grid-area: photo; width: clamp(68px,19vw,94px); margin: 0 }
  .profile .email { grid-area: email; font-size: .9rem }
  .socials { grid-area: social; justify-content: flex-start; gap: 8px; margin: 0 }
  .socials a { width: 32px; height: 32px }
  .socials svg { width: 23px; height: 23px }
  #navigation { grid-area: navigation; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; justify-items: center; margin-top: 10px; gap: 0 2px }
  #navigation a { display: inline-flex; align-items: center; min-height: 37px; font-size: clamp(.8rem,3.65vw,.91rem); padding-inline: 1px; white-space: nowrap }
  .profile-foot { grid-area: foot; margin-top: 3px }
  .intern-list { grid-template-columns: 1fr; gap: 9px }
  .internship { padding: 12px 14px }
  .internship .intern-team { margin-block: 3px 5px }
  .undergrad-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px }
  .undergrad-stats > div:last-child { grid-column: 1/-1 }
  .award-year { grid-template-columns: 1fr; gap: 3px; padding-bottom: 14px }
  .award-items { gap: 6px }
  .paper-links a { min-height: 32px; padding: 4px 10px }
  .reel-controls button { min-width: 34px; height: 34px }
  .coursework summary, .award-archive summary, .earlier-news summary { padding-block: 8px }
  .section-head { gap: 9px }
  .section-head h2 { font-size: 1.55rem }
  .paper { grid-template-columns: 1fr; gap: 12px }
  .paper-gallery { max-width: 420px }
  .paper-gallery > .media-pagination, .gallery-slide figcaption { min-height: 40px }
  .media-pagination button { width: 37px; height: 38px }
  .paper-gallery:has(.media-pagination) figcaption { padding-right: 108px }
  .film-card { width: clamp(198px,64vw,241px) }
  .reel-controls { gap: 4px }
  .reel-controls .reel-toggle { padding: 0 7px }
  .education-row { grid-template-columns: 6.25rem 1fr; gap: 8px }
  .dialog-bar, .dialog-details { padding: 10px 12px }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important }
}
