:root {
    --primary: #00356B; --primary-dark: #002347; --accent: #C09D63; --accent-light: #E4CFA8;
    --text-main: #1F2937; --text-sub: #4B5563; --text-light: #9CA3AF;
    --bg-body: #F9FAFB; --bg-card: #FFFFFF; --bg-section-alt: #F3F4F6;
    --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --nav-height: 72px; 
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 30px); }
body { font-family: "Inter", "Microsoft YaHei", sans-serif; color: var(--text-main); background: var(--bg-body); margin: 0; padding-top: var(--nav-height); line-height: 1.6; }
* { box-sizing: border-box; } img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; transition: color 0.2s ease; } ul, ol { list-style: none; padding: 0; margin: 0; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); z-index: 1000; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.nav-container { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--primary); }
.logo img { height: 46px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; justify-content: center; }
.logo-text .cn { font-size: 1.7rem; font-weight: 900; letter-spacing: 1px; }
.logo-text .en { font-size: 0.8rem; font-weight: 700; opacity: 0.85; text-transform: uppercase; letter-spacing: 3px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 1rem; font-weight: 600; color: var(--text-sub); display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 8px 0; position: relative; }
.nav-links a small { font-size: 0.7rem; font-weight: 400; opacity: 0.7; margin-top: 2px; text-transform: uppercase; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: var(--accent); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.menu-btn { display: none; width: 30px; cursor: pointer; flex-direction: column; gap: 6px; }
.menu-btn span { display: block; width: 100%; height: 3px; background: var(--primary); border-radius: 3px; }

/* Sections */
section { padding: 80px 24px; }
section:nth-child(odd) { background: var(--bg-card); }
section:nth-child(even) { background: var(--bg-section-alt); }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; color: var(--primary); margin: 0 0 12px; font-weight: 800; position: relative; display: inline-block; }
.section-header h2::after { content: ''; display: block; width: 60px; height: 5px; background: var(--accent); margin: 16px auto 0; border-radius: 3px; }
.section-header p { color: var(--text-light); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.875rem; }

/* Carousel */
.carousel-section { padding: 0; height: 650px; background: #000; position: relative; overflow: hidden; }
.carousel-container { width: 100%; height: 100%; position: relative; }
.carousel-overlay-title { position: absolute; top: 30px; left: 0; width: 100%; text-align: center; font-size: 3.5rem; font-weight: 900; color: #FFD700; letter-spacing: 12px; text-shadow: 0 4px 15px rgba(0,0,0,0.9); z-index: 50; pointer-events: none; font-family: "Microsoft YaHei", sans-serif; }
.carousel-overlay-title span { font-size: 1rem; letter-spacing: 5px; opacity: 0.8; display:block; margin-top:10px; color: white; text-shadow: none; }
.carousel-wrapper { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); will-change: transform; }
.carousel-slide { min-width: 100%; height: 100%; position: relative; display: flex; justify-content: center; align-items: center; }
.carousel-bg-blur { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(20px) brightness(0.4); transform: scale(1.1); }
.carousel-content { position: relative; z-index: 10; display: flex; align-items: center; gap: 60px; max-width: 1200px; width: 90%; margin-top: 140px; }
.carousel-cover-box { flex: 0 0 320px; perspective: 1000px; }
.carousel-cover-box img { width: 100%; border-radius: 8px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); transition: transform 0.4s; }
.carousel-cover-box img:hover { transform: rotateY(-5deg) scale(1.02); }
.carousel-text-box { color: white; flex: 1; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.carousel-tag { background: var(--accent); padding: 6px 12px; font-size: 0.8rem; font-weight: 700; border-radius: 4px; display: inline-block; margin-bottom: 20px; }
.carousel-title { font-size: 2.25rem; line-height: 1.2; font-weight: 800; margin-bottom: 24px; }
.carousel-authors { font-size: 1.1rem; color: #D1D5DB; margin-bottom: 16px; }
.carousel-author-highlight { color: var(--accent-light); font-weight: 700; border-bottom: 1px solid var(--accent-light); }
.carousel-journal { font-size: 1.25rem; font-weight: 700; color: #93C5FD; font-style: italic; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: white; width: 50px; height: 50px; border-radius: 50%; border:1px solid rgba(255,255,255,0.2); cursor: pointer; font-size: 1.5rem; backdrop-filter: blur(4px); z-index: 20; transition: 0.3s; }
.carousel-arrow:hover { background: rgba(255,255,255,0.3); }
.carousel-arrow.left { left: 30px; }
.carousel-arrow.right { right: 30px; }
.carousel-dots { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 20; }
.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer; transition: 0.3s; }
.dot.active { background: var(--accent); transform: scale(1.2); }

/* Profile */
.profile-card { display: flex; background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); border: 1px solid #E5E7EB; overflow: hidden; }
.profile-left { flex: 0 0 350px; background: #FAFAFA; padding: 48px 32px; border-right: 1px solid #E5E7EB; display: flex; flex-direction: column; align-items: center; }
.avatar-wrapper { width: 220px; height: 280px; border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); margin-bottom: 32px; border: 4px solid white; }
.profile-avatar { width: 100%; height: 100%; transition: 0.5s; }
.avatar-wrapper:hover .profile-avatar { transform: scale(1.05); }
.profile-right { flex: 1; padding: 48px 60px; }
.profile-name-title { border-bottom: 1px solid #E5E7EB; padding-bottom: 24px; margin-bottom: 32px; }
.profile-right h3 { font-size: 2.5rem; margin: 0 0 8px; color: var(--primary); font-weight: 800; }
.profile-right .en-name { font-size: 1.5rem; color: var(--text-light); font-weight: 400; margin-left: 10px; }
.job-title { font-size: 1.25rem; color: var(--accent); font-weight: 700; }
.dept { color: var(--text-sub); margin-top: 4px; }
.profile-tags { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.tag { background: #EFF6FF; color: var(--primary); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.profile-section-title { font-size: 1.25rem; color: var(--text-main); font-weight: 700; margin: 40px 0 16px; display: flex; align-items: center; }
.profile-section-title::before { content: ''; width: 6px; height: 24px; background: var(--accent); margin-right: 12px; border-radius: 2px; }
.resume-timeline { padding: 24px 0 0 24px; border-left: 2px solid #E5E7EB; margin-left: 24px; }
.resume-item { position: relative; margin-bottom: 32px; }
.resume-item::before { content: ''; position: absolute; left: -34px; top: 6px; width: 12px; height: 12px; background: white; border: 3px solid var(--accent); border-radius: 50%; }
.resume-date { display: block; font-size: 0.85rem; color: var(--text-light); font-weight: 600; }
.resume-info { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
.styled-list { list-style: disc outside; margin-left: 20px; color: var(--text-sub); }
.styled-list li { margin-bottom: 8px; }
.sidebar-extra { width: 100%; margin-top: 32px; padding-top: 20px; border-top: 2px dashed #E5E7EB; }
.sidebar-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed #E5E7EB; text-align: left; }
.sidebar-title { font-weight: 800; color: var(--primary); font-size: 1rem; margin-bottom: 6px; }
.sidebar-img { width: 70%; border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid white; transition: 0.3s; margin-top: 8px; }
.sidebar-img:hover { transform: scale(1.02); }
.profile-contact-box { font-size: 0.95rem; text-align: left; }
.profile-contact-box strong { color: var(--primary); display: block; margin-bottom: 12px; font-size: 1.1rem; }
.profile-contact-item { margin-bottom: 12px; display: flex; gap: 10px; color: var(--text-sub); }
.recruit-msg { margin-top: 24px; padding-top: 16px; border-top: 2px dashed #E5E7EB; font-size: 0.9rem; color: var(--accent); font-weight: 600; }

/* Research */
.research-grid { display: flex; flex-direction: column; gap: 60px; }
.research-item { display: flex; align-items: center; gap: 48px; background: white; padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); transition: 0.3s; }
.research-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.research-item.reverse { flex-direction: row-reverse; }
.res-img-box { flex: 1; overflow: hidden; border-radius: var(--radius-md); }
.res-img-box img { width: 100%; transition: 0.5s; }
.research-item:hover .res-img-box img { transform: scale(1.05); }
.res-text-box { flex: 1.2; }
.res-badge { background: var(--accent); color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; margin-bottom: 16px; display: inline-block; }
.res-text-box h3 { font-size: 1.75rem; color: var(--primary); margin: 0 0 16px; }

/* Toggle - Fixed Icons */
.master-toggle { background: var(--primary); color: white; font-weight: 700; padding: 14px 32px; border-radius: 50px; text-align: center; cursor: pointer; margin: 0 auto 40px; max-width: 400px; display: flex; justify-content: center; gap: 10px; transition: 0.3s; }
.master-toggle:hover { transform: translateY(-2px); background: var(--primary-dark); }
.master-toggle::after { content: '▼'; font-size: 0.7rem; transition: 0.3s; }
.master-toggle.active::after { transform: rotate(180deg); }

.accordion-content { display: none; animation: fadeIn 0.4s ease; margin-top: 20px; }
.accordion-content.open { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Pubs */
.category-toggle { background: var(--primary); color: white; padding: 18px 24px; margin-top: 24px; font-weight: 700; font-size: 1.1rem; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border: none; }
.category-toggle::after { content: '▼'; color: currentColor; font-size: 0.8rem; transition: 0.3s; opacity: 0.7; }
.category-toggle.active::after { transform: rotate(180deg); opacity: 1; }

.section-header-custom { background: white; color: var(--primary); border: 1px solid var(--primary); }
.section-header-custom.active { background: #EFF6FF; }

.google-scholar-bar { text-align: center; margin-bottom: 50px; }
.google-scholar-btn { display: inline-flex; align-items: center; gap: 12px; padding: 12px 32px; background: white; border: 1px solid #E5E7EB; border-radius: 50px; font-weight: 600; color: var(--text-sub); transition: 0.3s; }
.google-scholar-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.cover-gallery { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 50px; }
.cover-img { height: 200px; border-radius: 8px; border: 2px solid white; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: 0.3s; }
.cover-img:hover { transform: scale(1.05) rotate(2deg); }
.pubs-stats-bar { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin: 30px 0 50px; background: white; padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.stat-item { flex: 1; min-width: 140px; text-align: center; }
.stat-num { font-size: 2.5rem; font-weight: 800; color: var(--primary); display: block; line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 0.8rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; }

.paper-year-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; padding: 20px 0; border-top: 1px dashed #E5E7EB; border-bottom: 1px dashed #E5E7EB; }
.year-stat-item { padding: 6px 12px; background: #F3F4F6; border-radius: 6px; font-size: 0.9rem; color: var(--text-sub); cursor: pointer; transition: 0.2s; flex: 1 1 auto; min-width: 80px; text-align: center; }
.year-stat-item:hover, .year-stat-item.active { background: var(--primary); color: white; }
/* **** FIX 1: Year Stat Hover Color **** */
.year-stat-item:hover .stat-num, .year-stat-item.active .stat-num { color: white; }

.sub-toggle { padding: 14px 20px; margin-top: 15px; background: white; border: 1px solid #E5E7EB; border-left: 4px solid var(--accent); border-radius: 4px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s ease; }
.sub-toggle.active { background: #EFF6FF; border-left-color: var(--primary); color: var(--primary); }
.sub-toggle::after { content: '+'; font-weight: 400; font-size: 1.4rem; line-height: 1; color: #9CA3AF; }
.sub-toggle.active::after { content: '-'; color: var(--primary); }

.pub-item { display: flex; gap: 32px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px dashed #E5E7EB; }
.pub-cover { width: 130px; flex-shrink: 0; }
.pub-cover img { width: 100%; border-radius: 4px; border: 1px solid #E5E7EB; }
.pub-content h4 { font-size: 1.15rem; margin: 0 0 10px; font-weight: 700; line-height: 1.4; }
.pdf-tag { font-size: 0.75rem; font-weight: 700; color: #DC2626; border: 1px solid #DC2626; padding: 2px 6px; border-radius: 12px; margin-left: 8px; }
.pdf-tag:hover { background: #DC2626; color: white; }
.pub-num { color: var(--accent); font-weight: 900; margin-right: 8px; }

/* Team - Numbering Fix */
.team-stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px; background: white; padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-bottom: 50px; text-align: center; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px; padding: 20px 0; }
.member-card { background: white; padding: 24px; border-radius: var(--radius-md); box-shadow: var(--shadow-card); border: 1px solid #F3F4F6; text-align: center; transition: 0.3s; position: relative; }
.member-card:hover { transform: translateY(-8px); border-color: var(--accent-light); }
.member-photo { width: 110px; height: 110px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; border: 3px solid #F3F4F6; }
.member-card h4 { margin: 0 0 4px; color: var(--primary); font-size: 1.15rem; }
.member-card .grade { font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; display: block; }
.member-card .info { font-size: 0.85rem; color: var(--text-sub); line-height: 1.4; }
.member-card .job { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #E5E7EB; font-weight: 600; font-size: 0.9rem; }
.member-number {
    position: absolute;
    top: 8px;
    right: 8px;
    color: rgba(0, 0, 0, 0.08);
    font-size: 0.8rem;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
}

/* Facility & Activity */
.facility-grid, .activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; padding-top: 20px; }
.facility-card, .activity-card { background: white; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); transition: 0.3s; }
.facility-card:hover, .activity-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.facility-img, .act-img { height: 200px; overflow: hidden; }
.facility-img img, .act-img img { width: 100%; height: 100%; transition: 0.6s; }
.facility-card:hover img, .activity-card:hover img { transform: scale(1.1); }
.facility-name { padding: 16px; text-align: center; font-weight: 600; border-top: 1px solid #F3F4F6; }
.act-info { padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; border-top: 4px solid var(--accent); }
.act-year { font-size: 1.5rem; font-weight: 800; color: #E5E7EB; }
.activity-card:hover .act-year { color: var(--primary); }

/* Footer */
footer { background: var(--primary-dark); color: #9CA3AF; padding: 60px 24px; text-align: center; font-size: 0.9rem; }
.footer-sub a { border-bottom: 1px dotted #6B7280; }
.visit-count { margin-top: 24px; padding-top: 24px; border-top: 1px dashed #374151; display: inline-block; }
#busuanzi_value_site_pv { color: var(--accent); font-weight: 700; margin-left: 6px; }
#backToTop { position: fixed; bottom: 40px; right: 40px; width: 50px; height: 50px; background: var(--primary); color: white; border-radius: 50%; text-align: center; line-height: 50px; font-size: 1.5rem; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.2); opacity: 0; pointer-events: none; transition: 0.3s; z-index: 900; }
#backToTop.visible { opacity: 1; pointer-events: auto; }

/* Project List */
.project-list { padding: 20px; background: white; border-radius: 0 0 8px 8px; border: 1px solid #E5E7EB; border-top: none; }
.project-list li { position: relative; padding-left: 24px; margin-bottom: 16px; color: var(--text-sub); }
.project-list li::before { content: '•'; position: absolute; left: 0; color: var(--accent); font-size: 1.5rem; line-height: 1rem; top: 4px; }
.project-highlight { color: var(--primary); font-weight: 700; }

@media (max-width: 1024px) {
    .nav-container { position: relative; }
    .logo { position: static; width: 100%; }
    .logo img { position: relative; z-index: 20; height: 38px; }
    .logo-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; width: 80%; z-index: 10; }
    .logo-text .cn { font-size: 1.35rem; }
    .logo-text .en { font-size: 0.7rem; }
    .nav-links { position: fixed; top: var(--nav-height); left: 0; width: 100%; background: white; flex-direction: column; padding: 20px 0; box-shadow: 0 10px 20px rgba(0,0,0,0.05); display: none; }
    .nav-links.active { display: flex; }
    .menu-btn { display: flex; z-index: 30; }
    .carousel-section { height: auto !important; min-height: 70vh; }
    .carousel-overlay-title { font-size: 1.5rem; letter-spacing: 2px; top: 15px; width: 100%; padding: 0 10px; line-height: 1.2; }
    .carousel-content { margin-top: 75px; flex-direction: column; text-align: center; padding: 0 20px 60px 20px; gap: 15px; }
    .carousel-cover-box { flex: 0 0 auto !important; width: 100%; }
    .carousel-cover-box img { max-width: 150px; margin: 0 auto; }
    /* **** FIX 2: Mobile Carousel Spacing **** */
    .carousel-cover-box { margin-bottom: 20px; }

    .carousel-title { font-size: 1.3rem; }
    .profile-card { flex-direction: column; }
    .profile-left { border-right: none; border-bottom: 1px solid #E5E7EB; padding: 30px 20px; width: 100%; }
    .research-item, .research-item.reverse { flex-direction: column; text-align: center; }

    /* Centering images on mobile */
    .pub-item { flex-direction: column; align-items: center; text-align: center; }
    .book-item { align-items: center; }
}
