/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a5c;
  --accent: #2874a6;
  --accent-light: #d4e6f1;
  --text: #2c3e50;
  --text-light: #5d6d7e;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e0e4e8;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
  --radius: 6px;
  --max-w: 920px;
  --nav-h: 60px;
  --font: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }

/* ===== Navigation ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}
.navbar-inner {
  width: 100%; max-width: var(--max-w);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); margin: 5px 0;
  transition: .3s;
}

/* ===== Layout ===== */
.page-body { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 80px; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Hero / Home ===== */
.hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 48px;
}
.hero-photo {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-light);
  flex-shrink: 0;
}
.hero-info { flex: 1; }
.hero-info h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.hero-info .subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 12px;
}
.hero-info .bio { margin-bottom: 16px; }
.contact-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 0.9rem; color: var(--text-light);
}
.contact-row a { color: var(--accent); }
.contact-row svg { width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; }

.social-links { display: flex; gap: 12px; margin-top: 12px; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-light);
  transition: all .2s;
}
.social-links a:hover { background: var(--accent); color: #fff; }
.social-links svg { width: 18px; height: 18px; }

/* ===== Section Headings ===== */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

/* ===== News ===== */
.news-list { list-style: none; }
.news-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 12px;
  font-size: 0.95rem;
}
.news-list li:last-child { border-bottom: none; }
.news-date {
  flex-shrink: 0; width: 90px;
  font-weight: 600; color: var(--accent);
  font-size: 0.85rem;
}

/* ===== Research Interests ===== */
.interest-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.interest-tag {
  padding: 5px 14px;
  background: var(--accent-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Card ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* ===== Publications ===== */
.pub-year-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 32px 0 16px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.pub-year-heading:first-of-type { margin-top: 0; }

.pub-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.93rem;
  line-height: 1.65;
}
.pub-item:last-child { border-bottom: none; }
.pub-title {
  font-weight: 600;
  color: var(--text);
}
.pub-authors { color: var(--text-light); }
.pub-authors strong { color: var(--text); font-weight: 600; }
.pub-venue {
  font-style: italic;
  color: var(--text-light);
}
.pub-badge {
  display: inline-block;
  padding: 1px 8px;
  background: #e74c3c;
  color: #fff;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: 2px;
}
.pub-badge.spotlight { background: #e67e22; }
.pub-badge.best-paper { background: #27ae60; }

/* Filter tabs */
.pub-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.pub-filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .2s;
  color: var(--text-light);
}
.pub-filter-btn:hover, .pub-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Teaching ===== */
.teaching-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.teaching-item:last-child { border-bottom: none; }
.teaching-role {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.teaching-course { font-weight: 600; margin: 2px 0; }
.teaching-detail { font-size: 0.9rem; color: var(--text-light); }

/* ===== Awards Timeline ===== */
.awards-list { list-style: none; }
.awards-list li {
  position: relative;
  padding: 12px 0 12px 24px;
  border-left: 2px solid var(--accent-light);
}
.awards-list li::before {
  content: '';
  position: absolute;
  left: -6px; top: 18px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.award-year {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.85rem;
}

/* ===== Service / Talks ===== */
.service-category {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  margin: 24px 0 10px 0;
}
.service-category:first-of-type { margin-top: 0; }

.service-list { list-style: none; }
.service-list li {
  padding: 6px 0 6px 16px;
  position: relative;
  font-size: 0.93rem;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .hero-photo { width: 140px; height: 140px; }
  .contact-row { justify-content: center; }
  .social-links { justify-content: center; }
  .interest-tags { justify-content: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}
