/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* CSS Custom Properties for Modern Professional Theme */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  
  /* 文字颜色：调整为更深的色调，提高可读性 */
  --text-primary: #1a1a1a;
  --text-secondary: #495057;
  --text-tertiary: #6c757d;
  
  /* 强调色：调整为更饱和的蓝绿色系，与背景协调 */
  --accent-primary: #0d6efd;
  --accent-secondary: #198754;
  --accent-tertiary: #fd7e14;
  
  /* 边框色：调整为更深的色调 */
  --border-primary: #dee2e6;
  --border-secondary: #e9ecef;
  
  /* 阴影：调整为更深的色调，提高对比度 */
  --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  
  /* 渐变：调整为更饱和的色调 */
  --gradient-primary: linear-gradient(76deg, #344B66 0%, #88843C 100%);
  --gradient-secondary: linear-gradient(76deg, #822BA5 0%, #8F0F1B 100%);
  --gradient-tertiary: linear-gradient(135deg, #2E23BF 0%, #1C9854 100%);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

body.loaded {
  opacity: 1;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
  padding: 1rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* Main Container */
.main-container {
  padding-top: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Hero Section */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.profile-info {
  animation: slideInLeft 1s ease 0.2s both;
}

.name-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.name-cn {
  font-size: 2.5rem;
  display: block;
  margin-top: 0.5rem;
  opacity: 1;
}

.bio-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-right: 2rem;
  padding-right: 1rem;
}

.bio-text p {
  margin-bottom: 1rem;
}

.link-highlight {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.research-highlight {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

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

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-light);
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

.social-btn.scholar:hover {
  background: var(--accent-secondary);
  color: white;
  border-color: var(--accent-secondary);
}

.social-btn.github:hover {
  background: var(--accent-tertiary);
  color: var(--text-primary);
  border-color: var(--accent-tertiary);
}

.profile-image {
  animation: slideInRight 1s ease 0.4s both;
}

.image-container {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-large);
  transition: all 0.3s ease;
}

.image-container:hover {
  transform: scale(1.02);
}

.profile-photo {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.3s ease;
}



/* Sections */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-primary);
}

.section:last-child {
  border-bottom: none;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-title i {
  color: var(--accent-primary);
  font-size: 2rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-style: italic;
}

/* News Section */
.news-container {
  display: grid;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  border: 1px solid var(--border-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--gradient-tertiary);
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.news-date {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--accent-primary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.news-content {
  color: var(--text-secondary);
  line-height: 1.6;
}

.news-highlight {
  color: var(--accent-primary);
  font-weight: 600;
  background: var(--bg-tertiary);
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  font-size: 0.9rem;
}

/* Publications Section */
.publications-container {
  display: grid;
  gap: 2rem;
}

.publication-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  border: 1px solid var(--border-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.publication-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-tertiary);
}

.publication-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-large);
}

.pub-image {
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.publication-item:hover .pub-image img {
  transform: scale(1.05);
}

.pub-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.pub-authors {
  color: var(--text-secondary);
  line-height: 1.5;
}

.author-me {
  color: var(--accent-primary);
  font-weight: 600;
}

.pub-venue {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  width: fit-content;
}

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

.pub-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--border-primary);
}

.pub-link:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
}

.pub-link.coming-soon {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: default;
  opacity: 0.7;
}

.pub-link.coming-soon:hover {
  transform: none;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}



/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent-primary);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-secondary);
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-large);
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Animations and Effects */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Enhanced Hover Effects */
.news-item:hover::before {
  width: 8px;
  transition: width 0.3s ease;
}

.publication-item:hover::before {
  height: 8px;
  transition: height 0.3s ease;
}

/* Floating Animation for Social Buttons */
.social-btn {
  animation: float 3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.2s);
}

.social-btn:hover {
  animation: none;
  transform: translateY(-2px) scale(1.05);
}

/* Background Decoration Images */
.bg-decoration {
  position: fixed;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

.bg-decoration {
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.decoration-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) contrast(1.1);
}

.bg-decoration .decoration-img {
  object-position: bottom; /* 底端对齐 */
}

/* Smooth Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--bg-tertiary);
  z-index: 1001;
}

.scroll-progress {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease;
}

/* Enhanced Section Transitions */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content,
  .publication-item {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .pub-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .profile-image {
    max-width: 300px;
    margin: 0 auto;
    order: -1;
  }
}

@media (max-width: 768px) {
  .bg-decoration {
    width: 100vw;
    height: 100vh;
  }
  
  .main-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .name-title {
    font-size: 2.5rem;
  }
  
  .name-cn {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .nav-container {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .news-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .news-date {
    text-align: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .bg-decoration {
    width: 100vw;
    height: 100vh;
  }
  
  .name-title {
    font-size: 2rem;
  }
  
  .name-cn {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .publication-item,
  .news-item {
    padding: 1.5rem;
  }
}