/* Layout: single-page academic site; sticky top bar, navy hero and contact bands, light content bands in between.
   Tokens: cool off-white ground, navy ink, one blue accent; dark theme mirrors the same roles. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eaeff5;
  --ink: #0b1f3a;
  --text: #223042;
  --muted: #5e6c80;
  --border: #d8dfe9;
  --accent: #1b5fc4;
  --accent-ink: #0f4aa3;
  --accent-soft: #e2ecfb;
  --chip-year-bg: #e2ecfb; --chip-year-fg: #0f4aa3;
  --chip-area-bg: #eef2f7; --chip-area-fg: #3a4a62;
  --chip-type-bg: #fbeedd; --chip-type-fg: #8a4b12;
  --navy: #0b1f3a;
  --navy-2: #12284a;
  --on-navy: #e8eef7;
  --on-navy-muted: #9db0cb;
  --on-navy-accent: #7fb0ff;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 8px 24px -12px rgba(11, 31, 58, .18);
  --radius: 14px;
  --font-display: "Red Hat Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Red Hat Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220; --surface: #111a2b; --surface-2: #182335; --ink: #f1f5fb; --text: #d3dbe7; --muted: #94a3b8; --border: #243149;
    --accent: #7db0ff; --accent-ink: #a9c8ff; --accent-soft: #16294a;
    --chip-year-bg: #16294a; --chip-year-fg: #a9c8ff; --chip-area-bg: #1b2638; --chip-area-fg: #c3cfe0; --chip-type-bg: #3a2a16; --chip-type-fg: #f3c892;
    --navy: #060c17; --navy-2: #0e1a2e; --on-navy: #e8eef7; --on-navy-muted: #9db0cb; --on-navy-accent: #8fbaff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.7);
    --logo-chip: #fff; --logo-pad: 5px 8px;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1220; --surface: #111a2b; --surface-2: #182335; --ink: #f1f5fb; --text: #d3dbe7; --muted: #94a3b8; --border: #243149;
  --accent: #7db0ff; --accent-ink: #a9c8ff; --accent-soft: #16294a;
  --chip-year-bg: #16294a; --chip-year-fg: #a9c8ff; --chip-area-bg: #1b2638; --chip-area-fg: #c3cfe0; --chip-type-bg: #3a2a16; --chip-type-fg: #f3c892;
  --navy: #060c17; --navy-2: #0e1a2e; --on-navy: #e8eef7; --on-navy-muted: #9db0cb; --on-navy-accent: #8fbaff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.7);
  --logo-chip: #fff; --logo-pad: 5px 8px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
section[id], [id].section { scroll-margin-top: 78px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1140px, 100%); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--border); }
.kicker { font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 36px; }
.section-head .intro { color: var(--muted); font-size: 1.05rem; }
.band-dark { background: var(--navy); color: var(--on-navy); }
.band-dark h1, .band-dark h2, .band-dark h3 { color: #fff; }
.band-dark .kicker { color: var(--on-navy-accent); }
.band-dark a { color: var(--on-navy-accent); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; }
.brand .brand-name { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1.05rem; letter-spacing: -0.01em; }
.brand .brand-role { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav a { color: var(--text); font-weight: 500; font-size: .9rem; padding: 6px 9px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav a.cv { color: var(--accent); font-weight: 700; }
.nav a.cv svg { width: 13px; height: 13px; margin-left: 4px; vertical-align: -1px; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; font-family: var(--font-display); font-size: .74rem; font-weight: 700; letter-spacing: .06em; }
.lang a, .lang span { padding: 6px 11px; color: var(--muted); }
.lang .on { background: var(--ink); color: var(--surface); }
.lang a:hover { text-decoration: none; color: var(--ink); }
.menu-btn { display: none; border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 10px; width: 42px; height: 40px; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 1120px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--on-navy); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .9; }
.hero-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, rgba(11,31,58,.9) 0%, rgba(11,31,58,.78) 50%, rgba(11,31,58,.45) 100%); }
.hero .wrap { padding-block: clamp(56px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero .kicker { color: var(--on-navy-accent); }
.hero h1 { color: #fff; }
.hero .tagline { font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; color: #fff; margin-top: 18px; text-wrap: balance; }
.hero .lead { color: var(--on-navy-muted); margin-top: 16px; max-width: 62ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid transparent; font-family: var(--font-display); font-weight: 700; font-size: .92rem; cursor: pointer; transition: transform .15s ease, background .15s ease; text-decoration: none !important; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.band-dark .btn-ghost, .hero .btn-ghost { color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.hero-photo { position: relative; justify-self: center; width: min(100%, 360px); }
.hero-photo img { border-radius: 22px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.15); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.hero-photo .affil { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--on-navy-muted); text-align: center; }
.hero-photo .affil strong { color: #fff; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 36px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; }
.stat .n { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { font-size: .78rem; color: var(--on-navy-muted); margin-top: 2px; }
.stats-note { font-size: .74rem; color: var(--on-navy-muted); margin-top: 8px; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero-photo { order: -1; width: min(100%, 260px); } }

/* ---------- logos strip ---------- */
.logo-strip { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 28px; }
.logo-strip a { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.logo-strip a:hover { text-decoration: none; color: var(--ink); }
.logo-strip img { height: 40px; width: auto; max-width: 150px; object-fit: contain; background: var(--logo-chip, transparent); padding: var(--logo-pad, 0); border-radius: 8px; }
.band-dark .logo-strip img, .hero .logo-strip img { filter: brightness(0) invert(1); opacity: .85; background: transparent; padding: 0; }
.logo-mono { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: .8rem; letter-spacing: .04em; border: 1px solid var(--border); }
.band-dark .logo-mono, .hero .logo-mono { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose { display: grid; gap: 16px; max-width: 70ch; font-size: 1.02rem; }
.prose p sub { font-size: .7em; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.side-card h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.edu { display: grid; gap: 14px; }
.edu-item { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; }
.edu-item .yrs { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); font-size: .85rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.edu-item .deg { font-weight: 600; color: var(--ink); }
.edu-item .inst { color: var(--muted); font-size: .9rem; }
.edu-item details { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.edu-item summary { cursor: pointer; color: var(--accent); font-weight: 500; list-style: none; }
.edu-item summary::-webkit-details-marker { display: none; }
.edu-item summary::after { content: " ▾"; font-size: .8em; }
.edu-item details[open] summary::after { content: " ▴"; }
.award-list, .lang-list { display: grid; gap: 10px; font-size: .92rem; }
.award-list li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.award-list .yr { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); font-size: .82rem; }
.lang-list { grid-template-columns: 1fr 1fr; }
.lang-list li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.lang-list .lvl { color: var(--muted); }
ul.plain { list-style: none; margin: 0; padding: 0; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }

/* ---------- positions ---------- */
.timeline { display: grid; gap: 16px; position: relative; }
.pos { display: grid; grid-template-columns: 150px 72px 1fr; gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.pos .when { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); font-size: .9rem; font-variant-numeric: tabular-nums; line-height: 1.4; }
.pos .when .tag { display: inline-block; margin-top: 8px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 9px; font-weight: 700; }
.pos .when.now { color: var(--accent); }
.pos .when.now .tag { background: var(--accent-soft); color: var(--accent-ink); }
.pos .logo { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pos .logo img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--border); padding: 6px; }
.pos .logo .logo-mono { width: 64px; height: 64px; font-size: .78rem; }
.pos .what h3 { font-size: 1.1rem; }
.pos .what .org { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.pos .what .detail { font-size: .92rem; margin-top: 10px; color: var(--text); }
.pos .what .detail a { font-weight: 500; }
@media (max-width: 760px) { .pos { grid-template-columns: 56px 1fr; } .pos .when { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; } .pos .when .tag { margin-top: 0; } .pos .logo img, .pos .logo .logo-mono { width: 52px; height: 52px; } }
.referee { margin-top: 28px; color: var(--muted); font-size: .92rem; max-width: 80ch; }

/* ---------- research ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.theme { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; position: relative; overflow: hidden; }
.theme .icon { width: 54px; height: 54px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.theme .icon svg { width: 34px; height: 34px; }
.theme h3 { font-size: 1.12rem; }
.theme p { font-size: .94rem; color: var(--text); }
.theme .link { font-size: .86rem; font-weight: 600; }
.theme .num { position: absolute; top: 14px; right: 18px; font-family: var(--font-display); font-weight: 800; color: var(--border); font-size: 1.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 36px; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--chip-area-fg); border: 1px solid var(--border); }
.collab-list { display: grid; gap: 8px; margin-top: 12px; font-size: .92rem; }
.collab-list li { display: grid; grid-template-columns: 1fr; gap: 1px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.collab-list .who { color: var(--muted); font-size: .86rem; }

/* ---------- publications ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; align-items: end; }
.filters label { display: grid; gap: 4px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.filters select, .filters input { font: inherit; font-size: .92rem; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-width: 0; width: 100%; }
.filters .search { grid-column: span 2; }
.filters button { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; font-size: .88rem; }
.filters button:hover { border-color: var(--accent); color: var(--accent-ink); }
.pub-count { font-size: .86rem; color: var(--muted); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.pub-list { display: grid; gap: 14px; }
.year-head { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--muted); padding-top: 14px; border-top: 2px solid var(--border); margin-top: 8px; }
.year-head:first-child { margin-top: 0; }
.pub { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); align-items: start; }
.pub .fig { width: 150px; aspect-ratio: 3/2; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; }
.pub .fig img { width: 100%; height: 100%; object-fit: cover; }
.pub .fig svg { width: 60%; height: 60%; color: var(--accent-ink); opacity: .55; }
.pub .fig.has-img { background: #fff; }
.pub .fig.has-art { background: var(--navy); border-color: transparent; }
.pub .fig.has-art img { opacity: .92; }
.pub .meta { min-width: 0; }
.pub .chips { margin: 0 0 8px; }
.chip-year { background: var(--chip-year-bg); color: var(--chip-year-fg); border-color: transparent; font-family: var(--font-display); font-weight: 800; }
.chip-area { background: var(--chip-area-bg); color: var(--chip-area-fg); border-color: transparent; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; cursor: pointer; }
.chip-area:hover { background: var(--accent-soft); color: var(--accent-ink); }
.chip-type { background: var(--chip-type-bg); color: var(--chip-type-fg); border-color: transparent; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.pub h3 { font-size: 1.05rem; line-height: 1.35; }
.pub h3 a { color: var(--ink); }
.pub h3 a:hover { color: var(--accent-ink); }
.pub .authors { font-size: .9rem; color: var(--text); margin-top: 6px; }
.pub .authors strong { font-weight: 700; }
.pub .venue { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.pub .venue em { color: var(--text); font-style: italic; }
.pub .venue .cites { font-variant-numeric: tabular-nums; }
.pub .actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 96px; }
.pub .actions .btn { justify-content: center; }
.pub .actions .ext { align-self: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); }
.pub .actions .ext:hover { color: var(--accent-ink); border-color: var(--accent); text-decoration: none; }
.pub .actions .ext svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .pub { grid-template-columns: 1fr; }
  .pub .fig { width: 100%; aspect-ratio: 16/7; }
  .pub .actions { flex-direction: row; flex-wrap: wrap; }
}
.pub.hidden { display: none; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* modal */
dialog.modal { border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(760px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog.modal::backdrop { background: rgba(5, 12, 24, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1rem; }
.modal-body { padding: 16px 18px; }
.modal-body pre { margin: 0; font-family: var(--font-mono); font-size: .8rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; max-height: 60vh; overflow: auto; color: var(--text); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
.modal-note { font-size: .8rem; color: var(--muted); margin-right: auto; align-self: center; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; }
.project .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.project .role { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 9px; border-radius: 999px; }
.project .role.member { color: var(--chip-area-fg); background: var(--chip-area-bg); }
.project .status { font-size: .74rem; color: var(--muted); }
.project h3 { font-size: 1.05rem; }
.project p { font-size: .92rem; }
.project dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .84rem; margin: 4px 0 0; }
.project dt { color: var(--muted); font-weight: 600; }
.project dd { margin: 0; }

/* ---------- teaching ---------- */
.teach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .teach-grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 14px; }
.course-list { display: grid; gap: 12px; }
.course { display: grid; grid-template-columns: 1fr; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.course .lvl { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.course .name { font-weight: 600; color: var(--ink); }
.course .prog { font-size: .86rem; color: var(--muted); }
.sup-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: .86rem; font-weight: 600; }
.tab-btn.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sup-list { display: grid; gap: 8px; font-size: .9rem; }
.sup-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); align-items: start; }
.sup-list .yr { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); font-size: .82rem; }
.sup-list .nm { font-weight: 600; color: var(--ink); }
.sup-list .kd { font-size: .78rem; color: var(--muted); }
.sup-list .ti { font-size: .84rem; color: var(--muted); }
.more-btn { margin-top: 12px; }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.summary-cards .card p { font-size: .92rem; }
.summary-cards .big { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent-ink); line-height: 1; margin-bottom: 8px; }
.note { font-size: .8rem; color: var(--muted); margin-top: 12px; }

/* ---------- videos ---------- */
.vid-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vid-tabs .tab-btn .cnt { opacity: .6; font-weight: 500; margin-left: 4px; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.vid { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); color: var(--text); }
.vid:hover { text-decoration: none; border-color: var(--accent); }
.vid .thumb { position: relative; aspect-ratio: 16/9; background: var(--navy-2); overflow: hidden; }
.vid .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.vid .thumb .play span { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.92); color: #d7263d; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.vid .thumb .play svg { width: 20px; height: 20px; margin-left: 3px; }
.vid .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: .72rem; padding: 2px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.vid .body { padding: 2px 14px 14px; display: grid; gap: 4px; }
.vid .t { font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.35; }
.vid .e { font-size: .82rem; color: var(--muted); }
.vid-panel { display: none; }
.vid-panel.on { display: block; }
.vid-panel .desc { color: var(--muted); font-size: .92rem; margin-bottom: 14px; max-width: 80ch; }
.vid-empty { padding: 28px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); background: var(--surface); }

/* ---------- contact ---------- */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.contact .text { color: var(--on-navy-muted); margin-top: 16px; max-width: 46ch; }
.contact-rows { display: grid; }
.contact-rows .row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); align-items: baseline; }
.contact-rows .row:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.contact-rows .k { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-muted); font-weight: 700; }
.contact-rows .v { color: #fff; font-size: .98rem; word-break: break-word; }
.contact-rows .v a { color: #fff; }
.contact-rows .v .sub { color: var(--on-navy-muted); font-size: .85rem; display: block; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--on-navy-muted); border-radius: 6px; padding: 1px 7px; font-size: .72rem; cursor: pointer; vertical-align: middle; }
.copy-btn:hover { color: #fff; border-color: #fff; }
.copy-btn svg { width: 12px; height: 12px; }
@media (max-width: 820px) { .contact .wrap { grid-template-columns: 1fr; } .contact-rows .row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- footer ---------- */
.footer { background: var(--navy-2); color: var(--on-navy-muted); font-size: .82rem; padding-block: 22px; border-top: 1px solid rgba(255,255,255,.08); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.footer a { color: var(--on-navy); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: .88rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 100; }
.toast.on { opacity: 1; }

/* ---------- research chart & scholar links ---------- */
.hbars { display: grid; gap: 9px; margin-top: 6px; }
.hbar { display: grid; grid-template-columns: minmax(180px, 300px) 1fr 44px; align-items: center; gap: 12px; font-size: .9rem; }
.hbar .lbl { color: var(--text); text-align: right; line-height: 1.25; }
.hbar .track { height: 14px; background: var(--surface-2); border-radius: 0 4px 4px 0; position: relative; overflow: hidden; }
.hbar .bar { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .4s ease; }
.hbar .val { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 640px) { .hbar { grid-template-columns: 1fr 40px; } .hbar .lbl { grid-column: 1 / -1; text-align: left; font-size: .84rem; } }
.chart-table { margin-top: 10px; font-size: .86rem; }
.chart-table summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.chart-table table { border-collapse: collapse; margin-top: 8px; width: 100%; max-width: 420px; }
.chart-table th, .chart-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); }
.chart-table td:last-child, .chart-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.scholar-link { color: var(--text); white-space: nowrap; }
.scholar-link svg { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; color: var(--accent); }
.scholar-link:hover { color: var(--accent-ink); }
.collab-list .who { line-height: 1.7; }
