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

:root {
  /* Color Palette */
  --primary-color: #2c3e50;
  --accent-color: #800000;
  --accent-light: #a52a2a;
  --text-dark: #1a1a1a;
  --text-medium: #444;
  --text-light: #666;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-highlight: #fffbeb;
  --border-color: #e0e0e0;
  --border-light: #ececec;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-serif: Georgia, "Times New Roman", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

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

body {
  font-family: var(--font-serif);
  line-height: 1.7;
  color: var(--text-dark);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ========================================
   Navigation Bar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all var(--transition-medium);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.98);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  font-family: var(--font-serif);
}

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

.nav-menu a {
  color: var(--text-medium);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color var(--transition-fast);
  font-family: var(--font-sans);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* ========================================
   Main Wrapper
   ======================================== */
.main-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
}

/* ========================================
   Section Styles
   ======================================== */
.section {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

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

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title i {
  font-size: 1.6rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.section-note {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
}

/* ========================================
   Profile Section
   ======================================== */
.profile-header {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.profile-image {
  flex-shrink: 0;
}

.profile-image img {
  width: 160px;
  height: 200px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  border: 5px solid var(--bg-white);
  transition: transform var(--transition-medium);
}

.profile-image img:hover {
  transform: scale(1.05);
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.profile-name-cn {
  font-size: 2rem;
  color: var(--text-medium);
  margin-left: 1rem;
  font-weight: 600;
}

.profile-title {
  margin-bottom: 1rem;
}

.title-en {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.title-cn {
  font-size: 1rem;
  color: var(--text-medium);
  font-family: var(--font-serif);
}

.profile-contact {
  margin-bottom: 1.5rem;
}

.profile-contact p {
  color: var(--text-medium);
  font-size: 0.95rem;
}

.profile-contact i {
  margin-right: 0.5rem;
  color: var(--accent-color);
}

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

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

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

.social-btn.google-scholar:hover {
  border-color: #4285f4;
  color: #4285f4;
}

.social-btn.orcid:hover {
  border-color: #a6ce39;
  color: #a6ce39;
}

.social-btn i {
  font-size: 1.2rem;
}

/* ========================================
   Bio Section
   ======================================== */
.bio-section {
  margin: 1.2rem 0;
}

.bio-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.bio-en {
  padding-bottom: 0.5rem;
}

.bio-cn {
  font-family: var(--font-serif);
  color: var(--text-medium);
  border-top: 2px dashed var(--border-light);
  padding-top: 0.5rem;
}

/* ========================================
   Notice Box
   ======================================== */
.notice-box {
  background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
  border: 2px solid #ffd700;
  border-radius: 10px;
  padding: 1.2rem;
  margin: 1.2rem 0;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.notice-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notice-title i {
  color: #ff6b6b;
  animation: pulse 2s infinite;
}

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

.notice-content p {
  margin-bottom: 0.8rem;
  line-height: 1.7;
  font-size: 1rem;
}

.notice-en {
  color: var(--text-dark);
}

.notice-cn {
  color: var(--text-medium);
  font-family: var(--font-serif);
}

.highlight-text {
  color: #d32f2f;
  font-weight: 700;
  font-size: 1.05em;
}

/* ========================================
   News Section
   ======================================== */
.news-container {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  background: var(--bg-light);
  border-left: 4px solid var(--accent-color);
  border-radius: 6px;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.news-list li:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.news-date {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.6rem;
  font-family: var(--font-sans);
}

/* Custom Scrollbar */
.news-container::-webkit-scrollbar {
  width: 8px;
}

.news-container::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

.news-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
  transition: background var(--transition-fast);
}

.news-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ========================================
   Publications Section
   ======================================== */
#full-list-publication h3 {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}

#full-list-publication ul {
  list-style: none;
  padding: 0;
}

.pub-item {
  position: relative;
  padding: 1rem 1rem 1rem 2.5rem;
  margin-bottom: 0.8rem;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 4px solid var(--accent-light);
  transition: all var(--transition-fast);
}

.pub-item::before {
  content: "\f15c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0.75rem;
  top: 1.2rem;
  color: var(--accent-color);
  font-size: 1rem;
}

.pub-item:hover {
  background: #f0f0f0;
  transform: translateX(2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pub-item::before {
  content: "\f15c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0.75rem;
  top: 1.2rem;
  color: var(--accent-color);
  font-size: 1rem;
}

.pub-item-hl {
  background: #f5f5f5;
  border-left-color: var(--accent-light);
}

/* Publication image - HIDDEN VERSION */
.pub-image {
  display: none;
}

/* Publication content */
.pub-content {
  flex: 1;
  min-width: 0;
}

.pub-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}

.pub-authors {
  margin: 0 0 0.3rem 0;
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.5;
}

.pub-authors b {
  color: var(--accent-color);
  font-weight: 600;
}

.pub-venue {
  margin: 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-light);
  line-height: 1.5;
}

.pub-links {
  display: inline;
  margin-left: 0.5rem;
}

.pub-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1565c0;
  text-decoration: none;
  margin-right: 0.5rem;
  font-style: normal;
  transition: color var(--transition-fast);
}

.pub-link:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.imgbadge {
  height: 18px;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* ========================================
   Activities Section
   ======================================== */
.activity-group {
  margin-bottom: 1.5rem;
}

.activity-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-subtitle i {
  color: var(--accent-color);
}

.activity-list {
  list-style: none;
  padding-left: 0;
}

.activity-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  color: var(--text-medium);
  line-height: 1.5;
}

.activity-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* ========================================
   Awards Section
   ======================================== */
.award-list {
  list-style: none;
  padding: 0;
}

.award-list li {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.4rem;
  background: #f5f5f5;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  align-items: center;
}

.award-list li:hover {
  background: #ececec;
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

.award-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 80px;
  text-align: center;
  font-family: var(--font-sans);
}

.award-content {
  flex: 1;
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.4;
}

.award-cn {
  color: var(--text-medium);
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.award-content strong {
  color: var(--accent-color);
  font-size: 1.1rem;
}

/* ========================================
   Projects Section
   ======================================== */
.project-list {
  list-style: none;
  padding: 0;
}

.project-list li {
  padding: 0.8rem;
  margin-bottom: 0.6rem;
  background: var(--bg-light);
  border-left: 4px solid var(--accent-color);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.project-list li:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.project-name {
  flex: 1;
  color: var(--text-dark);
  font-weight: 500;
}

.project-role {
  color: var(--accent-color);
  font-style: italic;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ========================================
   Visitor Section
   ======================================== */
.visitor-section {
  text-align: center;
  background: transparent;
  box-shadow: none;
  padding: 1rem;
}

.visitor-section:hover {
  transform: none;
  box-shadow: none;
}

.visitor-map {
  display: inline-block;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 2rem;
}

.footer p {
  margin: 0.25rem 0;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets and smaller laptops */
@media (max-width: 968px) {
  .main-wrapper {
    padding: 5rem 1.5rem 2rem;
  }

  .section {
    padding: 2rem;
  }

  .profile-header {
    gap: 2rem;
  }

  .profile-image img {
    width: 160px;
    height: 160px;
  }

  .profile-name {
    font-size: 2rem;
  }

  .profile-name-cn {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .nav-brand {
    font-size: 1.3rem;
  }

  .nav-menu {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-menu a {
    font-size: 0.85rem;
  }

  .main-wrapper {
    padding: 7rem 1rem 1rem;
  }

  .section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .profile-image img {
    width: 150px;
    height: 150px;
  }

  .profile-name {
    font-size: 1.8rem;
  }

  .profile-name-cn {
    display: block;
    margin-left: 0;
    margin-top: 0.5rem;
    font-size: 1.5rem;
  }

  .title-en {
    font-size: 1rem;
  }

  .title-cn {
    font-size: 0.9rem;
  }

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

  .bio-content p {
    font-size: 1rem;
    text-align: left;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-title i {
    font-size: 1.3rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .award-list li {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .award-year {
    min-width: auto;
  }

  .project-list li {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .nav-menu {
    gap: 0.5rem;
  }

  .profile-image img {
    width: 120px;
    height: 120px;
  }

  .profile-name {
    font-size: 1.5rem;
  }

  .profile-name-cn {
    font-size: 1.3rem;
  }

  .social-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .news-date {
    display: block;
    margin-bottom: 0.5rem;
    width: fit-content;
  }

  .notice-box {
    padding: 1rem;
  }

  .notice-title {
    font-size: 1.1rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .visitor-section {
    display: none;
  }

  .section {
    box-shadow: none;
    page-break-inside: avoid;
  }

  body {
    background: white;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .section {
    border: 2px solid var(--text-dark);
  }

  .social-btn,
  .news-list li,
  .pub-item,
  .project-list li {
    border: 1px solid var(--text-dark);
  }
}
