/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #2d3436;
    background-color: #fafbfc;
}

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

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    background-color: rgba(250, 251, 252, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #06a77d;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #06a77d;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #06a77d;
    transition: width 0.3s ease;
}

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

/* 响应式菜单 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .logo a {
        font-size: 1.2rem;
    }
}

/* Hero 部分 */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fafbfc 0%, #e8f5f1 100%);
    text-align: center;
    padding: 2rem 0;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-block;
}

.btn-primary {
    background-color: #06a77d;
    color: #fff;
}

.btn-primary:hover {
    background-color: #048560;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 167, 125, 0.3);
}

.btn-secondary {
    background-color: #fff;
    color: #06a77d;
    border: 2px solid #06a77d;
}

.btn-secondary:hover {
    background-color: #f0f6ff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* 通用部分标题 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #000;
}

/* 关于部分 */
.about {
    padding: 4rem 0;
    background-color: #fafbfc;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.skills {
    margin-top: 2rem;
}

.skills h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background-color: #e8f5f1;
    color: #06a77d;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 博客部分 */
.blog {
    padding: 4rem 0;
}

.writing {
    padding: 4rem 0;
}

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

.blog-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: #06a77d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.blog-card-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.blog-card h3 {
    font-size: 1.3rem;
    color: #000;
    margin: 0;
    flex: 1;
}

.blog-date {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

.blog-excerpt {
    color: #666;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    color: #06a77d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #048560;
}

/* 生活部分 */
.life {
    padding: 4rem 0;
    background-color: #fafbfc;
}

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

.life-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.life-card:hover {
    border-color: #06a77d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.life-card h3 {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 1rem;
}

.life-excerpt {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.projects {
    padding: 4rem 0;
    background-color: #fafbfc;
}

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

.project-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: #06a77d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.project-card h3 {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 1rem;
}

.project-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-link {
    color: #06a77d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #048560;
}

/* 联系部分 */
.contact {
    padding: 4rem 0;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
    padding: 1rem;
}

.contact-icon {
    font-size: 2rem;
    display: block;
}

.contact-link span:last-child {
    font-weight: 600;
}

.contact-link:hover {
    color: #06a77d;
    transform: translateY(-4px);
}

/* 页脚 */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
}

.footer-note {
    font-size: 0.9rem;
    color: #aaa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .blog-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        gap: 1rem;
    }
    
    .about,
    .blog,
    .projects,
    .contact {
        padding: 2rem 0;
    }
}

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

.blog-card,
.project-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
