/* A compact, readable academic homepage. */
:root {
    --primary: #255e91;
    --primary-light: #174a77;
    --primary-dark: #174a77;
    --primary-subtle: rgba(37, 94, 145, .06);
    --accent: #255e91;
    --accent-coral: #255e91;
    --bg-warm: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f7f8fa;
    --text-primary: #20252a;
    --text-secondary: #3f464d;
    --text-muted: #626a72;
    --border-light: #e3e6e9;
    --border-medium: #cfd5da;
    --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
:root[data-theme="dark"] {
    --primary: #9cccf2;
    --primary-light: #b4d9f5;
    --primary-dark: #9cccf2;
    --primary-subtle: rgba(156, 204, 242, .09);
    --accent: #9cccf2;
    --accent-coral: #9cccf2;
    --bg-warm: #171b20;
    --bg-card: #171b20;
    --bg-elevated: #212830;
    --text-primary: #ecf0f3;
    --text-secondary: #c9d0d6;
    --text-muted: #a3adb5;
    --border-light: #353d45;
    --border-medium: #47515b;
}
html { scroll-behavior: smooth; }
body { display: block; font-family: var(--font-body); background: var(--bg-warm); color: var(--text-primary); line-height: 1.6; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-light); }
.site-header { border-bottom: 1px solid var(--border-light); }
.header-inner { max-width: 900px; margin: auto; padding: 19px 50px 19px 24px; display: flex; align-items: baseline; gap: 28px; }
.site-mark { flex: none; color: var(--text-primary); font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.site-mark:hover { color: var(--text-primary); text-decoration: none; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav .nav-item { padding: 0; border-radius: 0; background: none; color: var(--text-secondary); font-size: .88rem; font-weight: 400; text-decoration: none; }
.site-nav .nav-item:hover, .site-nav .nav-item.active { color: var(--primary); background: none; text-decoration: underline; }
.site-nav .nav-item.active::before { display: none; }
.theme-toggle { position: absolute; top: 14px; right: max(20px, calc((100vw - 900px) / 2)); width: 29px; height: 29px; border: 0; box-shadow: none; background: none; color: var(--text-muted); font-size: .9rem; }
.theme-toggle:hover { box-shadow: none; transform: none; color: var(--primary); }
.main-content { width: min(100%, 900px); max-width: 900px; margin: auto; padding: 0 24px 50px; }
.main-content > section { scroll-margin-top: 20px; }
.main-content > section + section { margin-top: 0; }
.bio-section { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 165px; gap: 34px; min-height: 0; padding: 42px 0 38px; background: none; border: 0; border-bottom: 1px solid var(--border-light); border-radius: 0; box-shadow: none; }
.bio-section::before { display: none; }
.bio-section h1 { font: 700 2.15rem/1.2 var(--font-heading); letter-spacing: -.025em; margin: 0 0 3px; color: var(--text-primary); }
.hero-role { color: var(--text-muted); font-size: .95rem; margin: 0 0 18px; }
.bio-section .hero-intro { color: var(--text-secondary); font-size: .96rem; line-height: 1.65; max-width: 67ch; margin: 0 0 12px; }
.bio-section .hero-intro strong { color: var(--text-primary); }
.hero-social { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 19px; }
.hero-social a { color: var(--primary); font-size: .88rem; font-weight: 400; text-decoration: underline; }
.intro-photo { width: 165px; height: 185px; align-self: start; object-fit: cover; object-position: center 47%; border-radius: 2px; }
#news, #research, #experience, #teaching, #education, #service { padding: 35px 0 36px; border-bottom: 1px solid var(--border-light); }
.main-content section > h2, .section-heading h2, #publications h1 { display: block; font: 700 1.5rem/1.3 var(--font-heading); letter-spacing: -.01em; color: var(--text-primary); margin: 0 0 16px; }
.main-content section > h2::after, .section-heading h2::after { display: none; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin-bottom: 7px; }
.section-more { font-size: .87rem; font-weight: 400; white-space: nowrap; margin: 0; }
.section-intro { font-size: .92rem; color: var(--text-secondary); margin: 0 0 18px; }
.updates-list { background: none; border: 0; box-shadow: none; padding: 0; }
.update-item { display: block; position: relative; margin: 0; padding: 5px 0 5px 98px; border: 0; font-size: .9rem; line-height: 1.55; }
.update-date { position: absolute; left: 0; top: 5px; color: var(--text-muted); font-size: .88rem; font-weight: 400; white-space: nowrap; margin: 0; }
.news-archive { margin-top: 10px; }
.news-archive summary { display: inline; color: var(--primary); font-size: .87rem; cursor: pointer; text-decoration: underline; }
.news-archive[open] summary { margin-bottom: 7px; }
.research-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; border: 0; border-bottom: 1px solid var(--border-light); border-radius: 0; background: none; padding: 0 0 8px; margin: 0 0 4px; }
.tab-btn { flex: none; padding: 5px 0; color: var(--text-muted); background: none; border: 0; border-radius: 0; font-size: .86rem; font-weight: 400; }
.tab-btn:hover { background: none; color: var(--primary); }
.tab-btn.active { background: none; color: var(--primary); box-shadow: inset 0 -1px var(--primary); font-weight: 600; }
.tab-content { padding: 0; border: 0; background: none; }
.paper-item { padding: 11px 0 12px; margin: 0; border: 0; border-bottom: 1px solid var(--border-light); border-radius: 0; background: none; box-shadow: none; }
.paper-item:hover { background: none; transform: none; box-shadow: none; border-color: var(--border-light); }
.paper-row { display: block; }
.paper-thumb { display: none; }
.paper-title { color: var(--text-primary); font: 600 1rem/1.35 var(--font-body); margin: 0 0 2px; }
.paper-authors { color: var(--text-secondary); font-size: .83rem; line-height: 1.4; margin: 0 0 2px; }
.paper-venue { display: inline; color: var(--text-muted); font-size: .83rem; font-weight: 400; letter-spacing: 0; text-transform: none; margin: 0 11px 0 0; }
.paper-desc { display: none; }
.paper-content > div[style*="margin-top"] { display: inline; margin: 0 !important; }
.paper-link { display: inline; padding: 0; margin: 0 9px 0 0; color: var(--primary) !important; background: none; border: 0; border-radius: 0; font-size: .82rem; text-decoration: underline; }
.paper-link:hover { color: var(--primary-light); background: none; transform: none; box-shadow: none; text-decoration: underline; }
.paper-item[hidden] { display: none; }
.more-papers { display: inline; width: auto; padding: 9px 0; margin: 5px 0 0; color: var(--primary); background: none; border: 0; border-radius: 0; font: 400 .86rem var(--font-body); text-decoration: underline; cursor: pointer; }
.more-papers:hover { background: none; }
.timeline { padding: 0; margin: 0; }
.timeline::before, .timeline-item::before, .role-item::before { display: none; }
.timeline-item, .timeline-item.company-group { padding: 0 0 19px; margin: 0 0 21px; background: none; border: 0; border-bottom: 1px solid var(--border-light); border-radius: 0; box-shadow: none; }
.timeline-item:hover, .timeline-item.company-group:hover { box-shadow: none; }
.company-header { gap: 10px; margin: 0 0 8px; padding: 0; border: 0; }
.company-logo { width: 38px; height: 38px; padding: 3px; border: 1px solid var(--border-light); border-radius: 2px; box-shadow: none; }
.company-info h3 { font-size: 1rem; margin: 0; }
.company-duration { color: var(--text-muted); font-size: .84rem; font-weight: 400; }
.roles-container { padding: 0; margin: 0; border: 0; }
.role-item { padding: 0; margin: 0 0 12px; }
.role-item .timeline-date { color: var(--text-muted); font-size: .82rem; margin: 0 0 3px; font-weight: 400; }
.timeline-content { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.timeline-content:hover { box-shadow: none; }
.timeline-content h4, .role-title { color: var(--text-primary); font: 600 .93rem var(--font-body); margin: 0 0 2px; }
.timeline-content .exp-summary { margin: 0; font-size: .88rem; line-height: 1.55; }
.teaching-item, .edu-card, .education-card { background: none; border: 0; border-bottom: 1px solid var(--border-light); border-radius: 0; box-shadow: none; padding: 15px 0; }
.teaching-item:hover, .edu-card:hover, .education-card:hover { box-shadow: none; transform: none; }
.edu-logo-placeholder { width: 56px; height: 56px; border-radius: 2px; padding: 5px; }
.edu-school { font-size: 1rem; }
.edu-period { color: var(--text-muted); font-size: .83rem; font-weight: 400; }
.archive-hero { padding: 40px 0 26px; border-bottom: 1px solid var(--border-light); }
#publications .archive-hero h1 { font-size: 1.9rem; margin: 0 0 7px; }
#publications .archive-hero .section-intro { margin: 0; }
#publications h2 { display: block; font: 700 1.2rem/1.3 var(--font-heading); margin: 32px 0 7px; }
#publications ul { list-style: none; padding: 0; margin: 0; }
#publications li { padding: 14px 0; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); font-size: .88rem; line-height: 1.55; }
#publications li::before { display: none; }
#publications li:hover { background: none; }
#publications li > strong:first-child { font: 600 .97rem/1.45 var(--font-body); color: var(--text-primary); }
#publications li em { color: var(--text-muted); font-style: normal; font-weight: 400; }
#publications li a { font-weight: 400; }
footer { border: 0; margin-top: 25px; padding: 0; color: var(--text-muted); font-size: .8rem; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 650px) {
    .header-inner { display: block; padding: 14px 52px 12px 18px; }
    .site-mark { display: block; margin-bottom: 5px; }
    .site-nav { gap: 4px 15px; }
    .site-nav .nav-item { font-size: .84rem; }
    .theme-toggle { top: 11px; right: 15px; }
    .main-content { padding: 0 18px 40px; }
    .bio-section { grid-template-columns: 1fr 104px; gap: 14px; padding: 28px 0 26px; }
    .bio-section h1 { font-size: 1.75rem; }
    .hero-role { font-size: .83rem; }
    .bio-section .hero-intro { font-size: .9rem; }
    .intro-photo { width: 104px; height: 118px; }
    .hero-social { gap: 4px 11px; }
    .hero-social a { font-size: .82rem; }
    #news, #research, #experience, #teaching, #education, #service { padding: 27px 0; }
    .update-item { padding: 5px 0; }
    .update-date { position: static; display: block; }
    .research-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tab-btn { white-space: nowrap; font-size: .8rem; }
    .section-heading { align-items: start; }
}
@media (max-width: 420px) {
    .bio-section { display: block; }
    .intro-photo { display: none; }
    .section-heading { display: block; }
    .section-more { display: inline-block; margin-bottom: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
