:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #101828;
  --muted: #5f6b7a;
  --border: #dfe5ec;
  --accent: #0f5bd3;
  --accent-2: #0b3f93;
  --shadow: 0 18px 60px rgba(16, 24, 40, .08);
  --radius: 22px;
  --max: 1180px;
}

body.dark {
  --bg: #0b1020;
  --surface: #11182a;
  --surface-2: #161f34;
  --text: #edf2f7;
  --muted: #a7b1c2;
  --border: #26324a;
  --accent: #72a7ff;
  --accent-2: #9fc2ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: inherit; }
img { max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin: 0 auto; }
.section-pad { padding: 92px 0; }
.alt-bg { background: var(--surface-2); }
.skip-link { position: absolute; left: -999px; top: auto; }
.skip-link:focus { left: 20px; top: 20px; z-index: 999; background: var(--surface); padding: 10px 14px; border-radius: 8px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nav-wrap { min-height: 72px; display: flex; align-items: center; gap: 22px; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: .82rem; }
.brand-text { white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: .94rem; font-weight: 600; }
.site-nav a:hover { color: var(--text); }
.theme-toggle, .menu-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; min-width: 42px; min-height: 42px; cursor: pointer; }
.menu-toggle { display: none; margin-left: auto; padding: 0 13px; }

.hero { overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; top: -180px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.45fr .75fr; align-items: center; gap: 70px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 800; color: var(--accent); margin: 0 0 12px; }
h1, h2, h3 { line-height: 1.16; margin-top: 0; }
h1 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.8rem, 6vw, 5.8rem); letter-spacing: -.035em; margin-bottom: 24px; max-width: 980px; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.025em; margin-bottom: 18px; }
h3 { font-size: 1.2rem; }
.hero-text { color: var(--muted); font-size: 1.08rem; max-width: 760px; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 14px; text-decoration: none; font-weight: 700; border: 1px solid var(--border); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.secondary { background: var(--surface); color: var(--text); }
.btn:hover { transform: translateY(-1px); }
.hero-tags, .skill-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.hero-tags span, .skill-chips span { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 7px 11px; font-size: .83rem; font-weight: 600; }

.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.avatar { width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, var(--text), var(--accent)); color: white; font-size: 1.35rem; font-weight: 800; margin-bottom: 22px; }
.profile-card h2 { font-size: 1.65rem; margin-bottom: 7px; }
.profile-card > p { color: var(--muted); margin-top: 0; }
.quick-facts { margin: 26px 0; }
.quick-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); }
.quick-facts dt { color: var(--muted); font-size: .82rem; }
.quick-facts dd { margin: 0; font-weight: 700; font-size: .9rem; }
.text-link { color: var(--accent); font-weight: 700; text-decoration: none; }

.two-col { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.section-heading { max-width: 780px; margin-bottom: 42px; }
.section-heading.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-heading p:last-child, .prose p { color: var(--muted); }
.prose { font-size: 1.04rem; }
.card-grid { display: grid; gap: 18px; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.research-card, .blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.research-card p, .blog-card p { color: var(--muted); }
.icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-weight: 800; margin-bottom: 22px; }

.publication-list { border-top: 1px solid var(--border); }
.pub-item { display: grid; grid-template-columns: 90px 1fr; gap: 26px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.pub-year { color: var(--accent); font-weight: 800; }
.pub-item h3 { margin-bottom: 8px; }
.pub-item p { margin: 0; color: var(--muted); font-size: .92rem; }
.section-action { margin-top: 34px; }

.timeline { position: relative; max-width: 850px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 24px; margin-bottom: 36px; }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; border: 5px solid var(--bg); background: var(--accent); z-index: 1; }
.timeline-meta { margin: 0 0 4px; color: var(--accent); font-weight: 700; font-size: .84rem; }
.timeline-item h3 { margin-bottom: 7px; }
.timeline-item p:last-child { color: var(--muted); margin-top: 0; }

.blog-label { display: inline-block; font-size: .74rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 18px; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.blog-card h2 { font-size: 1.5rem; }
.post-meta { font-size: .84rem; }
.compact-hero { padding-top: 110px; padding-bottom: 80px; }
.compact-hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); }

.contact-section { background: var(--text); color: var(--bg); }
.contact-card { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 50px; }
.contact-card .eyebrow { color: color-mix(in srgb, var(--accent) 75%, white); }
.contact-card p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.contact-card .btn.primary { background: var(--bg); color: var(--text); border-color: var(--bg); }
.contact-card .btn.secondary { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }

.site-footer { padding: 28px 0; background: var(--surface); border-top: 1px solid var(--border); }
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .88rem; }
.footer-wrap p { margin: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid, .two-col, .contact-card { grid-template-columns: 1fr; gap: 42px; }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .site-nav { position: absolute; top: 72px; left: 20px; right: 20px; display: none; flex-direction: column; align-items: stretch; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav.static-nav { position: static; display: flex; flex-direction: row; margin-left: auto; padding: 0; background: transparent; border: 0; box-shadow: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .theme-toggle { margin-left: 0; }
}

@media (max-width: 680px) {
  .section-pad { padding: 68px 0; }
  .container { width: min(100% - 26px, var(--max)); }
  .brand-text { display: none; }
  .card-grid.four, .card-grid.three, .blog-grid { grid-template-columns: 1fr; }
  .pub-item { grid-template-columns: 1fr; gap: 5px; }
  .footer-wrap { flex-direction: column; }
  h1 { font-size: 2.75rem; }
}
