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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
}

.lang-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.lang-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Profile Section */
.profile-section {
  display: flex;
  gap: 2rem;
  padding: 3rem 0;
  align-items: flex-start;
}

.profile-avatar {
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.profile-info h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.profile-info .subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.profile-info .bio {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.email-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.email-links a {
  color: var(--text-light);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

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

.email-links i {
  margin-right: 0.25rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-light);
  font-size: 1.25rem;
  transition: color 0.2s;
}

.social-links a:hover {
  opacity: 0.8;
}

.research-group {
  margin-bottom: 1rem;
}

.research-label {
  font-weight: 600;
  margin-right: 0.5rem;
}

.research-list {
  list-style: none;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.research-list li {
  padding: 0.4rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text);
}

.icon-github { color: #333; }
.icon-scholar { color: #4285F4; }
.icon-email-personal { color: #EA4335; }
.icon-email-tongji { color: #0070C0; }
.icon-orcid { color: #A6CE39; }

/* Section Styles */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section-row {
  display: flex;
  gap: 2rem;
}

.section-half:first-child {
  flex: 1;
  min-width: 0;
}

.section-half:last-child {
  flex: 1;
  min-width: 0;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-4px);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.timeline-news .timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.timeline-news .timeline-date {
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
  width: 4.5rem;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 0;
}

.timeline-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
}

.timeline-description {
  margin-top: 0.5rem;
  color: var(--text);
}

/* Publications */
.pub-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pub-filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pub-view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pub-view-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pub-view-btn.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.publication {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: box-shadow 0.2s;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.publication:hover {
  box-shadow: var(--shadow);
}

.pub-figure {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
}

.pub-figure img {
  width: 220px;
  min-width: 220px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.pub-authors {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.pub-venue {
  font-style: italic;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pub-link {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.pub-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pub-summary {
  margin-top: 0.75rem;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.pub-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.pub-tag {
  padding: 0.2rem 0.5rem;
  background: var(--bg-alt);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Academic Service Tags */
.service-tags {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.service-group strong {
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-light);
}

.site-footer .social-links {
  justify-content: center;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: var(--radius);
  }

  .publication {
    flex-direction: column;
  }

  .pub-figure img {
    width: 100%;
    min-width: 0;
    height: 120px;
    object-fit: contain;
  }

  .section-row {
    flex-direction: column;
  }

  .social-links {
    justify-content: center;
  }

  .email-links {
    justify-content: center;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.active {
    display: flex;
  }
}
