:root {
    --nav-height: 70px;
    --primary-color: #4f46e5;
    --accent-color: #818cf8;
    --text-color: #333;
    --text-secondary: #666;
    --bg-color: #fff;
    --bg-secondary: #f8f9fa;
    --bg-hover: rgba(79, 70, 229, 0.1);
    --border-color: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-theme {
    --primary-color: #60a5fa;
    --accent-color: #3b82f6;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --bg-primary: #1a1f2e;
    --bg-secondary: #242b3d;
    --bg-card: #242b3d;
    --bg-card-hover: #2d3548;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: rgba(45, 45, 45, 0.8);
    --nav-bg: rgba(26, 26, 26, 0.9);
    --skill-item-bg: rgba(45, 45, 45, 0.8);
    --skill-item-border: rgba(255, 255, 255, 0.1);
    --skill-item-shadow: rgba(0, 0, 0, 0.2);
    --skill-item-hover-shadow: rgba(0, 0, 0, 0.3);
    --skill-item-hover-border: rgba(255, 255, 255, 0.2);
    --gradient-start: #1a1f2e;
    --gradient-end: #242b3d;
    --card-gradient: linear-gradient(135deg, rgba(36,43,61,0.9), rgba(26,31,46,0.7));
    --hover-gradient: linear-gradient(135deg, rgba(79,70,229,0.15), rgba(129,140,248,0.05));
    --project-card-bg: linear-gradient(135deg, rgba(36,43,61,0.95), rgba(26,31,46,0.85));
    --project-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(
        135deg,
        var(--bg-gradient-start) 0%,
        var(--bg-gradient-mid) 50%,
        var(--bg-gradient-end) 100%
    );
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.navbar .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 左侧区域 */
.nav-left {
    display: flex;
    align-items: center;
    min-width: 120px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

/* 中间区域 */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* 右侧区域 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-right: 1rem;
}

/* 语言切换按钮容器 */
.lang-switch {
    margin-right: 0.5rem;
}

/* 主题切换按钮包装器 */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端专用元素默认隐藏 */
.mobile-only {
    display: none;
}

/* 移动端样式 */
@media screen and (max-width: 768px) {
    .navbar .container {
        padding: 0 1rem;
    }

    .nav-center {
        display: none;
    }

    .nav-right {
        padding-right: 0;
    }

    /* 显示移动端专用元素 */
    .mobile-only {
        display: block;
    }

    .mobile-menu-toggle {
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 8px;
        margin-left: 0.5rem;
    }

    /* 移动端导航菜单 */
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-primary);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        visibility: hidden;
        opacity: 0;
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
}

/* 小屏幕额外调整 */
@media screen and (max-width: 480px) {
    .nav-right {
        gap: 0.75rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .lang-switch {
        transform: scale(0.9);
    }
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

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

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Moon Icon (Default) */
.theme-toggle i.fa-moon {
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.theme-toggle:hover i.fa-moon {
    transform: rotate(15deg) scale(1.1);
    color: var(--primary-color);
}

/* Sun Icon (Dark Mode) */
.theme-toggle i.fa-sun {
    font-size: 1.2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.theme-toggle:hover i.fa-sun {
    animation: sun-shine 1s ease-in-out infinite;
    color: #ffd700;
}

/* Sun Animation */
@keyframes sun-shine {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.4),
                    0 0 40px rgba(255, 215, 0, 0.2);
    }
    50% {
        transform: scale(1.1) rotate(15deg);
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.6),
                    0 0 60px rgba(255, 215, 0, 0.3);
    }
}

/* Button Background Effects */
.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    z-index: -1;
}

.theme-toggle:hover::before {
    background: var(--bg-card-hover);
}

/* Dark Theme Specific */
body.dark-theme .theme-toggle::before {
    background: var(--bg-card);
}

body.dark-theme .theme-toggle:hover::before {
    background: var(--bg-card-hover);
}

/* Button Press Effect */
.theme-toggle:active {
    transform: scale(0.95);
}

/* Button Border Glow */
.theme-toggle::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: linear-gradient(45deg,
        var(--primary-color),
        var(--accent-color)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover::after {
    opacity: 0.2;
}

/* Language Switch */
.switch-container {
    position: relative;
    width: 80px;
    height: 38px;
}

.lang-toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-gradient);
    border-radius: 38px;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
}

.switch-label:before {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 4px;
    bottom: 2px;
    background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.switch-en,
.switch-zh {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-toggle:not(:checked) ~ .switch-label .switch-en,
.lang-toggle:checked ~ .switch-label .switch-zh {
    color: var(--text-primary);
    font-weight: 600;
    text-shadow: 0 0 10px var(--primary-color);
}

.lang-toggle:checked + .switch-label:before {
    transform: translateX(42px);
}

.switch-label:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}

body.dark-theme .switch-label {
    background: var(--card-gradient);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .switch-label:before {
    background: linear-gradient(145deg, var(--accent-color), var(--primary-color));
}

body.dark-theme .switch-en,
body.dark-theme .switch-zh {
    color: var(--text-secondary);
}

body.dark-theme .lang-toggle:not(:checked) ~ .switch-label .switch-en,
body.dark-theme .lang-toggle:checked ~ .switch-label .switch-zh {
    color: #ffffff;
    text-shadow: 0 0 10px var(--accent-color);
}

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

.switch-label:before {
    animation: glow 2s infinite;
}

/* Buttons */
.cta-buttons {
    display: flex;
    justify-content: flex-start;
    margin-top: 2.5rem;
    width: 100%;
    max-width: 400px;
    margin-bottom: -10px;
}

.contact-btn {
    width: 100%;
    padding: 1.2rem 2.5rem;
    font-size: 1.25rem;
    border-radius: 35px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--accent-color)
    );
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0)
    );
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.4);
}

.contact-btn:hover::before {
    transform: translateX(100%);
}

/* 暗色主题适配 */
body.dark-theme .contact-btn {
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}

body.dark-theme .contact-btn:hover {
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.5);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-btn {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height) - 20px);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--bg-secondary) 0%,
        var(--bg-primary) 50%,
        var(--bg-secondary) 100%
    );
    opacity: 0.5;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    margin-top: -40px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-color),
        var(--primary-color)
    );
    background-size: 200% auto;
    animation: gradientText 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
}

.hero-role {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 1.5rem 0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hero-description {
    margin: 2rem 0;
}

.hero-description p {
    margin: 1rem 0;
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    letter-spacing: 0.02em;
}

/* Hero Image */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-container {
    position: relative;
    width: 280px;
    height: 280px;
    perspective: 2000px;
    transform-style: preserve-3d;
    cursor: pointer;
    animation: float 4s ease-in-out infinite;
    will-change: transform;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.hero-image-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--accent-color),
        var(--primary-color)
    );
    border-radius: 22px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-image-container::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    border-radius: 21px;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-image-container:hover::before {
    opacity: 0.8;
    filter: blur(12px);
}

.hero-image-container:hover::after {
    opacity: 1;
}

/* Dark Theme Specific */
body.dark-theme .hero-image-container::before {
    background: linear-gradient(
        45deg,
        var(--accent-color),
        var(--primary-color),
        var(--accent-color)
    );
    opacity: 0.3;
    filter: blur(12px);
}

body.dark-theme .hero-image-container:hover::before {
    opacity: 0.6;
    filter: blur(16px);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Skills Section */
.skills-section {
    padding: 4rem 2rem 8rem;
    background: linear-gradient(135deg, 
        var(--gradient-start) 0%, 
        var(--gradient-end) 50%, 
        var(--gradient-start) 100%
    );
    position: relative;
    overflow: hidden;
}

/* 增强背景装饰效果 */
.skills-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        var(--primary-color) 0%,
        transparent 70%
    );
    opacity: 0.03;  /* 降低不透明度 */
    animation: rotate 40s linear infinite;  /* 减慢旋转速度 */
}

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

.section-container {
    background: var(--section-bg);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    animation: fadeInUp 0.8s ease-out;
}

/* 优化标题样式 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 1rem;
}

/* 移除原有模式 */
.section-title::after {
    display: none;
}

/* 添加新的装饰效果 */
.section-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-color) 50%,
        transparent 100%
    );
}

/* 暗色主题适配 */
body.dark-theme .section-title {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

body.dark-theme .section-title::before {
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-color) 50%,
        transparent 100%
    );
}

/* 添加悬停效果 */
.section-title:hover::before {
    animation: gradientShift 2s linear infinite;
}

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

/* ���应式调整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));  /* 增加最小宽度 */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.skill-category {
    background: var(--card-gradient);
    border-radius: var(--card-border-radius);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition-slow);
}

.skill-category h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

.skill-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.85)
    );
    border: 1px solid rgba(79, 70, 229, 0.1);
    border-radius: var(--card-border-radius);
    box-shadow: 
        0 4px 20px -5px rgba(79, 70, 229, 0.15),
        0 0 15px rgba(79, 70, 229, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.7)
    );
    border-radius: 12px;
    padding: 10px;
    box-shadow: 
        0 4px 12px rgba(79, 70, 229, 0.1),
        0 0 0 1px rgba(79, 70, 229, 0.05);
    transition: var(--transition-fast);
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-info {
    flex: 1;
}

.skill-info span {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 增强悬停效果 */
.skill-item:hover {
    transform: translateY(-5px);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.98),
        rgba(255, 255, 255, 0.9)
    );
    box-shadow: 
        0 15px 30px -10px rgba(79, 70, 229, 0.2),
        0 0 20px rgba(79, 70, 229, 0.1);
}

.skill-item:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 6px 12px rgba(79, 70, 229, 0.15),
        0 0 0 2px rgba(79, 70, 229, 0.1);
}

/* 暗色主题适配 */
body.dark-theme .skill-item {
    background: var(--card-gradient);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-theme .skill-icon {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .skill-item {
        padding: 1.8rem;
    }
    
    .skill-icon {
        width: 55px;
        height: 55px;
        padding: 12px;
    }
    
    .skill-info span {
        font-size: 1.3rem;
    }
    
    .skill-description {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Dark Theme Specific Styles */
body.dark-theme {
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 50%,
        var(--bg-primary) 100%
    );
}

body.dark-theme .navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

body.dark-theme .theme-toggle {
    color: var(--text-primary);
}

body.dark-theme .theme-toggle:hover {
    color: var(--primary-color);
}

body.dark-theme .hero::before {
    opacity: 0.3;
}

body.dark-theme .hero-image-container img {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-theme .skill-category {
    background: var(--card-gradient);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        padding: 0.5rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

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

    .hero-image-container {
        width: 240px;
        height: 240px;
    }

    .cta-buttons {
        justify-content: center;
    }

    .skill-items {
        grid-template-columns: 1fr;
    }

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

    .project-card:hover, .skill-item:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .social-links > div:hover {
        transform: translateY(-3px) scale(1.05);
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.25rem;
    }

    .switch-container {
        width: 60px;
    }

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

    .hero-role {
        font-size: 1.3rem;
    }

    .hero-description p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-image-container {
        width: 200px;
        height: 200px;
    }

    .btn {
        padding: 0.5rem 1rem;
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 2.5rem;
    margin-top: 1.5rem;
    justify-content: flex-start;
    width: 100%;
    max-width: 400px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.social-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

/* 移除GitHub链接的下划线 */
.github-container a {
    text-decoration: none;
}

/* 图标容器样式 */
.email-container,
.github-container a,
.gitee-container a,
.wechat-container {
    width: 53px;
    height: 53px;
    transform: translateY(-3px);
    background: var(--card-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
}

/* 图标本身的样式 */
.social-icon {
    font-size: 26.6px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* 悬停效果 */
.email-container:hover,
.github-container a:hover,
.gitee-container a:hover,
.wechat-container:hover {
    transform: translateY(-5px) scale(1.1);
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%
    );
    border-color: transparent;
}

/* 图标悬停效果 */
.email-container:hover .social-icon,
.github-container a:hover .social-icon,
.gitee-container a:hover .gitee-icon,
.wechat-container:hover .social-icon {
    color: #fff;
    transform: scale(1.1);
}

/* 工具提示框样式 */
.email-tooltip,
.github-tooltip,
.gitee-tooltip,
.wechat-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

/* 工具提示框底部渐变效果 */
.email-tooltip::after,
.github-tooltip::after,
.gitee-tooltip::after,
.wechat-tooltip::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-color)
    );
    border-radius: 0 0 8px 8px;
    opacity: 0.8;
}

/* 工具提示框箭头 */
.email-tooltip::before,
.github-tooltip::before,
.gitee-tooltip::before,
.wechat-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent var(--border-color) transparent;
}

/* 悬停效果 */
.email-container:hover .email-tooltip,
.github-container:hover .github-tooltip,
.gitee-container:hover .gitee-tooltip,
.wechat-container:hover .wechat-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

/* Dark Theme Specific */
body.dark-theme .back-to-top {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 35px;
        height: 35px;
    }
    
    .back-to-top i {
        font-size: 1rem;
    }
}

/* Light Mode Section Backgrounds */
.hero {
    background: linear-gradient(135deg, #e5eaf2 0%, #f0f4f8 50%, #e5eaf2 100%);
}

.skills-section {
    background: linear-gradient(135deg, #f0f4f8 0%, #e5eaf2 50%, #f0f4f8 100%);
    border-top: 1px solid var(--border-color);
}

/* Shooting Stars */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}

.shooting-star {
    --star-angle: -35deg;
    position: absolute;
    width: 180px;
    height: 2.5px;
    opacity: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.8) 15%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.2) 70%,
        transparent 100%
    );
    filter: blur(0.6px);
    animation: shooting-star 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform-origin: left;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 140px;
    height: 1.5px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(255, 255, 255, 0.05) 60%,
        transparent 100%
    );
    filter: blur(1px);
}

@keyframes shooting-star {
    0% {
        transform: rotate(var(--star-angle)) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: rotate(var(--star-angle)) translateX(-200vw);
        opacity: 0;
    }
}

/* Galaxy Background */
.galaxy-background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(26, 31, 46, 0.8) 0%, 
        rgba(26, 31, 46, 0.95) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(3px 3px at 160px 120px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.6;
}

.stars:nth-child(1) {
    background-position: 50% 50%;
    animation-delay: 0s;
}

.stars:nth-child(2) {
    background-position: 20% 60%;
    animation-delay: 1s;
}

.stars:nth-child(3) {
    background-position: -20% 30%;
    animation-delay: 2s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

/* Dark Theme Specific */
body.dark-theme .galaxy-background {
    display: block;
}

body.dark-theme .shooting-stars {
    opacity: 1;
}

body.dark-theme .hero {
    background: transparent;
}

body.dark-theme .skills-section {
    background: linear-gradient(
        to bottom,
        var(--bg-primary) 0%,
        var(--bg-secondary) 100%
    );
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shooting-star {
        width: 60px;
    }
}

/* Rest of your existing CSS... */

/* 为中文内容特别优化 */
[lang="zh"] .hero-text h1 {
    letter-spacing: 0.1em;
}

[lang="zh"] .hero-description p {
    letter-spacing: 0.05em;
}

[lang="zh"] .hero-role {
    letter-spacing: 0.08em;
}

/* Projects Section */
.projects-section {
    padding: 8rem 2rem;
    background: linear-gradient(135deg,
        var(--gradient-end) 0%,
        var(--gradient-start) 50%,
        var(--gradient-end) 100%
    );
    position: relative;
    overflow: hidden;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    width: 100%;
    background: var(--card-gradient);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        transparent 50%,
        var(--accent-color)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.project-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.project-title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 8px;
    position: relative;
    background: transparent;
}

.project-title-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(79, 70, 229, 0.1),
        rgba(129, 140, 248, 0.1)
    );
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-title-link::after {
    display: none;
}

.project-title-link:hover {
    color: var(--primary-color);
    transform: none;
}

.project-title-link:hover::before {
    opacity: 1;
}

.project-title-link i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.project-title-link:hover i {
    transform: rotate(-12deg) scale(1.1);
}

.project-title-link span {
    position: relative;
    z-index: 1;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.project-link i {
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover {
    color: var(--primary-color);
    background: var(--bg-card-hover);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.2);
}

.project-link:hover i {
    transform: scale(1.1);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-item i {
    color: var(--primary-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tag {
    background: linear-gradient(
        135deg,
        rgba(var(--tag-color-start), 0.1),
        rgba(var(--tag-color-end), 0.2)
    );
    border: 1px solid rgba(var(--tag-color-start), 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgb(var(--tag-color-text));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* 为不同技能设置不同的颜色 */
.tech-tag[data-tech="Python"] {
    --tag-color-start: 55, 118, 171;
    --tag-color-end: 65, 128, 181;
    --tag-color-text: 55, 118, 171;
}

.tech-tag[data-tech="Pandas"] {
    --tag-color-start: 150, 75, 0;
    --tag-color-end: 170, 85, 10;
    --tag-color-text: 150, 75, 0;
}

.tech-tag[data-tech="NumPy"] {
    --tag-color-start: 0, 128, 128;
    --tag-color-end: 0, 148, 148;
    --tag-color-text: 0, 128, 128;
}

.tech-tag[data-tech="Scikit-learn"] {
    --tag-color-start: 243, 156, 18;
    --tag-color-end: 253, 166, 28;
    --tag-color-text: 243, 156, 18;
}

.tech-tag[data-tech="Spring Cloud"] {
    --tag-color-start: 104, 160, 99;
    --tag-color-end: 114, 170, 109;
    --tag-color-text: 104, 160, 99;
}

.tech-tag[data-tech="MySQL"] {
    --tag-color-start: 0, 116, 162;
    --tag-color-end: 0, 126, 172;
    --tag-color-text: 0, 116, 162;
}

.tech-tag[data-tech="Redis"] {
    --tag-color-start: 220, 20, 60;
    --tag-color-end: 230, 30, 70;
    --tag-color-text: 220, 20, 60;
}

.tech-tag[data-tech="Kafka"] {
    --tag-color-start: 51, 51, 51;
    --tag-color-end: 71, 71, 71;
    --tag-color-text: 51, 51, 51;
    background: linear-gradient(
        135deg,
        rgba(51, 51, 51, 0.15),
        rgba(71, 71, 71, 0.25)
    );
    border-color: rgba(51, 51, 51, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tech-tag[data-tech="Docker"] {
    --tag-color-start: 0, 150, 220;
    --tag-color-end: 0, 160, 230;
    --tag-color-text: 0, 150, 220;
}

/* 悬停效果 */
.tech-tag:hover {
    transform: translateY(-2px);
    background: linear-gradient(
        135deg,
        rgba(var(--tag-color-start), 0.2),
        rgba(var(--tag-color-end), 0.3)
    );
    border-color: rgba(var(--tag-color-start), 0.3);
    box-shadow: 
        0 4px 12px rgba(var(--tag-color-start), 0.15),
        0 0 0 2px rgba(var(--tag-color-start), 0.05);
}

/* 添加光效果 */
.tech-tag::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: 0.5s;
}

.tech-tag:hover::before {
    left: 100%;
}

/* 暗色主题适配 */
body.dark-theme .tech-tag {
    background: linear-gradient(
        135deg,
        rgba(var(--tag-color-start), 0.15),
        rgba(var(--tag-color-end), 0.25)
    );
    border-color: rgba(var(--tag-color-start), 0.3);
    color: rgba(var(--tag-color-text), 0.9);
}

body.dark-theme .tech-tag:hover {
    background: linear-gradient(
        135deg,
        rgba(var(--tag-color-start), 0.25),
        rgba(var(--tag-color-end), 0.35)
    );
    border-color: rgba(var(--tag-color-start), 0.4);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(var(--tag-color-start), 0.1);
}

/* 项目卡片入场动画 */
.projects-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.projects-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .project-card {
        padding: 1.5rem;
    }

    .project-title-link {
        font-size: 1.2rem;
    }

    .project-link {
        width: 38px;
        height: 38px;
    }

    .project-link i {
        font-size: 1.2rem;
    }
}

/* 欢迎框基础样式 */
.welcome-box {
    position: fixed;
    top: calc(var(--nav-height) + 20px);
    right: 20px;
    min-width: 200px;
    width: max-content;
    max-width: 400px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.9)
    );
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateX(-120%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    overflow: hidden; /* 确保进度条不会溢出 */
}

/* 欢迎框内容样式 */
.welcome-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 欢迎框图标 */
.welcome-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* 进度条 */
.welcome-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-color)
    );
    transform-origin: left;
    transform: scaleX(1);
    border-radius: 0 0 12px 12px;
}

/* 显示状态 */
.welcome-box.show {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

/* 进度条动画 */
.welcome-box.show::after {
    animation: welcome-progress 8s linear forwards;
}

@keyframes welcome-progress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* 修改 Gitee 图标样式 */
.gitee-container i {
    font-size: 1.8rem;
    color: white;
    transition: all 0.3s ease;
}

/* 如果使用 iconfont 的图标不清晰，可以使用以下备选方案 */
.gitee-container i::before {
    content: 'G';
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: bold;
}

.gitee-icon {
    width: 1.8rem;
    height: 1.8rem;
    fill: currentColor;
    color: white;
    transition: all 0.3s ease;
}

/* 项目卡片基础样式 */
.project-card {
    width: 100%;
    background: var(--card-gradient);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 项目卡片悬停效果 */
.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--card-hover-shadow);
}

/* 暗色主题项目卡片样式 */
body.dark-theme .project-card {
    background: var(--project-card-bg, linear-gradient(
        135deg,
        rgba(36, 43, 61, 0.95),
        rgba(26, 31, 46, 0.85)
    );
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--project-shadow, 0 8px 32px rgba(0, 0, 0, 0.2));
}

/* 暗色主题项目卡片悬停效果 */
body.dark-theme .project-card:hover {
    background: linear-gradient(
        135deg,
        rgba(36, 43, 61, 0.98),
        rgba(26, 31, 46, 0.9)
    );
    border-color: rgba(var(--primary-color-rgb), 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(var(--primary-color-rgb), 0.2);
}

/* 暗色主题项目描述��字颜色 */
body.dark-theme .project-description {
    color: rgba(255, 255, 255, 0.7);
}

/* 暗色主题特性项样式 */
body.dark-theme .feature-item {
    color: rgba(255, 255, 255, 0.7);
}

/* 暗色主题特性项悬停效果 */
body.dark-theme .feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 暗色主题项目链接样式 */
body.dark-theme .project-link {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

/* 暗色主题项目链接悬停效果 */
body.dark-theme .project-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

/* 暗色主题项目标题链接样式 */
body.dark-theme .project-title-link {
    color: rgba(255, 255, 255, 0.9);
}

/* 暗色主题项目标题链接悬停效果 */
body.dark-theme .project-title-link:hover {
    color: var(--primary-color);
}

/* 暗色主题项目标题链接背景效果 */
body.dark-theme .project-title-link::before {
    background: linear-gradient(
        135deg,
        rgba(var(--primary-color-rgb), 0.15),
        rgba(var(--accent-color-rgb), 0.15)
    );
}

/* 暗色主题项目部分背景 */
body.dark-theme .projects-section {
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 100%
    );
}

/* 暗色主题项目容器背景 */
body.dark-theme .section-container {
    background: rgba(26, 31, 46, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 修改 Kafka 的颜色配置 */
.tech-tag[data-tech="Kafka"] {
    --tag-color-start: 51, 51, 51;
    --tag-color-end: 71, 71, 71;
    --tag-color-text: 51, 51, 51;
    background: linear-gradient(
        135deg,
        rgba(51, 51, 51, 0.15),
        rgba(71, 71, 71, 0.25)
    );
    border-color: rgba(51, 51, 51, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Kafka 标签的日间模式悬停效果 */
.tech-tag[data-tech="Kafka"]:hover {
    background: linear-gradient(
        135deg,
        rgba(51, 51, 51, 0.2),
        rgba(71, 71, 71, 0.3)
    );
    border-color: rgba(51, 51, 51, 0.4);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(51, 51, 51, 0.1);
}

/* Kafka 标签的暗色主题样式 */
body.dark-theme .tech-tag[data-tech="Kafka"] {
    --tag-color-start: 200, 200, 200;
    --tag-color-end: 180, 180, 180;
    --tag-color-text: 220, 220, 220;
    background: linear-gradient(
        135deg,
        rgba(180, 180, 180, 0.15),
        rgba(200, 200, 200, 0.25)
    );
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Kafka 标签的暗色主题悬停效果 */
body.dark-theme .tech-tag[data-tech="Kafka"]:hover {
    background: linear-gradient(
        135deg,
        rgba(180, 180, 180, 0.25),
        rgba(200, 200, 200, 0.35)
    );
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* 资源部分样式 */
.resources-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.resources-content {
    display: grid;
    gap: 2rem;
    padding: 2rem;
}

.resource-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.resource-subtitle {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-list {
    list-style-type: none;
    padding-left: 1rem;
}

.skill-list li {
    margin: 0.8rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.skill-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.process-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.process-basic, .process-advanced {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

@media (max-width: 768px) {
    .process-container {
        grid-template-columns: 1fr;
    }
}

/* 资源页面样式 */
.resources-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-color);  /* 使用主背景色 */
    color: var(--text-color);  /* 使用主文本色 */
}

/* 标题样式 */
.resources-page .section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.resources-page .section-subtitle {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.resources-page h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
}

/* 列表样式 */
.resources-page .link-list,
.resources-page .skill-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.resources-page .link-list li {
    margin: 0.8rem 0;
}

.resources-page .link-list a {
    display: inline-flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.resources-page .link-list a:hover {
    color: var(--accent-color);
}

.resources-page .link-list i {
    margin-right: 0.8rem;
    width: 1.2em;
    text-align: center;
}

/* 有序���表样��� */
.resources-page ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.resources-page ol li {
    margin: 0.5rem 0;
    color: var(--text-color);
}

/* 技能列表样式 */
.resources-page .skill-list li {
    margin: 0.8rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.resources-page .skill-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* 确保背景和文字对比度 */
.galaxy-background {
    opacity: 0.3; /* 降低星空背景的不透明度 */
}

/* 确保主内容区域完全不透明 */
main.resources-page {
    position: relative;
    z-index: 1;
    background-color: var(--bg-color);
}

/* 激活状态的导航链接样式 */
.nav-links a.active {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav-links a.active::after {
    width: 100%;
}

/* 学习资源链接样式 */
.learning-resources {
    margin-top: 2rem;
}

.resource-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.link-category {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.link-category:hover {
    transform: translateY(-5px);
}

.link-category h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

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

.link-list li {
    margin: 0.8rem 0;
}

.link-list a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.link-list a:hover {
    color: var(--primary-color);
    background: var(--bg-primary);
    transform: translateX(5px);
}

.link-list i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* 暗色主题适配 */
body.dark-theme .link-category {
    background: var(--bg-card);
}

body.dark-theme .link-list a:hover {
    background: var(--bg-secondary);
}

/* 添加新的技术标签样式 */
.tech-tag[data-tech="PyPDF2"] {
    --tag-color-start: 255, 87, 34;
    --tag-color-end: 255, 97, 44;
    --tag-color-text: 255, 87, 34;
}

.tech-tag[data-tech="Pillow"] {
    --tag-color-start: 156, 39, 176;
    --tag-color-end: 166, 49, 186;
    --tag-color-text: 156, 39, 176;
}

/* 添加新的技术标签样式 */
.tech-tag[data-tech="Flask"] {
    --tag-color-start: 0, 0, 0;
    --tag-color-end: 20, 20, 20;
    --tag-color-text: 0, 0, 0;
}

.tech-tag[data-tech="WeApp"] {
    --tag-color-start: 7, 193, 96;
    --tag-color-end: 17, 203, 106;
    --tag-color-text: 7, 193, 96;
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* 暗色模式适配 */
body.dark-theme .welcome-box {
    background: linear-gradient(
        145deg,
        rgba(30, 30, 30, 0.95),
        rgba(20, 20, 20, 0.9)
    );
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 折叠按钮样式 */
.section-subtitle.collapsible {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.project-link.github-link .fa-github {
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    width: 42px; /* 初始宽度仅显示图标 */
}

/* GitHub链接悬停效果 */
.project-link.github-link:hover {
    background: var(--bg-card-hover);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.2);
}

.project-link.github-link:hover .fa-github {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* 微信图标样式 */
.project-link.wechat-container {
    background: transparent;
    cursor: default;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    color: var(--text-color);
}

.collapse-btn i {
    transition: transform 0.3s ease;
}

.collapse-btn[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

/* 内容区域样式 */
.content-section {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
    max-height: 2000px; /* 设置一个足够大的高度 */
}

.content-section.collapsed {
    max-height: 0;
}

/* 概念图片样式 */
.concept-image {
    max-width: 60%; /* 缩小图片尺寸 */
    height: auto;
    margin: 2rem auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
}

/* 暗色主题适配 */
body.dark-theme .concept-image {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    filter: brightness(0.9);
}

/* 添加图片容器用于3D效果 */
.concept-image-container {
    position: relative;
    width: 60%;
    margin: 2rem auto;
    perspective: 2000px;
    transform-style: preserve-3d;
}

/* 悬停效果 */
.concept-image:hover {
    transform: scale(1.02);
}

/* 修改主容器样式 */
.resources-page {
    display: flex;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 3rem;
    min-height: calc(100vh - var(--nav-height));
    position: relative;
    z-index: 1;
    background-color: var(--bg-color);
}

/* 左侧导航栏 */
.side-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: 280px;
    height: calc(100vh - var(--nav-height));
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 2;
    transition: all 0.3s ease;
}

.side-nav ul {
    list-style: none;
    padding: 2rem 0;
    margin: 0;
}

.side-nav li {
    margin: 0.5rem 0;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--primary-color);
    background: var(--bg-hover);
    border-left-color: var(--primary-color);
}

.side-nav i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem 3rem;
    max-width: calc(100% - 280px);
    min-height: calc(100vh - var(--nav-height));
    background: var(--bg-color);
}

/* 章节标题 */
.section-subtitle {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

/* 折叠按钮 */
.collapse-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    color: var(--text-color);
}

.collapse-btn i {
    transition: transform 0.3s ease;
}

.collapse-btn[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

/* 内容区块 */
.content-section {
    margin-bottom: 2rem;
    transition: all 0.3s ease-out;
    overflow: hidden;
}

.content-section.collapsed {
    max-height: 0;
    margin: 0;
    opacity: 0;
}

/* 列表样式 */
.content-section ul,
.content-section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-section li {
    margin: 0.8rem 0;
    line-height: 1.6;
    color: var(--text-color);
}

/* 引用块样式 */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
}

/* 概念图片 */
.concept-image-container {
    width: 60%;
    margin: 2rem auto;
}

.concept-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* 收缩状态下的主内容区域 */
.side-nav.collapsed ~ .main-content {
    margin-left: 40px;
    max-width: calc(100% - 40px);
}

/* 在resources页面隐藏语言切换按钮 */
.resources-body .lang-switch {
    display: none;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .resources-page {
        flex-direction: column;
    }

    .side-nav {
        position: fixed;
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }

    .side-nav ul {
        display: flex;
        justify-content: center;
        padding: 0.5rem;
    }

    .side-nav a {
        padding: 0.8rem;
    }

    .side-nav a span {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        max-width: 100%;
    }

    .concept-image-container {
        width: 90%;
    }
}