/* Academic website visual system. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #5b4dd6;
  --accent-light: #ede9ff;
  --text: #1a1a1a;
  --text-muted: #555;
  --bg: #fff;
  --border: #e0e0e0;
  --radius: 6px;
  --nav-height: 56px;
}

html { font-size: 17px; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 1rem); }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.65; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2rem; font-weight: 700; margin-bottom: .25rem; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; border-bottom: 2px solid var(--accent); padding-bottom: .35rem; line-height: 1.2; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.4; }
ul { padding-left: 1.25rem; }
li { margin-bottom: .35rem; }
.container, .page-container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.page-container > .container, .page-container .section > .container { max-width: none; margin: 0; padding-left: 0; padding-right: 0; }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); height: var(--nav-height); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { display: none; }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.site-nav a { color: var(--text-muted); font-size: .85rem; font-weight: 500; transition: color .15s; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); text-decoration: none; }
.menu-button { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; font-family: inherit; }

.section { padding: 2.5rem 0; }
.section-heading { display: block; margin: 0; }
.section-heading h2 { margin-bottom: 1rem; }
.section-intro { max-width: none; margin: 0 0 1rem; color: var(--text-muted); }
.hero { display: flex; gap: 2rem; align-items: flex-start; padding-top: 2.5rem; padding-bottom: 1.25rem; }
.profile { flex-shrink: 0; }
.portrait { width: 200px; height: auto; display: block; border-radius: var(--radius); }
.bio { flex: 1; }
.eyebrow { display: none; }
.title { color: var(--text-muted); margin-bottom: .75rem; font-size: .95rem; }
.bio p { margin-bottom: .75rem; }
.profile-links { display: flex; gap: .75rem; margin-top: .75rem; justify-content: flex-start; }
.profile-links a { color: var(--text-muted); transition: color .15s; display: inline-flex; }
.profile-links a:hover { color: var(--accent); }
.profile-links svg { width: 22px; height: 22px; }
.hero-opening { margin-top: .75rem; }
.recruitment { margin-top: 1.25rem; padding: 1rem; background: var(--accent-light); border-radius: var(--radius); }

.news-list { list-style: none; padding: 0; max-height: 800px; overflow-y: auto; }
.news-list li { display: flex; gap: .75rem; margin-bottom: .5rem; align-items: baseline; border: 0; padding: 0; }
.news-date { flex-shrink: 0; font-size: .8rem; color: var(--text-muted); min-width: 6.5rem; font-weight: 500; }

.research-list { display: block; }
.research-item, .collapsible { margin-bottom: .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: transparent; }
.research-item summary, .collapsible-header { width: 100%; background: none; border: none; padding: .75rem 1rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 1rem; font-weight: 600; text-align: left; font-family: inherit; list-style: none; }
.research-item summary::-webkit-details-marker { display: none; }
.research-item summary:hover, .collapsible-header:hover { background: var(--accent-light); }
.research-item summary::after { content: '+'; font-size: 1.2rem; font-weight: 400; }
.research-item[open] summary::after { transform: rotate(45deg); }
.research-item p { margin: 0; padding: .5rem 1rem 1rem; color: var(--text); }
.collapsible-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 1rem; }
.collapsible.open .collapsible-body, .collapsible[open] .collapsible-body { max-height: 1200px; padding: .5rem 1rem 1rem; }
.collapsible-icon { font-size: 1.2rem; transition: transform .2s; }
.collapsible.open .collapsible-icon { transform: rotate(45deg); }

.award-grid, .service-grid, .teaching-grid { display: block; }
.awards-list { list-style: none; padding: 0; }
.awards-list li { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .45rem; }
.award-icon { font-size: 1.1rem; flex-shrink: 0; }
.info-card { padding: 0; border: 0; margin-bottom: 1rem; }
.info-card h3 { margin-bottom: .15rem; }
.info-card p { color: var(--text-muted); }
.service-list { padding-left: 1.25rem; }

.filter-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.filter-button { background: none; border: 1px solid var(--border); padding: .35rem 1rem; border-radius: var(--radius); cursor: pointer; font-family: inherit; font-size: .85rem; font-weight: 500; transition: all .15s; }
.filter-button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.publication-list { display: block; }
.publication { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; padding: 0; border: 0; }
.publication[hidden] { display: none; }
.publication-image { width: 180px; height: 140px; flex-shrink: 0; object-fit: contain; object-position: center; display: block; border-radius: var(--radius); background: transparent; border: 0; }
.publication-placeholder { min-height: 120px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--accent); font-size: 1.25rem; font-weight: 700; letter-spacing: .08em; }
.publication > div { flex: 1; }
.publication h3 { font-weight: 600; margin-bottom: .15rem; font-size: 1rem; color: var(--text); }
.authors { font-size: .85rem; color: var(--text-muted); margin-bottom: .15rem; }
.venue { font-size: .85rem; font-weight: 400; }
.paper-links { margin-top: .25rem; font-size: .8rem; }
.paper-links a { margin-right: .75rem; }
.paper-links a + a::before { content: none; }
.pub-abbr { display: inline-block; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 600; padding: .1rem .4rem; border-radius: 3px; margin-right: .35rem; vertical-align: middle; }
.full-publications { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); }
.full-publications summary { padding: .75rem 1rem; cursor: pointer; font-weight: 600; }
.full-publications summary:hover { background: var(--accent-light); }
.full-publications h3 { margin: 1rem 1rem .5rem; }
.full-publications ul { margin: 0 1rem 1.25rem; }
.full-publications li { margin-bottom: .55rem; }
.cv-list h3 { margin-top: .5rem; }
.cv-list p { margin-bottom: .75rem; }
.talks-list { padding-left: 1.25rem; }

.patent-card { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.patent-card img { width: 180px; height: 120px; object-fit: contain; flex-shrink: 0; border-radius: var(--radius); background: transparent; }
.patent-card h3 { margin-top: .55rem; }
.patent-card p { margin-bottom: .35rem; }

.mentoring-list { list-style: none; padding: 0; margin: .5rem 0 1.5rem; border-top: 1px solid var(--border); }
.mentoring-list li { display: grid; grid-template-columns: minmax(220px, .8fr) 1.6fr; gap: 1.5rem; padding: .7rem 0; margin: 0; border-bottom: 1px solid var(--border); align-items: center; }
.mentoring-list small { display: block; color: var(--text-muted); font-size: .78rem; }
.mentoring-outcome { color: var(--text-muted); }
.mentoring-outcome strong { color: var(--text); }

.openings-panel { display: block; padding: 1rem; background: var(--accent-light); border-radius: var(--radius); }
.openings-panel > div + div { margin-top: 1rem; }
.openings-panel h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.openings-panel p { margin-bottom: .5rem; }
.apply-button { display: inline-block; margin-top: .75rem; background: none; border: 1px solid var(--accent); color: var(--accent); padding: .35rem 1rem; border-radius: var(--radius); cursor: pointer; font-family: inherit; font-size: .85rem; }
.apply-button:hover { background: var(--accent); color: #fff; text-decoration: none; }
.site-footer { text-align: center; padding: 2rem 1.25rem; font-size: .8rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.footer-inner { display: block; }
.footer-inner span { display: block; }

@media (max-width: 768px) {
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .portrait { width: 160px; }
  .profile-links { justify-content: center; }
  .menu-button { display: block; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; gap: .75rem; align-items: flex-start; }
  .site-nav.open { display: flex; }
  .publication { flex-direction: column; }
  .publication-image { width: 100%; height: auto; max-height: none; object-fit: contain; }
  .publication-placeholder { min-height: 120px; }
  .patent-card { flex-direction: column; }
  .patent-card img { width: 180px; height: auto; }
  .mentoring-list li { grid-template-columns: 1fr; gap: .2rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
