:root {
  --primary: #1e3a5f;
  --accent: #3b82f6;
  --accent-light: #dbeafe;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --max-width: 880px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* ── Container ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* ── Hero / Profile ── */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px 0 32px;
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.hero-text .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-text .quote {
  font-family: 'Noto Serif SC', 'Songti SC', serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card-bg);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

.profile-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
}

/* ── Section Cards ── */
.section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeInUp 0.5s ease both;
}

.section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section h2 i {
  color: var(--accent);
  font-size: 1.1rem;
}

/* ── Biography ── */
.bio-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 20px;
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.bio-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bio-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.bio-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.interest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.9rem;
  color: var(--text);
}

.interest-item i {
  color: var(--accent);
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.contact-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.contact-btn i {
  font-size: 0.95rem;
}

/* ── News Timeline ── */
.news-list {
  position: relative;
  padding-left: 24px;
}

.news-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-light), transparent);
  border-radius: 1px;
}

.news-item {
  position: relative;
  padding: 0 0 20px 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.news-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--accent-light);
  transition: transform 0.2s;
}

.news-item:hover::before {
  transform: scale(1.3);
}

.news-date {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.news-text {
  color: var(--text);
  margin-top: 2px;
}

.news-text em {
  font-style: italic;
  color: var(--text);
}

.news-text .venue {
  font-weight: 600;
  color: var(--primary);
}

.news-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  margin-left: 20px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.news-toggle:hover {
  color: var(--primary);
}

.news-hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.news-hidden.expanded {
  max-height: 2000px;
  opacity: 1;
}

/* ── Publications ── */
.pub-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
  margin-bottom: 16px;
}

.pub-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.pub-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pub-card:first-of-type {
  padding-top: 0;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.pub-title a {
  color: var(--text);
  transition: color 0.2s;
}

.pub-title a:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.pub-authors .me {
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

.pub-authors .equal {
  color: #dc2626;
  font-weight: 700;
  font-size: 0.75rem;
  vertical-align: super;
}

.pub-authors .corresponding {
  color: #dc2626;
  font-weight: 700;
  font-size: 0.75rem;
  vertical-align: super;
}

.pub-highlight {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 6px 0 2px;
  padding: 8px 12px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.pub-highlight em {
  font-weight: 600;
  color: var(--primary);
}

.pub-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pub-venue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--card-bg);
  background: var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
}

.pub-venue.arxiv {
  background: #6b7280;
}

.pub-venue.tech-report {
  background: #059669;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.pub-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.pub-link i {
  font-size: 0.85rem;
}

/* ── Experience ── */
.exp-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.exp-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.exp-item:first-child {
  padding-top: 0;
}

.exp-logo {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg);
  padding: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.exp-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-role {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.exp-date {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.exp-location {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.exp-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

.exp-highlights {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exp-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
}

/* ── Education ── */
.edu-item {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.edu-item:first-child {
  padding-top: 0;
}

.edu-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg);
  padding: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.edu-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.edu-degree {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.edu-date {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.edu-note {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section:nth-child(1) { animation-delay: 0s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px;
    padding: 32px 0 24px;
  }

  .hero-text .quote {
    text-align: left;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .profile-img,
  .profile-placeholder {
    width: 120px;
    height: 120px;
    font-size: 2.2rem;
  }

  .bio-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 24px 18px;
  }

  .navbar-inner {
    padding: 0 16px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .brand {
    font-size: 0.92rem;
  }

  .exp-item {
    flex-direction: column;
    gap: 12px;
  }

  .edu-item {
    flex-direction: column;
    gap: 8px;
  }

  .container {
    padding: 70px 16px 40px;
  }

  .pub-meta {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .nav-links a {
    font-size: 0.75rem;
    padding: 4px 6px;
  }

  .brand {
    font-size: 0.85rem;
  }

  .contact-links {
    flex-direction: column;
  }
}
