:root {
  color-scheme: light dark;
  --background: #f5f7f9;
  --surface: #e5ebf0;
  --ink: #202f3d;
  --muted: #526578;
  --accent: #355773;
  --border: #cdd7df;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--background); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: 36px; line-height: 1.3; font-weight: 500; margin-bottom: 22px; letter-spacing: -.025em; }
h2 { font-size: 20px; line-height: 1.5; font-weight: 500; margin-bottom: 22px; }
h3 { font-size: 15px; line-height: 1.5; font-weight: 600; margin-bottom: 5px; }
p { margin-bottom: 14px; }
.site-shell { max-width: 880px; padding: 0 24px; margin: auto; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 38px; padding: 72px 0 24px; align-items: center; }
.portrait img { display: block; width: 190px; height: auto; border-radius: 9px; }
.profile-links, .paper-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.profile-links { margin-top: 22px; }
.email { margin: 14px 0 0; }
.email a { color: var(--ink); }
.section-menu { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 30px; }
.section-menu a { font-size: 23px; font-weight: 400; color: var(--muted); padding: 3px 0; border-bottom: 2px solid transparent; }
.section-menu a:hover { color: var(--accent); text-decoration: none; }
.section-menu a[aria-current="true"] { color: var(--accent); border-color: var(--accent); }
.section-content { min-height: 270px; padding-bottom: 35px; }
.content-panel { padding: 4px 0 26px; }
.content-panel[hidden] { display: none; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.section-heading > a { font-size: 13px; }
.research-entry { margin: 0 0 28px; }
.research-entry p { margin-bottom: 6px; }
.research-entry.has-image { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 25px; align-items: start; }
.entry-image { display: block; width: 150px; max-height: 130px; object-fit: contain; }
.project-media { display: flex; flex-wrap: wrap; align-items: start; gap: 16px; margin: 20px 0; }
.project-media img { width: auto; max-width: 100%; max-height: 360px; }
.authors { font-size: 14px; }
.entry-meta { color: var(--muted); font-size: 14px; font-style: italic; }
.paper-links { font-size: 14px; gap: 16px; }
.entry-description { margin-top: 12px; }
.site-footer { padding: 20px 0 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.site-footer p { margin-bottom: 5px; }
.ai-disclosure { color: var(--muted); font-size: 12px; }
.page-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 30px 0; }
.page-nav a:first-child { color: var(--ink); font-weight: 600; margin-right: auto; }
.fun-page, .personal-post { padding: 24px 0 45px; }
.fun-page section { margin: 30px 0; }
.personal-post h1 { margin-top: 22px; }
.personal-post h2 { margin: 28px 0 14px; }
.personal-entry { margin-bottom: 24px; }
.personal-entry p { margin: 5px 0; }
.personal-entry .entry-image { margin-bottom: 12px; }
.empty-note { color: var(--muted); font-size: 14px; }
.text-link { font-size: 14px; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 10px 20px; background: var(--background); z-index: 2; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.post-headline { margin-top: 28px; }
.meta { color: var(--muted); }
main > p, main > h2 { margin: 24px 0; }
main > .profile { float: right; width: 180px; margin: 25px 0 25px 30px; border-radius: 9px; }
main::after { content: ""; display: block; clear: both; }
.gallery { display: grid; gap: 24px; padding: 24px 0; }
.projectTile h2 { margin-bottom: 8px; }
pre { overflow-x: auto; padding: 20px; background: var(--surface); }
@media (max-width: 620px) {
  .site-shell { padding: 0 22px; }
  .intro { grid-template-columns: minmax(0, 1fr) 145px; gap: 22px; padding-top: 38px; }
  .portrait img { width: 145px; }
  .section-menu { gap: 8px 20px; }
  .section-menu a { font-size: 20px; }
}
@media (max-width: 460px) {
  .intro { display: flex; flex-direction: column-reverse; align-items: flex-start; }
  .portrait img { width: 140px; }
  h1 { font-size: 32px; margin-bottom: 18px; }
  .research-entry.has-image { grid-template-columns: 1fr; gap: 14px; }
  .section-menu { gap: 8px 18px; }
  .section-menu a { font-size: 19px; }
  .page-nav a:first-child { flex-basis: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root { --background: #17232f; --surface: #233647; --ink: #edf2f6; --muted: #b0c0ce; --accent: #a3c6e1; --border: #3b5062; }
}
