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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 深色模式 */
body.dark-mode {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-mode .about,
body.dark-mode .projects {
    background-color: #1e1e1e;
}

body.dark-mode .skills,
body.dark-mode .contact {
    background-color: #252525;
}

body.dark-mode .skill-card {
    background-color: #2d2d2d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .project-card:hover {
    background-color: #333;
}

body.dark-mode h2 {
    color: #f5f5f5;
}

body.dark-mode .skill-card h3,
body.dark-mode .project-card h3 {
    color: #667eea;
}

body.dark-mode .about p,
body.dark-mode .skill-card p,
body.dark-mode .project-card p,
body.dark-mode .contact p {
    color: #ccc;
}

body.dark-mode .footer {
    background-color: #1a1a1a;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .navbar {
    background-color: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode .navbar.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

body.dark-mode .navbar-logo {
    color: #8a9eff;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

body.dark-mode .navbar-link {
    color: #f5f5f5;
}

.navbar-link:hover {
    color: #667eea;
}

body.dark-mode .navbar-link:hover {
    color: #8a9eff;
}

.theme-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
    border-radius: 50%;
}

body.dark-mode .theme-toggle {
    color: #f5f5f5;
}

.theme-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

body.dark-mode .theme-toggle:hover {
    background-color: rgba(138, 158, 255, 0.2);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

body.dark-mode .navbar-toggle {
    color: #f5f5f5;
}

/* 滚动按钮 */
.btn-scroll {
    display: inline-block;
    margin-top: 40px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
}

.btn-scroll:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

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

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.name {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 80px 0;
}

.about,
.projects {
    background-color: white;
}

.skills,
.contact {
    background-color: #f9f9f9;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: #333;
}

/* About Section */
.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #666;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.project-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
}

.project-card:hover {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.skill-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #667eea;
}

.skill-card p {
    color: #666;
    line-height: 1.6;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.project-card:hover {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.project-card p {
    color: #666;
    line-height: 1.6;
}

/* Contact Section */
.contact p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    color: #666;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 80px 0;
    }
    
    .name {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-link {
        width: 200px;
        text-align: center;
    }
    
    /* 响应式导航栏 */
    .navbar-toggle {
        display: block;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    body.dark-mode .navbar-menu {
        background-color: #1e1e1e;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .skill-card,
    .project-card {
        padding: 20px;
    }
}