/* ====================================
   学术主页 - 主样式表
   ==================================== */

/* --- CSS Variables / 主题色 --- */
:root {
  --primary: #1a5c7a;
  --primary-light: #2c8eb4;
  --primary-dark: #0d3b4f;
  --accent: #c44536;
  --accent-light: #e06b5a;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --text-muted: #b2bec3;
  --border: #dfe6e9;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.navbar .logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.navbar .logo:hover {
  text-decoration: none;
  color: var(--primary-dark);
}

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

.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(26, 92, 122, 0.08);
  text-decoration: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
}

/* --- Hero / Profile Section --- */
.hero {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: white;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-avatar {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  object-fit: cover;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255,255,255,0.6);
  overflow: hidden;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.hero-content .title {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.hero-content .affiliation {
  font-size: 1rem;
  opacity: 0.75;
  margin-bottom: 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-badges a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: var(--transition);
}
.hero-badges a:hover {
  background: rgba(255,255,255,0.25);
  text-decoration: none;
  transform: translateY(-1px);
}

/* --- Sections --- */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-card);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.section-header .subtitle {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: 8px;
}

/* --- About Section --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--text);
}

.about-content p {
  margin-bottom: 16px;
}

/* --- News / Updates --- */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  flex-shrink: 0;
  min-width: 90px;
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  height: fit-content;
}

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

/* --- Education --- */
.education-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

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

.edu-item {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  position: relative;
}

.edu-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 1;
  background: var(--bg-card);
}

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

.edu-details .meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 4px;
}

.edu-details .description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* --- Research Interests --- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: var(--transition);
}

.research-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.research-card .icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.research-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.research-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Publications --- */
.pub-list {
  max-width: 900px;
  margin: 0 auto;
}

.pub-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-thumb {
  flex-shrink: 0;
  width: 160px;
  height: 120px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
  overflow: hidden;
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.pub-info .authors {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.pub-info .venue {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 8px;
}

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

.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-light);
  transition: var(--transition);
}
.pub-links a:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(26,92,122,0.05);
  text-decoration: none;
}

/* --- Teaching --- */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.teaching-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

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

.teaching-card .period {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.teaching-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.teaching-card .institution {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.teaching-card .desc {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* --- Contact / Footer --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
  text-align: center;
}

.footer .social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer .social-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer .social-links a:hover {
  background: rgba(255,255,255,0.2);
  text-decoration: none;
  transform: translateY(-2px);
}

.footer .copyright {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* --- Page Header --- */
.page-header {
  padding: 100px 0 40px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  text-align: center;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-header p {
  opacity: 0.8;
  margin-top: 8px;
  font-size: 1.05rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
  color: white;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* --- Skills Tags --- */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.skill-tag {
  padding: 4px 14px;
  background: rgba(26, 92, 122, 0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- CV Section --- */
.cv-section {
  text-align: center;
  padding: 40px 0;
}

.cv-section p {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

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

  .hero-avatar {
    width: 150px;
    height: 150px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-badges {
    justify-content: center;
  }

  .menu-toggle {
    display: block;
  }

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

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 0;
  }

  .pub-item {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    height: 160px;
  }

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

  .news-date {
    align-self: flex-start;
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .research-grid,
  .teaching-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 1.7rem;
  }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
