@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1b2330;
  --muted: #5d6878;
  --accent: #0e7490;
  --accent-2: #f59e0b;
  --accent-soft: #e0f2f7;
  --line: #e6e3dc;
  --shadow: 0 1px 2px rgba(20, 30, 40, .05), 0 8px 24px rgba(20, 30, 40, .06);
  --max: 1080px;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a; --surface: #161d25; --text: #e7ebf0; --muted: #9ba7b4;
    --accent: #38bdd8; --accent-soft: #12303a; --line: #25303b;
    --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; background: var(--bg); color: var(--text);
  font: 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.2; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 14px 20px; }

/* header */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand .mono {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #155e75); color: #fff; font-size: 13px; letter-spacing: .5px;
}
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { color: var(--muted); font-size: 15px; padding: 6px 10px; border-radius: 8px; }
nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
nav a.active { color: var(--accent); font-weight: 600; }

/* hero */
.hero-band {
  background:
    radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(700px 360px at 0% 110%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; padding: 56px 0 60px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 600; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font-size: clamp(36px, 5vw, 52px); margin: 0 0 10px; }
.hero .role { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.hero p.bio { font-size: 17.5px; margin: 0 0 24px; }
.portrait { position: relative; justify-self: center; width: min(340px, 100%); }
.portrait::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: .9;
}
.portrait img { position: relative; display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: var(--shadow); }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 15px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 20px; color: var(--accent); }
.stat span { font-size: 13.5px; color: var(--muted); }

/* sections */
main .wrap.section { padding-top: 48px; padding-bottom: 64px; }
h2 { font-size: 28px; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 24px; }
h1.page { font-size: 40px; margin: 0 0 8px; }
.kicker { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.lead { font-size: 19px; color: var(--text); }
.muted { color: var(--muted); font-size: 15px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; color: inherit;
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
a.card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.card .icon { font-size: 26px; line-height: 1; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; flex: 1; }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 10px;
}

/* project pages */
.project-head { padding: 48px 0 8px; }
.project-body { max-width: 760px; }
.project-body ul { padding-left: 0; list-style: none; }
.project-body li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.project-body li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 18px; margin-top: 28px; }

/* publications */
.pub { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.pub .venue { display: inline-block; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.pub .title { font-weight: 600; margin: 0 0 4px; }
.pub .authors { color: var(--muted); font-size: 15px; margin: 0; }

/* cv */
.timeline { border-left: 2px solid var(--line); margin: 0 0 30px 6px; padding-left: 22px; }
.timeline .item { position: relative; margin-bottom: 20px; }
.timeline .item::before { content: ""; position: absolute; left: -29px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline .when { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.timeline .what { font-weight: 600; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.skill-list span { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 500; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 22px 20px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; }
  .portrait { order: -1; width: min(260px, 70%); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
.cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .cards.two { grid-template-columns: 1fr; } }

/* interactive model viewer */
.viewer { margin-top: 36px; }
.viewer iframe { width: 100%; height: 1480px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.viewer video { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
@media (max-width: 820px) { .viewer iframe { height: 1650px; } }

/* experiment vs simulation */
.viewer.narrow { max-width: 900px; }
.viewer video.clip { background: #fff; }
.sim-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sim-row figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.sim-row video { width: 100%; height: auto; display: block; border: 0; box-shadow: none; border-radius: 6px; background: #fff; }
.sim-row figcaption { text-align: center; font-size: 13.5px; color: #5d6878; margin-top: 4px; }
@media (max-width: 720px) { .sim-row { grid-template-columns: 1fr; } }
.viewer.narrow.wide { max-width: 1040px; }
.profiles { margin: 16px 0 0; font-size: 15px; font-weight: 600; }

/* thumbnails, figures, key findings */
.card .thumb { display: block; width: calc(100% + 44px); margin: -22px -22px 16px; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; background: #f8fafc; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); }
.card:has(.thumb)::before { z-index: 1; }
.hero-fig { margin: 8px 0 28px; max-width: 900px; }
.hero-fig img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #f8fafc; }
.hero-fig figcaption { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.keybox { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 12px; padding: 16px 20px 6px; margin: 22px 0 26px; }
.keybox h2 { font-size: 20px; margin: 0 0 10px; color: var(--accent); }
.keybox li { margin-bottom: 8px; }
.pub .venue.alt { background: var(--accent-2); color: #1b2330; }
.eu { align-items: center; justify-content: flex-start !important; gap: 12px !important; font-size: 12.5px; padding-bottom: 0 !important; }
.eu svg { flex: none; border-radius: 2px; }
.news { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.news-tag { background: var(--accent-2); color: #1b2330; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; border-radius: 6px; padding: 2px 8px; }
.jump { font-weight: 600; margin: 4px 0 8px; }
h2.group { margin: 36px 0 16px; padding-bottom: 6px; border-bottom: 2px solid var(--line); scroll-margin-top: 80px; }
.card .fund { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.wrap-eu { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.wrap-eu svg { flex: none; border-radius: 2px; }
.touch { margin-top: 44px; max-width: 760px; }
.touch-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.touch-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.touch-form input, .touch-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.touch-form input:focus, .touch-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.touch-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.touch-form button { justify-self: start; cursor: pointer; }
@media (max-width: 600px) { .touch-form .row2 { grid-template-columns: 1fr; } }
#confmap { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); margin: 18px 0 8px; z-index: 0; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); flex: none; }
.num.talk { background: #0e7490; }
.num.poster { background: #f59e0b; color: #1b2330; }
.legend { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend .num { width: 22px; height: 22px; font-size: 11px; }
.conf-list { margin-top: 18px; }
.conf-item { display: flex; gap: 14px; align-items: flex-start; scroll-margin-top: 80px; }
.conf-item:target { border-color: var(--accent); }
@media (max-width: 600px) { #confmap { height: 340px; } }
.maps { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin: 18px 0 6px; }
.maps #confmap, .maps #eumap { height: 420px; margin: 0; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 0; }
.mapcap { text-align: center; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 760px) { .maps { grid-template-columns: 1fr; } .maps #confmap, .maps #eumap { height: 320px; } }
.maps #confmap, .maps #eumap { overflow: hidden; }
.maps:not(.ready) #confmap > *, .maps:not(.ready) #eumap > * { visibility: hidden; }
