:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1b1f24;
  --text-muted: #5b6572;
  --accent: #1d5cff;
  --accent-soft: #e8edff;
  --border: #e3e6ea;
  --shadow: 0 2px 10px rgba(20, 25, 35, 0.06);
  --max-width: 860px;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg: #0f1216;
  --bg-alt: #171b21;
  --text: #e7e9ec;
  --text-muted: #9aa4b2;
  --accent: #6d94ff;
  --accent-soft: #1b2540;
  --border: #262c34;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  transition: background 0.2s ease, color 0.2s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header / Nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.theme-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* Hero */
.hero {
  padding: 4.5rem 1.5rem 3rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.25rem 0;
  list-style: none;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }

.social-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  padding: 0;
  margin: 1.5rem 0 0;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.social-links a:hover { color: var(--accent); text-decoration: none; }

/* Sections */
.section {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin: 0 0 1.25rem;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 1.75rem 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-content h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
}

/* Publications */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.pub-title {
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.pub-authors {
  margin: 0 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.pub-venue {
  margin: 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Education & achievements */
.edu-list, .achieve-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-list h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.achieve-list li {
  padding-left: 1.4rem;
  position: relative;
}
.achieve-list li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
  top: 0.15rem;
}

/* Footer */
.footer {
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
}
