:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1c1f26;
  --muted: #5d6573;
  --border: #e5e5df;
  --accent: #0f766e;
  --accent-soft: #e3f4f1;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216; --surface: #171b21; --text: #e8eaed; --muted: #9aa3b0;
    --border: #262c35; --accent: #5eead4; --accent-soft: #12332f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --text: #e8eaed; --muted: #9aa3b0;
  --border: #262c35; --accent: #5eead4; --accent-soft: #12332f;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* nav */
header.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav .brand { font-weight: 700; color: var(--text); }
.nav nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }
#theme {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px;
}

/* hero */
.hero { padding: 72px 0 48px; }
.hero .wrap { display: flex; gap: 44px; align-items: center; }
.avatar {
  width: 172px; height: 172px; border-radius: 50%; object-fit: cover; flex: none;
  border: 4px solid var(--surface); box-shadow: var(--shadow), 0 0 0 2px var(--accent);
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 6px 0 8px; }
.hero .role { color: var(--muted); font-size: 1.1rem; margin-bottom: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 500;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #06201d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #06201d; } }

/* sections */
section { padding: 44px 0; }
section h2 { font-size: 1.6rem; margin-bottom: 22px; }
section h2::after {
  content: ""; display: block; width: 36px; height: 3px; margin-top: 10px;
  background: var(--accent); border-radius: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { background: var(--accent-soft); color: var(--accent); padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--border); }
.timeline > li { position: relative; padding-bottom: 26px; }
.timeline > li::before {
  content: ""; position: absolute; left: -29px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
}
.timeline h3 { font-size: 1.05rem; }
.timeline .org { color: var(--muted); font-size: 15px; }
.timeline .when { font-size: 13px; color: var(--accent); font-weight: 600; }
.timeline ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 15.5px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.project { display: grid; grid-template-columns: 280px 1fr; }
.project img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project .body { padding: 22px 24px; }
.project h3 { font-size: 1.2rem; margin-bottom: 6px; }

.pubs { display: grid; gap: 16px; }
.pub { display: grid; grid-template-columns: 170px 1fr; transition: transform .15s, border-color .15s; }
.pub:hover { transform: translateY(-2px); border-color: var(--accent); }
.pub img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--accent-soft); }
.pub .body { padding: 16px 20px; }
.pub h3 { font-size: 1.02rem; margin-bottom: 4px; }
.pub .authors { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.pub .authors b { color: var(--text); font-weight: 600; }
.pub .venue { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.pub .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pub .actions a { font-size: 13px; padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); }
.pub .actions a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

footer { padding: 36px 0 56px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); margin-top: 24px; }

@media (max-width: 720px) {
  .hero { padding-top: 40px; }
  .hero .wrap { flex-direction: column; text-align: center; gap: 24px; }
  .links { justify-content: center; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .project, .pub { grid-template-columns: 1fr; }
  .project img, .pub img { height: 170px; }
  .nav nav { gap: 14px; }
  .nav nav .hide-sm { display: none; }
}

.sub { color: var(--muted); margin: -8px 0 20px; }
.pub.noimg { grid-template-columns: 1fr; }
