/* ========================================
   CSS Design System - Academic Homepage
   ======================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Color Palette - Light Mode */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-link: #2563eb;
    --text-link-hover: #1d4ed8;

    --accent-primary: #2563eb;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --accent-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    --accent-soft: rgba(37, 99, 235, 0.08);

    --tag-ccf: #dc2626;
    --tag-ccf-bg: rgba(220, 38, 38, 0.08);
    --tag-spotlight: #d97706;
    --tag-spotlight-bg: rgba(217, 119, 6, 0.08);
    --tag-oral: #059669;
    --tag-oral-bg: rgba(5, 150, 105, 0.08);
    --tag-if: #7c3aed;
    --tag-if-bg: rgba(124, 58, 237, 0.08);

    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    --sidebar-width: 300px;
    --nav-height: 64px;
    --content-max-width: 800px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
    --bg-primary: #0b1120;
    --bg-secondary: #111827;
    --bg-tertiary: #1e293b;
    --bg-card: #1e293b;
    --bg-sidebar: linear-gradient(180deg, #111827 0%, #0b1120 100%);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-link: #60a5fa;
    --text-link-hover: #93bbfd;

    --accent-soft: rgba(96, 165, 250, 0.1);
    --border-color: #1e293b;
    --border-color-hover: #334155;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(96, 165, 250, 0.2);

    --tag-ccf-bg: rgba(220, 38, 38, 0.15);
    --tag-spotlight-bg: rgba(217, 119, 6, 0.15);
    --tag-oral-bg: rgba(5, 150, 105, 0.15);
    --tag-if-bg: rgba(124, 58, 237, 0.15);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--text-link);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-link-hover);
}

::selection {
    background: var(--accent-primary);
    color: #fff;
}

/* ---------- Particles Canvas ---------- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

[data-theme="dark"] #particles-canvas {
    opacity: 0.6;
}

/* ---------- Top Navigation ---------- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-normal);
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .top-nav {
    background: rgba(11, 17, 32, 0.85);
}

.top-nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: transform var(--transition-spring);
}

.nav-logo:hover {
    transform: scale(1.05);
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.4rem;
}

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

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.nav-link.active {
    color: var(--accent-primary);
    background: var(--accent-soft);
    font-weight: 600;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent-primary);
    transform: rotate(15deg);
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-menu {
    background: var(--bg-secondary);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateY(0);
}

.mobile-nav-link {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
    background: var(--accent-soft);
    color: var(--accent-primary);
}

/* ---------- Page Layout ---------- */
.page-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: var(--nav-height);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 40px 24px 40px 32px;
}

.sidebar-sticky {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Profile Photo */
.profile-photo-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-slow);
    position: relative;
    z-index: 2;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.profile-photo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: var(--accent-gradient);
    z-index: 1;
    animation: ring-rotate 6s linear infinite;
    opacity: 0.7;
}

@keyframes ring-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.profile-status {
    position: absolute;
    bottom: 8px;
    right: -10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    padding: 4px 12px 4px 8px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    z-index: 3;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Profile Info */
.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.profile-name-cn {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.profile-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 8px;
}

.profile-affiliation,
.profile-location {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-affiliation i,
.profile-location i {
    font-size: 0.75rem;
    color: var(--accent-primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition-spring);
    position: relative;
}

.social-link:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.social-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.social-link:hover[data-tooltip]::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Sidebar Buttons */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
    color: #fff;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: none;
    animation: btn-shine 3s ease-in-out infinite;
}

@keyframes btn-shine {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--accent-soft);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Sidebar Stats */
.sidebar-stats {
    display: flex;
    gap: 12px;
    width: 100%;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 40px 12% 40px 24px;
    /* Increased right padding to ~10-12% for more whitespace */
}

/* Sections */
.section {
    margin-bottom: 56px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-slow);
}

.section-title:hover::after {
    width: 120px;
}

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

.section-subtitle {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.section-subtitle .inline-link {
    font-weight: 600;
}

/* Bio */
.bio-text {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.bio-text strong {
    color: var(--text-primary);
}

.inline-link {
    color: var(--text-link);
    font-weight: 500;
    position: relative;
}

.inline-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.inline-link:hover::after {
    width: 100%;
}

.bio-highlight {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    animation: highlight-pulse 4s ease-in-out infinite;
}

@keyframes highlight-pulse {

    0%,
    100% {
        border-left-color: var(--accent-primary);
    }

    50% {
        border-left-color: var(--accent-secondary);
    }
}

.highlight-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Research Text */
.research-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.research-text p {
    margin-bottom: 14px;
}

.research-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
    padding: 0;
}

.research-list li {
    padding: 10px 16px 10px 20px;
    position: relative;
    border-left: 3px solid var(--accent-primary);
    background: var(--accent-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition-normal);
    font-size: 0.92rem;
}

.research-list li:hover {
    transform: translateX(6px);
    border-left-color: var(--accent-secondary);
    background: rgba(37, 99, 235, 0.12);
}

.research-list li strong {
    color: var(--text-primary);
    font-weight: 700;
}

.research-note {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    font-style: italic;
    margin-top: 8px;
}



/* News Timeline */
.news-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

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

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 14px 0;
    position: relative;
    transition: all var(--transition-normal);
}

.news-item:hover {
    transform: translateX(4px);
}

.news-item::after {
    content: '';
    position: absolute;
    left: 63px;
    top: 22px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-primary);
    z-index: 1;
    transition: all var(--transition-fast);
}

.news-item:hover::after {
    transform: scale(1.4);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.news-date {
    width: 56px;
    text-align: right;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-tertiary);
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
}

.news-content {
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding-left: 20px;
}

.news-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 6px;
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    50% {
        box-shadow: 0 0 12px 2px rgba(37, 99, 235, 0.3);
    }
}

.btn-show-more {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-left: auto;
    margin-right: auto;
}

.btn-show-more:hover {
    background: var(--accent-soft);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.btn-show-more i {
    transition: transform var(--transition-normal);
}

.btn-show-more:hover i {
    transform: translateY(3px);
}

/* ---------- Publications ---------- */
.pub-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 32px 0 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.publication-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

.publication-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.publication-card:hover::before {
    opacity: 0.03;
}

/* Publication Image Gallery (top strip — auto height) */
.pub-gallery {
    display: flex;
    gap: 0;
    width: 100%;
    overflow: hidden;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.pub-gallery a {
    flex: 1;
    min-width: 0;
    display: block;
    position: relative;
    overflow: hidden;
}

.pub-gallery a:not(:last-child) {
    border-right: 2px solid var(--border-color);
}

.pub-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Floating badge instead of full overlay */
.pub-gallery-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    pointer-events: none;
    z-index: 2;
}

.pub-gallery:hover .pub-gallery-badge {
    opacity: 1;
    transform: translateY(0);
}

.pub-gallery a:hover img {
    transform: scale(1.03);
}

/* Subtle shine line on hover */
.pub-gallery a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.pub-gallery a:hover::after {
    left: 120%;
}

/* Publication Info */
.pub-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    padding: 20px 24px 24px;
}

.pub-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
}

.pub-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.pub-title a:hover {
    color: var(--text-link);
}

.pub-authors {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.pub-authors strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pub-venue {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.pub-venue strong {
    color: var(--text-primary);
}

/* Publication Tags */
.pub-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.pub-tag {
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all var(--transition-fast);
}

.tag-ccf {
    color: var(--tag-ccf);
    background: var(--tag-ccf-bg);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.tag-spotlight {
    color: var(--tag-spotlight);
    background: var(--tag-spotlight-bg);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.tag-oral {
    color: var(--tag-oral);
    background: var(--tag-oral-bg);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.tag-if {
    color: var(--tag-if);
    background: var(--tag-if-bg);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.pub-tag:hover {
    transform: scale(1.05);
}

/* Publication Links */
.pub-links {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: 4px;
}

.pub-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.pub-link-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Citation Box */
.citation-box {
    margin-top: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.citation-box pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
    overflow-x: auto;
}

.btn-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copy:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* ---------- Honors ---------- */
.honors-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.honor-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--border-color);
}

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

.honor-item:hover {
    background: var(--accent-soft);
    transform: translateX(8px);
    border-radius: var(--radius-lg);
}

.honor-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    flex-shrink: 0;
    width: 80px;
}

.honor-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.honor-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.honor-content strong {
    font-size: 0.92rem;
    display: block;
    margin-bottom: 2px;
}

.honor-content p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ---------- Academic Service ---------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.service-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.service-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.service-card h3 i {
    color: var(--accent-primary);
}

.service-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-card li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 6px 0 6px 20px;
    position: relative;
    transition: all var(--transition-fast);
}

.service-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.service-card li:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 40px;
    padding-top: 0;
    text-align: center;
    position: relative;
}

.footer-wave {
    overflow: hidden;
    line-height: 0;
    margin-bottom: 24px;
}

.footer-wave svg {
    width: 100%;
    height: 40px;
    fill: var(--bg-tertiary);
}

.footer-content {
    padding: 24px 0 40px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-sub {
    font-size: 0.78rem;
    margin-top: 4px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.footer-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    transition: all var(--transition-spring);
}

.footer-links a:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-4px);
}

/* Visitor Counter */
.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 14px 28px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    display: inline-flex;
    font-size: 0.82rem;
    color: var(--text-tertiary);
    border: 1px solid var(--border-color);
}

.visitor-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.visitor-item i {
    color: var(--accent-primary);
    font-size: 0.85rem;
}

.visitor-number {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.visitor-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* ---------- Toast Notification ---------- */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    opacity: 0;
    transition: all var(--transition-spring);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast i {
    color: #22c55e;
}

/* ---------- Scroll Animations ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll.visible .research-card,
.animate-on-scroll.visible .news-item,
.animate-on-scroll.visible .honor-item,
.animate-on-scroll.visible .service-card {
    animation: staggerFadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.animate-on-scroll.visible .research-card:nth-child(1),
.animate-on-scroll.visible .news-item:nth-child(1),
.animate-on-scroll.visible .honor-item:nth-child(1),
.animate-on-scroll.visible .service-card:nth-child(1) {
    animation-delay: 0.05s;
}

.animate-on-scroll.visible .research-card:nth-child(2),
.animate-on-scroll.visible .news-item:nth-child(2),
.animate-on-scroll.visible .honor-item:nth-child(2),
.animate-on-scroll.visible .service-card:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-on-scroll.visible .research-card:nth-child(3),
.animate-on-scroll.visible .news-item:nth-child(3),
.animate-on-scroll.visible .honor-item:nth-child(3) {
    animation-delay: 0.15s;
}

.animate-on-scroll.visible .research-card:nth-child(4),
.animate-on-scroll.visible .news-item:nth-child(4),
.animate-on-scroll.visible .honor-item:nth-child(4) {
    animation-delay: 0.2s;
}

.animate-on-scroll.visible .news-item:nth-child(5),
.animate-on-scroll.visible .honor-item:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .page-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 32px 24px 24px;
    }

    .sidebar-sticky {
        position: relative;
        top: 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .profile-photo-wrapper {
        width: 120px;
        height: 120px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .profile-photo-ring {
        inset: -4px;
    }

    .profile-info {
        text-align: left;
    }

    .sidebar-actions {
        flex-direction: row;
        justify-content: center;
    }

    .sidebar-stats {
        max-width: 300px;
    }

    .main-content {
        padding: 24px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-menu-overlay.active {
        pointer-events: all;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .publication-card {
        flex-direction: column;
        padding: 16px;
    }

    .pub-thumbnail {
        width: 100%;
        height: 180px;
    }

    .sidebar-sticky {
        flex-direction: column;
        align-items: center;
    }

    .profile-info {
        text-align: center;
    }

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

    .sidebar-actions {
        flex-direction: column;
    }

    .news-timeline::before {
        left: 63px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }

    .main-content {
        padding: 16px;
    }

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

    .publication-card {
        padding: 14px;
    }

    .pub-thumbnail {
        height: 150px;
    }
}