:root {
  color-scheme: light;
  --ink: #3d4144;
  --muted: #5f666e;
  --accent: #1769a4;
  --line: #dce4e2;
  --paper: #fff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.5 var(--font-sans); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.container { width: min(calc(100% - clamp(2rem, 4vw, 4rem)), 70rem); margin-inline: auto; }
.masthead { border-bottom: 1px solid #eceeef; }
nav { display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; min-height: 3.625rem; padding-block: .55rem; }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { text-decoration: underline; }
.site-name { color: #3f464d; font-size: 1.5rem; font-weight: 600; line-height: 1.4; }
.site-name span { margin-inline-start: .4em; color: #747b82; font-weight: 500; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: #606970; font-size: .9375rem; font-weight: 500; line-height: 1.4; }
.layout { display: grid; grid-template-columns: clamp(10rem, 18vw, 14rem) minmax(0, 1fr); gap: clamp(2rem, 5.5vw, 4.5rem); padding-block: 2.5rem 5rem; }
.profile { align-self: start; padding-top: .35rem; }
.profile h1 { margin: 0 0 .8rem; font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.profile h1 span { display: block; margin-top: .35rem; color: #747b82; font-size: 1rem; font-weight: 500; }
.profile p, .profile li { font-size: 1rem; line-height: 1.55; }
.profile a { color: inherit; text-decoration: none; }
.profile a:hover { text-decoration: underline; }
.profile li > i, .profile li a > i { width: 1.25rem; margin-inline-end: .35rem; text-align: center; }
@media (min-width: 801px) {
  .profile { position: sticky; top: 2.5rem; }
}
.intro p { font-size: 1.0625rem; line-height: 1.75; }
.intro p + p { margin-top: 1.45rem; }
.profile ul { list-style: none; padding: 0; margin: 1.3rem 0 0; }
.profile li + li { margin-top: .65rem; }
h2 { margin: 0 0 1rem; padding-bottom: .75rem; border-bottom: 1px solid #eceeef; font-size: clamp(1.625rem, 2.4vw, 1.875rem); line-height: 1.25; font-weight: 700; }
p { margin: 0; }
p + p { margin-top: .8rem; }
section { scroll-margin-top: 1rem; }
section + section { margin-top: clamp(2.75rem, 5vw, 4.25rem); }
.work { margin: 1.4rem 0 0; }
.work + .work { margin-top: 1.45rem; }
.work-with-figure { display: grid; grid-template-columns: minmax(0, 25%) minmax(0, 1fr); align-items: start; gap: .75rem 1.35rem; }
.work-figure { display: block; border: 1px solid var(--line); background: #fff; }
.work-figure img { display: block; width: 100%; height: auto; }
.work-figure { cursor: zoom-in; }
body:has(.figure-viewer[open]) { overflow: hidden; }
.figure-viewer {
  width: min(95vw, 100rem);
  max-width: none;
  max-height: none;
  overflow: visible;
  border: 0;
  padding: 0;
  color: white;
  background: transparent;
}
.figure-viewer::backdrop { background: rgb(12 20 24 / 88%); }
.figure-stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding-top: 2.7rem; }
.figure-stage figure { margin: 0; text-align: center; pointer-events: none; }
.figure-stage img { display: block; width: auto; max-width: 100%; max-height: 75dvh; margin: auto; background: #fff; pointer-events: auto; }
.figure-stage figcaption { margin-top: .65rem; font-size: .9rem; }
.figure-stage button { width: 2.75rem; height: 2.75rem; border: 1px solid #a8b1b7; border-radius: 50%; background: #20282d; color: white; font: 1.75rem/1 system-ui; cursor: pointer; }
.figure-stage button:focus-visible { outline-color: white; }
.figure-close { position: absolute; top: 0; right: 0; }
h3, h4 { margin: 0; font-size: 1rem; line-height: 1.45; }
.work h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.work p, .award-entry p, .internship-entry p { font-size: .8125rem; line-height: 1.45; }
.entry:not(.award-entry):not(.internship-entry) p { font-size: .875rem; line-height: 1.55; }
.meta { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.work p { margin-top: .2rem; }
.work .meta:has(strong) { color: #50585e; }
.paper-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.paper-links a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: .35rem; color: var(--ink); font-size: .875rem; text-decoration: none; }
.paper-links a:hover { border-color: var(--accent); color: var(--accent); }
.subhead { margin: 1.5rem 0 .35rem; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.entry h4 { font-size: 1rem; font-weight: 700; }
.entry { display: flex; justify-content: space-between; gap: .5rem 1.25rem; padding-block: .55rem; }
.entry p + p { margin-top: .2rem; }
.entry .education-results { margin-top: .8rem; color: var(--muted); }
.education-rank { color: #bd292e; font-weight: 600; }
.education-award { color: #996000; font-weight: 600; }
.award-entry { align-items: baseline; padding-block: .5rem; }
.award-entry h4, .internship-entry h3 { font-size: .9375rem; line-height: 1.35; }
#cv, #internships { margin-top: 2.65rem; }
#cv h2, #internships h2 { font-size: 1.625rem; margin-bottom: .65rem; }
.date { flex-shrink: 0; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-block: 1.2rem; }
.skip { position: absolute; transform: translateY(-150%); background: white; padding: .5rem; }
.skip:focus { transform: translateY(0); z-index: 1; }
@media (max-width: 800px) {
  .container { width: calc(100% - 2rem); }
  nav { flex-wrap: wrap; gap: .55rem 1rem; }
  .nav-links { gap: 1rem; }
  .site-name { font-size: 1.25rem; }
  h2 { font-size: 1.75rem; }
  .intro p { font-size: 1rem; }
  .layout { grid-template-columns: 1fr; padding-block: 1.8rem 2.75rem; gap: 2.25rem; }
  .profile ul { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; }
  .profile li + li { margin: 0; }
  .entry { flex-wrap: wrap; }
  .work-with-figure { grid-template-columns: 1fr; }
  .work-figure { max-width: 17rem; }
}
@media print {
  .masthead, .profile ul, footer, .skip { display: none; }
  .layout { display: block; padding: 0; }
  .profile { margin-bottom: 1rem; }
  .work, .entry { break-inside: avoid; }
}

.paper-links svg { width: .9rem; height: .9rem; }
.paper-links .arxiv-mark { color: #b31b1b; }
.internship-entry { display: grid; grid-template-columns: 2.375rem minmax(0, 1fr) auto; align-items: center; gap: .3rem .75rem; padding-block: .5rem; }
.internship-entry img { width: 2.375rem; height: 2.375rem; object-fit: contain; }
@media (max-width: 560px) {
  .internship-entry { grid-template-columns: 2.375rem minmax(0, 1fr); }
  .internship-entry img { grid-row: span 2; }
  .internship-entry .date { grid-column: 2; }
}
