/* ===== 全局设置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.7;
    background: #fff;
}

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

.section {
    padding: 80px 0;
}

.bg-light {
    background: #f8f9fa;
}

.section-title {
    font-size: 2em;
    text-align: center;
    margin-bottom: 15px;
    color: #1a1a2e;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.05em;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 8px 0;
}

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

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
    transition: color 0.3s;
}

.scrolled .logo {
    color: #1a1a2e;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95em;
    transition: color 0.3s;
    position: relative;
}

.scrolled .nav-links a {
    color: #555;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s;
}

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

.menu-toggle {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #fff;
}

.scrolled .menu-toggle {
    color: #1a1a2e;
}

/* ===== 首页 Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 0 20px;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 25px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.3em;
    opacity: 0.95;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.05em;
    opacity: 0.75;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #fff;
    color: #667eea;
    border-color: #fff;
    transform: translateY(-2px);
}

/* ===== 关于 ===== */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #555;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill-tag {
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.about-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 博客 ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 30px 25px;
    text-align: center;
}

.card-body h3 {
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.card-body p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 18px;
    line-height: 1.7;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
}

.read-more:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== 相册 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 联系 ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.contact-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.contact-label {
    font-weight: 600;
    color: #1a1a2e;
    min-width: 60px;
}

.contact-item span:last-child {
    color: #666;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }

    .hero-content h1 {
        font-size: 2.2em;
    }

    .tagline {
        font-size: 1.1em;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: #555 !important;
    }

    .about-content {
        flex-direction: column;
    }

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

    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
