:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --text: #1b2421;
  --muted: #5d6b66;
  --line: #e2e7e4;
  --accent: #0f766e;
  --accent-soft: #e0f2ef;
  --shadow: 0 1px 2px rgba(16, 24, 22, .05), 0 8px 24px rgba(16, 24, 22, .06);
  --radius: 14px;
  --maxw: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101513;
    --surface: #171e1b;
    --text: #e6ecea;
    --muted: #9aa8a3;
    --line: #26302c;
    --accent: #2dd4bf;
    --accent-soft: #133631;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  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(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-weight: 700; color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 4px; overflow-x: auto; }
nav a {
  color: var(--muted); font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
nav a.active { color: var(--accent); background: var(--accent-soft); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
.portrait {
  width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
  border: 6px solid var(--surface); box-shadow: var(--shadow);
}
.socials { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: .88rem; font-weight: 500;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #06201c; } }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat b { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: var(--accent); }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- sections ---------- */
section { padding: 40px 0; }
.section-title { font-size: 1.5rem; letter-spacing: -.01em; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 28px; max-width: 70ch; }
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -.02em; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; max-width: 65ch; font-size: 1.05rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline h4 { margin: 0; font-size: 1rem; }
.timeline p { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }

/* highlights list */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-soft); border: 3px solid var(--accent);
}

/* publications */
.pubs { counter-reset: pub; list-style: none; margin: 0; padding: 0; }
.pubs li { counter-increment: pub; display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.pubs li:first-child { border-top: 0; }
.pubs li::before { content: counter(pub); color: var(--accent); font-weight: 700; }
.pubs .t { font-weight: 600; display: block; }
.pubs .a { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--accent-soft); color: var(--accent); padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cover {
  aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, hsl(var(--h) 70% 75% / .55), transparent 55%),
    linear-gradient(135deg, hsl(calc(var(--h) + 150) 45% 40%), hsl(calc(var(--h) + 190) 55% 28%));
}
.cover { position: relative; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.cover-icon { font-size: 3rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; letter-spacing: -.01em; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: .93rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; align-items: center; }
.status { font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.status.ongoing { background: #dcfce7; color: #166534; }
.status.completed { background: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) { .status.ongoing { background: #14532d; color: #bbf7d0; } }
.tags { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .75rem; padding: 2px 9px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }

.filter { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.filter button {
  font: inherit; font-size: .88rem; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted);
}
.filter button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { padding: 40px 0 24px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 140px; height: 140px; order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .brand { display: none; }
  header.site .wrap { justify-content: center; }
  .panel { padding: 20px; }
}
