/* 全局样式 */
:root {
    /* 默认深色配色方案 */
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --secondary-color: #1e293b;
    --accent-color: #22d3ee;
    --accent-hover: #06b6d4;
    
    /* 深色文字颜色 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    /* 深色背景颜色 */
    --background: #0f172a;
    --background-alt: #1e293b;
    --background-soft: #334155;
    --surface: #1e293b;
    --surface-elevated: #334155;
    
    /* 深色边框和分割线 */
    --border-color: #334155;
    --border-soft: #475569;
    --divider: #475569;
    
    /* 深色阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* 现代渐变 */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-soft: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-warm: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    
    /* 圆角系统 */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* 间距系统 */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* 动画系统 */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;
    --bezier-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --bezier-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 暗色模式变量 */
:root[data-theme="dark"] {
    /* 暗色配色方案 */
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --secondary-color: #1e293b;
    --accent-color: #22d3ee;
    --accent-hover: #06b6d4;
    
    /* 暗色文字 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    /* 暗色背景 */
    --background: #0f172a;
    --background-alt: #1e293b;
    --background-soft: #334155;
    --surface: #1e293b;
    --surface-elevated: #334155;
    
    /* 暗色边框 */
    --border-color: #334155;
    --border-soft: #475569;
    --divider: #475569;
    
    /* 暗色阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* 浅色主题配色方案 */
:root[data-theme="light"] {
    /* 浅色主要颜色 */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #f1f5f9;
    --accent-color: #06b6d4;
    --accent-hover: #0891b2;
    
    /* 浅色文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* 浅色背景颜色 */
    --background: #ffffff;
    --background-alt: #f8fafc;
    --background-soft: #f1f5f9;
    --surface: #ffffff;
    --surface-elevated: #f8fafc;
    
    /* 浅色边框和分割线 */
    --border-color: #e2e8f0;
    --border-soft: #f1f5f9;
    --divider: #e2e8f0;
    
    /* 浅色阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 浅色渐变效果 */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-soft: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-warm: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1, 'cv01' 1, 'cv03' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 现代按钮系统 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    transition: all var(--transition) var(--bezier-smooth);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    user-select: none;
    outline: none;
    min-height: 2.75rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow);
    transition: all 100ms var(--bezier-smooth);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* 现代导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition) var(--bezier-smooth);
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: var(--border-color);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px) saturate(200%);
}

:root[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-xl);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space);
}

.nav-logo a {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition);
    letter-spacing: -0.025em;
}

.nav-logo a:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    transition: all var(--transition) var(--bezier-smooth);
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition) var(--bezier-smooth);
    transform: translateX(-50%);
    border-radius: 1px;
}

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

/* 主题切换按钮 */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition) var(--bezier-smooth);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg) scale(1.1);
    box-shadow: var(--shadow);
}

.theme-toggle:active {
    transform: rotate(180deg) scale(0.95);
}

.theme-toggle i {
    font-size: 1rem;
    transition: all var(--transition);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* 现代主页设计 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7.5rem 0 5rem;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        var(--gradient-soft);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23e5e7eb" fill-opacity="0.3"><circle cx="30" cy="30" r="1.5"/></g></g></svg>') repeat;
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

:root[data-theme="dark"] .hero {
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
    letter-spacing: -0.025em;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.2s forwards;
}

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

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    animation: shimmer 3s ease-in-out infinite;
}

.highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

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

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.4s forwards;
    letter-spacing: 0.025em;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-2xl);
    line-height: 1.75;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.6s forwards;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: var(--space-lg);
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.8s forwards;
}

.hero-buttons .btn:first-child {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: var(--shadow); }
    50% { box-shadow: var(--shadow-xl), 0 0 0 4px rgba(99, 102, 241, 0.1); }
}

.hero-image {
    display: flex;
    justify-content: center;
}

.profile-photo {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInScale 1s ease-out 1s forwards;
    transition: all var(--transition) var(--bezier-smooth);
}

.profile-photo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: var(--shadow-2xl);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

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

.profile-photo img,
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 5rem;
    opacity: 0.8;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 加载状态和骨架屏 */
.skeleton {
    background: linear-gradient(90deg, 
        var(--background-alt) 25%, 
        var(--background-soft) 50%, 
        var(--background-alt) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-lg);
}

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

/* 微交互效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .glass-effect {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-lift {
    transition: all var(--transition) var(--bezier-smooth);
}

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

.hover-glow {
    transition: all var(--transition);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), var(--shadow-lg);
}

/* 关于我部分 */
.about {
    padding: 100px 0;
    background: var(--background);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* 经历部分 */
.experience {
    padding: 100px 0;
    background: var(--background-alt);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    padding-left: 80px;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--background);
    box-shadow: var(--shadow);
}

.timeline-content {
    background: var(--background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.timeline-company {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.timeline-description {
    color: var(--text-light);
}

.timeline-description li {
    margin-bottom: 8px;
}

/* 技能部分 */
.skills {
    padding: 100px 0;
    background: var(--background);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--background-alt);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.skill-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-item {
    background: var(--background);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 项目部分 */
.projects {
    padding: 100px 0;
    background: var(--background-alt);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    background: var(--background-alt);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gradient-primary);
    color: white;
    font-size: 60px;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}

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

.project-link:hover {
    color: var(--accent-color);
}

/* 联系方式部分 */
.contact {
    padding: 100px 0;
    background: var(--background);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-items {
    margin-bottom: 40px;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
}

.contact-separator {
    color: var(--text-muted);
    font-weight: 300;
    margin: 0 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--background-alt);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background: var(--background-alt);
    padding: 40px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: var(--text-muted);
    padding: 30px 0;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-marker {
        left: 10px;
    }

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

    .contact-form {
        padding: 30px 20px;
    }
}

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

    .hero {
        padding: 100px 0 60px;
    }

    .hero-content {
        padding: 0 15px;
    }

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

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

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

    .about, .experience, .skills, .projects, .contact {
        padding: 60px 0;
    }

    .skill-category {
        padding: 30px 20px;
    }

    .timeline-content {
        padding: 20px;
    }

    .project-content {
        padding: 20px;
    }
}

/* 滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 现代进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}


/* 回到顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition) var(--bezier-smooth);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

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

.scroll-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-2px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* 现代选择器美化 */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--background-alt);
}

/* 无障碍样式 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: top 0.3s;
    z-index: 10001;
}

.skip-link:focus {
    top: 6px;
}

.keyboard-navigation *:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 特殊效果 */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.frosted-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .frosted-glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 学术成果部分样式 */
.publications {
    padding: 100px 0;
    background: var(--background-alt);
    position: relative;
}

.publications::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 85%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

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

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

/* 学术统计卡片 */
.academic-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-xl);
    margin-bottom: 60px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--surface);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: all var(--transition) var(--bezier-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

/* Google Scholar 链接 */
.scholar-link {
    text-align: center;
    margin-bottom: 60px;
}

.scholar-buttons {
    display: flex;
    gap: var(--space);
    justify-content: center;
    flex-wrap: wrap;
}

.scholar-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition) var(--bezier-smooth);
    position: relative;
    overflow: hidden;
}

.scholar-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

.scholar-btn i:last-child {
    margin-left: var(--space-xs);
    font-size: 0.9rem;
}

.refresh-data-btn {
    background: var(--surface);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition) var(--bezier-smooth);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.refresh-data-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.refresh-data-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow);
}

.refresh-data-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 旋转动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 论文列表 */
.publications-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
}

.publications-subtitle::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--space-xl);
    margin-bottom: 60px;
}

.publication-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition) var(--bezier-smooth);
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.publication-card:hover::before {
    transform: scaleX(1);
}

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

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space);
    margin-bottom: var(--space);
}

.publication-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    margin: 0;
}

.publication-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.citation-count {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--background-alt);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.citation-count i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.count-number {
    font-weight: 600;
    color: var(--primary-color);
}

.publication-year {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.publication-authors {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space);
    line-height: 1.5;
}

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

.publication-venue {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: var(--space);
}

.publication-venue i {
    color: var(--accent-color);
    font-size: 0.8rem;
}

.publication-abstract {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-links {
    display: flex;
    gap: var(--space);
    flex-wrap: wrap;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    background: var(--background-alt);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    border: 1px solid var(--border-color);
}

.publication-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.publication-link i {
    font-size: 0.8rem;
}

/* 更多论文链接 */
.more-publications {
    text-align: center;
    padding: var(--space-xl);
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-color);
}

.more-publications-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .publications-grid {
        grid-template-columns: 1fr;
    }
    
    .academic-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .publication-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .publication-metrics {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .publications {
        padding: 80px 0;
    }
    
    .academic-stats {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .stat-card {
        padding: var(--space-lg);
    }
    
    .publications-grid {
        gap: var(--space-lg);
    }
    
    .publication-card {
        padding: var(--space-lg);
    }
    
    .publication-title {
        font-size: 1.1rem;
    }
    
    .scholar-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .publications .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .publication-links {
        justify-content: center;
    }
}

/* 马赛克保护样式 */
.mosaic-text {
    color: var(--text-muted);
    position: relative;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.protected-content {
    background: linear-gradient(45deg, rgba(100, 116, 139, 0.1) 25%, transparent 25%), 
                linear-gradient(-45deg, rgba(100, 116, 139, 0.1) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, rgba(100, 116, 139, 0.1) 75%), 
                linear-gradient(-45deg, transparent 75%, rgba(100, 116, 139, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: var(--radius);
    padding: var(--space);
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
}

.protected-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(100, 116, 139, 0.05),
        rgba(100, 116, 139, 0.05) 10px,
        rgba(148, 163, 184, 0.05) 10px,
        rgba(148, 163, 184, 0.05) 20px
    );
    pointer-events: none;
}

.protected-details {
    animation: fadeIn 0.5s ease-in;
}

.unlock-btn {
    margin-top: var(--space);
    padding: var(--space-sm) var(--space);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.unlock-btn.unlocked {
    background: var(--gradient-cool);
    cursor: not-allowed;
    opacity: 0.8;
}

.unlock-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}


/* 密码模态框样式 */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.password-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-soft);
}

.password-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space);
    right: var(--space);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--background-soft);
    color: var(--text-primary);
}

.modal-header {
    padding: var(--space-xl) var(--space-xl) var(--space);
    text-align: center;
}

.modal-header h3 {
    margin: 0 0 var(--space) 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-header p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body {
    padding: 0 var(--space-xl) var(--space-xl);
}

.input-group {
    margin-bottom: var(--space);
}

.input-group label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: var(--space) var(--space);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--background-soft);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.input-group input.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: var(--space-sm);
    min-height: 1.25rem;
}

.modal-actions {
    text-align: center;
    margin-bottom: var(--space);
}

.modal-actions .btn {
    min-width: 120px;
}

.password-hint {
    text-align: center;
    padding: var(--space);
    background: var(--background-soft);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent-color);
}

.password-hint small {
    color: var(--text-muted);
    font-style: italic;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--space) var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
    font-weight: 500;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #22c55e;
    color: white;
}

.notification-error {
    background: #ef4444;
    color: white;
}

.notification-info {
    background: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: var(--space);
    }
    
    .modal-header,
    .modal-body {
        padding-left: var(--space);
        padding-right: var(--space);
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}