/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #17b890;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.nav-menu a i {
    margin-right: 8px;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

/* 英雄区域 */
.hero {
    padding-top: 100px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    object-fit: cover;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 25px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 120px;
    fill: white;
}

/* 内容区域 */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark-color);
}

.section-title i {
    margin-right: 15px;
    color: var(--primary-color);
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 25px;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.article-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.article-category {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.article-title a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-footer i {
    margin-right: 5px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
}

.read-more i {
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

.text-center {
    text-align: center;
}

/* 技能标签 */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    width: 120px;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-item i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.skill-item:nth-child(1) i { color: #e34f26; } /* HTML5 */
.skill-item:nth-child(2) i { color: #1572b6; } /* CSS3 */
.skill-item:nth-child(3) i { color: #f7df1e; } /* JS */
.skill-item:nth-child(4) i { color: #42b883; } /* Vue */
.skill-item:nth-child(5) i { color: #61dafb; } /* React */
.skill-item:nth-child(6) i { color: #339933; } /* Node */
.skill-item:nth-child(7) i { color: #3776ab; } /* Python */
.skill-item:nth-child(8) i { color: #4479a1; } /* MySQL */
.skill-item:nth-child(9) i { color: #2496ed; } /* Docker */
.skill-item:nth-child(10) i { color: #f05032; } /* Git */

.skill-item span {
    font-weight: 600;
    color: var(--dark-color);
}

/* 关于我 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #aaa;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.beian {
    margin: 15px 0;
}

.beian a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.beian a:hover {
    color: var(--primary-color);
}

.footer-bottom i {
    color: #ff6b6b;
    margin: 0 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}