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

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

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

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

.nav-menu a:hover {
    color: #3498db;
}

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

.bar {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    background-color: #333;
    transition: 0.3s;
}

/* 首屏样式 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 10px;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

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

.btn-project {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
}

.btn-project:hover {
    background-color: #8e44ad;
}

/* 通用节样式 */
section {
    padding: 100px 0;
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* 技术博客样式 */
.blog-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-series-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    text-align: center;
    padding: 2rem;
}

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

.blog-series-card h3 {
    padding: 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.blog-series-card p {
    padding: 0 1rem 1rem;
    color: #7f8c8d;
}

.btn-blog {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
}

.btn-blog:hover {
    background-color: #27ae60;
}

/* 个人作品样式 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.work-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

.work-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.work-card h3 {
    padding: 1rem;
    color: #2c3e50;
}

.work-card p {
    padding: 0 1rem;
    margin-bottom: 1rem;
    color: #7f8c8d;
}

.btn-work {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
}

.btn-work:hover {
    background-color: #8e44ad;
}

/* 关于我样式 */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 技能专长样式 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.skill-category h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.skill-category li:last-child {
    border-bottom: none;
}

/* 工作经历样式 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #3498db;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: calc(50% - 40px);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: calc(50% + 40px);
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    top: 20px;
    left: calc(50% - 10px);
    z-index: 1;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    color: #7f8c8d;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

/* 项目作品样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 1rem;
    color: #2c3e50;
}

.project-card p {
    padding: 0 1rem;
    margin-bottom: 1rem;
    color: #7f8c8d;
}

/* 兴趣爱好样式 */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.interest-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.interest-item h3 {
    color: #9b59b6;
    margin-bottom: 1rem;
}

/* 联系方式样式 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: #3498db;
    text-decoration: none;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

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

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

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

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        margin: 5px 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

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

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .timeline-item {
        width: calc(100% - 70px);
        left: 70px !important;
    }

    .timeline-marker {
        left: 20px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        margin: 5px 0;
    }
}