:root {
  --ink: #444;
  --muted: #77727d;
  --accent: #593196;
  --accent-dark: #3f236b;
  --blue: #667eea;
  --deep-blue: #002fa7;
  --line: #e6e2eb;
  --nav: #17141f;
  --surface: #f9f8fc;
  --font: "Gill Sans", "Gill Sans MT", sans-serif;
  --heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #a78ac6; outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; }
h1, h2, .brand, .site-header nav { font-family: var(--heading); }
h1 { font-size: 24.5px; font-weight: 500; margin-bottom: 8px; }
h2 { font-size: 28px; font-weight: 500; }
h3 { font-size: 21px; font-weight: 500; }
h4 { font-size: 16px; }

.site-shell { width: min(1100px, max(860px, 68%)); max-width: calc(100% - 48px); margin: 0 auto 30px; }
.site-header { min-height: 83px; padding: 0 20px; border-bottom: 4px solid #af98c6; background: var(--nav); display: flex; align-items: center; gap: 30px; position: sticky; top: 0; z-index: 10; }
.brand { font-size: 17.5px; font-weight: 400; color: #f9f8fa; white-space: nowrap; }
.brand strong { font-weight: 500; }
.brand:hover { color: #fff; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: #aba7b1; font-size: 14px; padding: 26px 0; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a.active { color: #fff; text-decoration: none; }
.menu-toggle { display: none; }
main { padding: 24px 49px 0; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 30px; align-items: start; }
.intro-main, .sidebar, .publication-content { min-width: 0; }
.about p { margin-bottom: 16px; }
.about strong { font-weight: 700; }
.affiliation { color: var(--accent); }
.research { margin-top: 24px; }
.subheading { font-family: var(--font); font-size: 20px; font-weight: 500; margin-bottom: 12px; }
.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.research-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgb(23 20 31 / 4%); }
.research-card h3 { font-size: 16.8px; font-weight: 700; }
.research-card p { line-height: 1.6; margin: 8px 0 14px; }
.research-card a { color: var(--blue); font-size: 16px; font-weight: 600; }
.research-card a:hover { color: #465bc0; }
.research-card a { margin-top: auto; }
.contact-note { color: var(--deep-blue); font-size: 16px; font-weight: 700; margin-top: 22px; }
.contact-note a { color: inherit; text-decoration: underline; }

.profile-card { background: var(--surface); padding: 10px 10px 18px; text-align: center; margin-top: 10px; }
.portrait { width: 96px; height: 107px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: #e9e2f0; color: #6a507f; font: 40px Georgia, serif; letter-spacing: -4px; border-radius: 3px; }
.portrait-line { display: none; }
.profile-card h2 { font: 500 21px/1.2 var(--font); margin-bottom: 5px; }
.profile-affiliation { font-size: 14px; }
.profile-location { font-size: 12px; color: var(--muted); }
.social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin: 12px 0 17px; }
.social-links a { width: 29px; height: 29px; border-radius: 3px; background: var(--accent); color: #fff; display: flex; justify-content: center; align-items: center; }
.social-links a:hover { background: var(--accent-dark); text-decoration: none; }
.social-links svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.social-links span { font-size: 13px; font-weight: 600; }
.profile-education { border-top: 1px solid var(--line); padding-top: 14px; text-align: left; }
.profile-education p { font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.profile-education p:last-child { margin-bottom: 0; }
.profile-education p > span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.profile-education strong { display: block; font-weight: 700; color: var(--accent); }
.profile-education small { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 3px; }

.news { margin-top: 30px; padding: 16px 23px; background: var(--surface); }
.news h2 { font: 500 21px/1.2 var(--font); margin-bottom: 12px; }
.news article { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 16px; position: relative; margin-left: 4px; padding: 8px 0 8px 18px; border-left: 2px solid #e4ddef; }
.news article::before { content: ""; width: 7px; height: 7px; border-radius: 50%; position: absolute; left: -4.5px; top: 16px; background: var(--blue); box-shadow: 0 0 0 3px #eeeafa; }
.news time { color: var(--blue); font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.news p { font-size: 14px; line-height: 1.6; }

.page-section { margin-top: 32px; }
.section-heading { margin-bottom: 10px; }
.heading-link { font-size: .8em; font-weight: 400; }
.section-intro { font-size: 16px; margin-bottom: 14px; }
.publication-filters { display: flex; gap: 5px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.publication-filters button { cursor: pointer; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; padding: 2px 0 4px; font-size: 13px; line-height: 1.6; }
.publication-filters button:hover { color: var(--accent); }
.publication-filters button.selected { color: var(--accent); border-bottom-color: var(--accent); }
.publication-group { background: var(--surface); padding: 15px 23px 5px; margin-top: 18px; font: 14px/1.5 var(--heading); }
.publication-group:first-child { margin-top: 0; }
.publication-group > h3 { font: 500 21px/1.2 var(--heading); margin-bottom: 3px; }
.publication { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.publication:last-child { border-bottom: 0; }
.publication[hidden], .publication-group[hidden] { display: none; }
.publication-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 3px; }
.venue-badge { display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; font: 600 11.2px/1.4 var(--heading); padding: 4px 9px; border-radius: 4px; box-shadow: 0 2px 4px rgb(23 20 31 / 12%); }
.paper-year { font-size: 12px; color: var(--muted); padding-left: 1px; }
.paper-thumbnail { display: block; width: 100%; margin-top: 3px; color: var(--muted); }
.paper-thumbnail img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 5px rgb(23 20 31 / 8%); }
.paper-thumbnail span { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; text-align: center; }
.paper-thumbnail:hover { text-decoration: none; }
.paper-thumbnail:hover img { border-color: #a58bbb; }
.publication h4 { font: 700 14px/1.5 var(--heading); margin-bottom: 5px; }
.publication h4 a { color: var(--ink); }
.publication h4 a:hover { color: var(--accent); }
.authors { font-size: 14px; line-height: 1.5; margin-bottom: 3px; }
.authors strong { font-weight: 700; }
.paper-venue { font-size: 13.3px; line-height: 1.5; color: #666; }
.paper-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.paper-links > a, .paper-links > button { border: 0; background: #b8bfd9; color: #303d60; display: inline-block; padding: 3px 9px; border-radius: 4px; font: 600 11.2px/1.5 var(--heading); cursor: pointer; box-shadow: 0 2px 4px rgb(23 20 31 / 10%); }
.paper-links .paper-link-pdf { background: #b1c4e2; color: #244568; }
.paper-links .paper-link-bib { background: #bab5d6; color: #463263; }
.paper-links .paper-link-summary { background: #c8c1c6; color: #4c3c47; }
.paper-links > a:hover, .paper-links > button:hover { filter: brightness(.95); text-decoration: none; }
.paper-links > button[aria-expanded="true"] { box-shadow: inset 0 0 0 1px currentColor; }
.paper-details { margin-top: 12px; font-size: 14px; color: #625b6a; background: #fff; border-left: 2px solid #c7b2da; padding: 12px 15px; }
.paper-details[hidden] { display: none; }
.bibtex-wrap { position: relative; }
.bibtex-wrap pre { margin: 0; padding-top: 24px; font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-bib { position: absolute; right: 8px; top: 8px; font-size: 11px; cursor: pointer; background: white; color: var(--accent); border: 1px solid #d6c9df; border-radius: 3px; padding: 2px 7px; }

.experience-entry { padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.experience-entry:last-child { border-bottom: 0; }
.entry-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 12px; }
.entry-heading h3 { font-size: 21px; font-weight: 600; color: var(--accent); }
.entry-role { font-size: 14px; color: #666; margin-top: 4px; }
.entry-heading time, .education-entry time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.experience-entry > p { font-size: 16px; line-height: 1.6; }
.project-list { display: grid; gap: 14px; margin-top: 15px; padding-left: 17px; border-left: 2px solid #e4ddef; }
.project-list h4 { font-size: 16px; font-weight: 400; font-style: italic; color: #4f608f; }
.project-list p { font-size: 16px; line-height: 1.6; color: var(--ink); margin-top: 4px; }
.experience-subheading { font: 500 21px/1.2 var(--heading); margin-top: 25px; }
.education-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.education-entry:last-child { border-bottom: 0; }
.degree-icon { display: none; }
.education-entry h3 { font-size: 19px; font-weight: 600; color: var(--accent); }
.education-entry p { font-size: 15px; margin-top: 4px; }
.education-entry p.muted { font-size: 13px; color: var(--muted); margin-top: 1px; }
.contact-section { margin-top: 30px; padding: 24px 0 28px; border-top: 1px solid var(--line); }
.contact-section h2 { font: 500 21px/1.2 var(--font); }
.contact-section p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.contact-section > a { display: inline-block; font-size: 15px; margin-top: 8px; overflow-wrap: anywhere; }
footer { padding: 24px 49px; background: var(--nav); color: #b9b2c0; display: flex; align-items: center; gap: 16px; font-size: 11px; }
footer p:nth-child(2) { margin-left: auto; }
footer a { color: #d1bddf; }
footer a:hover { color: #fff; }
footer > a { white-space: nowrap; }
.toast { position: fixed; z-index: 20; bottom: 25px; left: 50%; transform: translateX(-50%) translateY(10px); background: #352c3d; color: #fff; padding: 9px 18px; border-radius: 4px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.skip-link { position: fixed; top: 6px; left: 6px; transform: translateY(-150%); z-index: 100; background: white; padding: 6px 12px; }
.skip-link:focus { transform: translateY(0); }
.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; }

@media (max-width: 900px) {
  .site-shell { max-width: calc(100% - 32px); }
  main { padding: 24px 28px 0; }
  .intro-grid { gap: 24px; grid-template-columns: minmax(0, 1fr) 170px; }
  .site-header { gap: 24px; }
  .site-header nav { gap: 16px; }
  .research-card { padding: 16px; }
  footer { padding: 24px 28px; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 92px; }
  .site-shell { width: 100%; max-width: none; margin-bottom: 0; }
  .site-header { min-height: 70px; padding: 0 24px; flex-wrap: wrap; gap: 0; }
  .brand { padding: 20px 0; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; width: 36px; height: 34px; padding: 8px; background: none; border: 1px solid #655b70; border-radius: 3px; cursor: pointer; }
  .menu-toggle span { height: 1px; background: #e0d7e8; width: 18px; }
  .site-header nav { display: none; flex-basis: 100%; margin: 0; gap: 6px 18px; padding: 0 0 15px; flex-wrap: wrap; }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: 5px 0; font-size: 13px; }
  main { padding: 24px 24px 0; }
  .intro-grid { display: flex; flex-direction: column; gap: 26px; }
  .intro-main, .sidebar { width: 100%; }
  .profile-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 20px; padding: 18px; text-align: left; margin: 0; }
  .portrait { grid-column: 1; grid-row: 1 / 5; margin: 0; }
  .profile-card h2, .profile-affiliation, .profile-location, .social-links { grid-column: 2; }
  .social-links { justify-content: flex-start; margin: 10px 0 0; }
  .profile-education { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
  .profile-education p { margin: 0; }
  .profile-education small { font-size: 13px; }
  h2 { font-size: 25px; }
  .news { padding: 16px 18px; margin-top: 26px; }
  .news article { grid-template-columns: 75px minmax(0, 1fr); gap: 10px; padding-left: 14px; }
  .news time { font-size: 12px; }
  .page-section { margin-top: 30px; }
  .publication-group { padding: 15px 18px 3px; }
  .publication { grid-template-columns: 1fr; gap: 8px; padding: 17px 0; }
  .publication-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 0; }
  .paper-thumbnail { flex-basis: 100%; margin: 2px 0 4px; }
  .paper-thumbnail img { width: min(260px, 100%); margin: auto; }
  .paper-thumbnail span { text-align: center; }
  .paper-year { padding: 0; }
  .entry-heading { flex-direction: column; gap: 5px; }
  .entry-heading h3 { font-size: 20px; }
  .entry-role { font-size: 14px; }
  .project-list { padding-left: 14px; }
  .education-entry { grid-template-columns: 1fr; gap: 6px; }
  .education-entry time { font-size: 13px; }
  footer { padding: 22px 24px; gap: 9px 20px; }
  footer p:nth-child(2) { margin-left: 0; order: 3; flex-basis: 100%; }
  footer > a { margin-left: auto; }
}
@media (max-width: 420px) {
  main { padding: 22px 20px 0; }
  .site-header { padding: 0 20px; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { padding: 16px 18px; }
  .heading-link { display: block; margin-top: 5px; font-size: 18px; }
  .news article { grid-template-columns: 1fr; gap: 1px; }
  .publication-group { padding: 14px 15px 2px; }
  .profile-card { grid-template-columns: 90px minmax(0, 1fr); column-gap: 16px; padding: 16px; }
  .portrait { width: 86px; height: 102px; }
  .profile-card h2 { font-size: 20px; }
  .profile-education { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { transition: none; }
}
@media print {
  .site-header nav, .menu-toggle, .publication-filters, .paper-links, .contact-section, .toast, footer { display: none !important; }
  .site-header { position: static; background: none; border-bottom: 1px solid #999; padding: 0; min-height: 55px; }
  .brand { color: #222; }
  .site-shell { width: 100%; max-width: none; margin: 0; }
  main { padding: 20px 0; }
  .intro-grid { display: block; }
  .sidebar { display: none; }
  .page-section { margin-top: 25px; }
  .publication, .research-card, .experience-entry, .education-entry { break-inside: avoid; }
  .publication-group { background: none; padding: 0; }
  a { color: #444; }
}
