:root {
  color-scheme: dark;
  --background: #10151f;
  --header-background: rgba(16,21,31,.97);
  --ink: #e7edf5;
  --muted: #a8b4c5;
  --accent: #8ebaff;
  --line: #2a3546;
  --wash: #182232;
  --header-offset: 5rem;
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #ffffff;
  --header-background: rgba(255,255,255,.97);
  --ink: #202b32;
  --muted: #58656e;
  --accent: #245fbd;
  --line: #e3e8ef;
  --wash: #f4f7fc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }
body { margin: 0; background: var(--background); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .news-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.28; }
h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); letter-spacing: -.045em; font-weight: 700; }
h2 { font-size: 1.55rem; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
strong { font-weight: 600; }
img { display: block; max-width: 100%; }
.page-shell, .header-inner { width: min(100% - 3rem, 960px); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-background); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1.2rem; }
.site-name { font-size: 1rem; font-weight: 650; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
nav { display: flex; gap: 1.7rem; margin-left: auto; }
nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .9rem; font-weight: 500; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--accent); text-decoration: none; }
nav a[aria-current] { border-bottom-color: var(--accent); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.theme-icon--moon { display: none; }
:root[data-theme="light"] .theme-icon--sun { display: none; }
:root[data-theme="light"] .theme-icon--moon { display: block; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 174px; gap: 3rem; align-items: start; padding: 3.3rem 0 2.2rem; }
.intro-role { color: var(--muted); font-size: 1.08rem; margin-top: .6rem; margin-bottom: 1.45rem; }
.intro-copy > p:not(.intro-role) { margin-top: 1rem; }
.portrait { width: 174px; height: 210px; object-fit: cover; object-position: center 32%; border-radius: 5px; margin-top: .3rem; }
.profile-links { display: flex; flex-wrap: wrap; gap: .1rem .6rem; margin-top: 1.2rem; }
.profile-links a, .text-link, .project-actions a { font-size: .9rem; font-weight: 650; }
.profile-links a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.profile-icon { display: block; flex: none; }
.section { padding: 1.8rem 0 2rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.section > h2 { margin-bottom: 1.1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.section-intro { color: var(--muted); margin-bottom: 1.5rem; }
.legacy-anchor { display: block; scroll-margin-top: var(--header-offset); }
.publication-group + .publication-group { margin-top: 1.8rem; }
.publication-year { font-size: 1.1rem; color: var(--ink); font-weight: 700; margin-bottom: 1rem; }
.news-scroll { max-height: 28rem; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--accent) var(--wash); padding-right: .65rem; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 1.5rem; padding: .65rem 0; font-size: .95rem; }
.news-date { font-size: .87rem; color: var(--muted); padding-top: .1rem; }
.conference-icon { display: inline-block; height: 1.1rem; width: auto; max-width: 4rem; object-fit: contain; vertical-align: -.12em; margin-right: .45rem; }
.conference-icon--vldb { width: 1.2rem; height: 1.2rem; vertical-align: -.2em; }
.conference-icon--icde { width: 2.2rem; height: 1.2rem; object-fit: cover; object-position: left; vertical-align: -.2em; }
.conference-icon--document, .conference-icon--talk, .conference-icon--award { color: var(--accent); }
:root:not([data-theme="light"]) img.conference-icon { background: #f8fafc; border-radius: 2px; box-shadow: 0 0 0 2px #f8fafc; }
.project { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; padding-block: 1.9rem; border-top: 1px solid var(--line); scroll-margin-top: 6.5rem; }
.publication-year + .project { border-top: 0; padding-top: .5rem; }
.project-visual { display: flex; align-items: center; justify-content: center; align-self: start; min-width: 0; aspect-ratio: 5 / 3; padding: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.project-visual img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.project-program { display: inline-block; color: var(--muted); font-size: .82rem; font-weight: 500; margin-bottom: .45rem; }
.project-title { font-size: 1.1rem; font-weight: 650; }
.project-title a { color: var(--ink); }
.project-authors { color: var(--muted); font-size: .87rem; line-height: 1.6; margin-top: .7rem; }
.project-authors strong { color: var(--ink); }
.project-venue { font-size: .88rem; font-weight: 600; margin-top: .45rem; }
.project-note { font-size: .83rem; color: var(--muted); margin-top: .45rem; }
.project-actions { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin-top: .3rem; }
.project-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.citation { margin-top: .65rem; padding: 1rem; background: var(--wash); border-radius: 3px; min-width: 0; scroll-margin-top: 7rem; }
.citation:not(:target):not(.is-open) { display: none; }
.citation-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); font-size: .82rem; }
.copy-citation { padding: 0 .2rem; min-height: 44px; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: .88rem; font-weight: 650; }
.copy-citation:hover { text-decoration: underline; }
.citation pre { margin: .5rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .8rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.timeline-list { list-style: none; margin: 1.7rem 0 0; padding: 0; }
.timeline-list li { position: relative; display: grid; grid-template-columns: 132px 48px minmax(0, 1fr); align-items: center; gap: 1.4rem; padding: 0 0 2rem; }
.timeline-list li:last-child { padding-bottom: 0; }
.timeline-list li:not(:last-child)::after { content: ""; position: absolute; left: 178px; top: 54px; bottom: 7px; width: 1px; background: var(--line); }
.timeline-date { color: var(--muted); font-size: .87rem; }
.organization-icon { width: 48px; height: 48px; object-fit: contain; border-radius: 3px; }
.timeline-list h3 { font-size: 1rem; }
.timeline-list h3 a { color: var(--ink); }
.timeline-list p { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.teaching-list { margin: 1.6rem 0 0; }
.teaching-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; border-top: 1px solid var(--line); padding-block: .95rem; }
.teaching-list dt { font-size: .95rem; }
.course-code { display: inline-block; min-width: 74px; font-weight: 650; }
.teaching-list dd { color: var(--muted); font-size: .87rem; margin: 0; text-align: right; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.7rem 2.6rem; color: var(--muted); font-size: .85rem; }
.site-footer a { padding-block: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 30; padding: .75rem 1rem; background: var(--background); }
.skip-link:focus { top: .6rem; }
@media (max-width: 700px) {
  :root { --header-offset: 7rem; }
  .page-shell, .header-inner { width: calc(100% - 2.5rem); }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 0; padding-top: .25rem; min-height: 92px; }
  .site-name { font-size: .95rem; grid-column: 1; grid-row: 1; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  nav { width: 100%; justify-content: space-between; gap: .8rem; margin-left: 0; grid-column: 1 / -1; grid-row: 2; }
  nav a { font-size: .87rem; }
  .intro { grid-template-columns: minmax(0, 1fr) 96px; column-gap: 1.3rem; row-gap: 1.5rem; padding: 1.8rem 0 1.9rem; }
  .intro-copy { display: contents; }
  .intro h1 { grid-column: 1; grid-row: 1; font-size: clamp(1.85rem, 6.5vw, 2.5rem); }
  .intro-role { grid-column: 1; grid-row: 2; font-size: .92rem; margin: 0; align-self: start; }
  .portrait { grid-column: 2; grid-row: 1 / span 2; width: 96px; height: 122px; margin-top: 0; align-self: center; }
  .intro-copy > p:not(.intro-role) { grid-column: 1 / -1; margin-top: 0; }
  .profile-links { grid-column: 1 / -1; margin-top: -.6rem; }
  .section { padding: 1.5rem 0 1.7rem; }
  h2 { font-size: 1.4rem; }
  .news-scroll { max-height: 48rem; }
  .news-list li { grid-template-columns: minmax(0, 1fr); gap: .2rem; padding-block: .75rem; }
  .news-date { padding: 0; font-size: .83rem; }
  .project { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding-block: 1.7rem; scroll-margin-top: 8rem; }
  .project-visual { width: 100%; padding: .8rem; }
  .project-title { font-size: 1.12rem; }
  .project-program { font-size: .85rem; }
  .project-authors, .project-venue { font-size: .9rem; }
  .project-note { font-size: .87rem; }
  .project-actions { gap: 0 1.2rem; }
  .timeline-list li { grid-template-columns: 40px minmax(0, 1fr); gap: .35rem 1rem; padding-bottom: 1.8rem; }
  .timeline-date { grid-column: 2; font-size: .83rem; }
  .organization-icon { grid-column: 1; grid-row: auto / span 2; width: 40px; height: 40px; }
  .timeline-list li > div { grid-column: 2; }
  .timeline-list li:not(:last-child)::after { left: 19px; top: 64px; bottom: 7px; }
  .teaching-list > div { display: block; }
  .teaching-list dt { display: flex; gap: .4rem; }
  .course-code { flex: 0 0 66px; min-width: 0; }
  .teaching-list dd { text-align: left; margin: .3rem 0 0 72px; }
  .site-footer { display: block; padding-bottom: 1.8rem; }
  .site-footer a { display: inline-block; margin-top: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
