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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* === 导航栏样式 === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #6cf 0%, #09c 100%);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(102, 204, 255, 0.95);
    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 a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 2px;
}

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

.nav-links li {
    margin: 0 1rem;          /* 兼容旧版浏览器的间距写法 */
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* === 容器样式 === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* === Hero 区域 === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6cf 0%, #09c 50%, #6cf 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.profile-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 60px 80px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid #09c;
    box-shadow: 0 10px 40px rgba(0, 153, 204, 0.3);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    object-fit: cover;  /* 保证圆形头像比例不变 */
}

.avatar:hover {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

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

.social-links a {
    margin: 0 0.75rem;       /* 兼容旧版浏览器的间距写法 */
}

.social-links img {
    width: 45px;
    height: 45px;
    padding: 8px;
    background: #f8f9fa;
    object-fit: contain;  /* 保证社交图标比例不变 */
    border-radius: 12px;
    transition: all 0.3s ease;
}

.social-links img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.scroll-indicator {
    margin-top: 50px;
}

.scroll-indicator a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

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

/* === 区域标题 === */
.section-title {
    text-align: center;
    font-size: 2rem;
    color: #09c;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #09c, transparent);
}

/* === About 区域 === */
.about {
    background: #fff;
}

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

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

.education {
    margin-top: 40px;
    text-align: left;
}

.education h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
}

.edu-card {
    background: #f8f9fa;
    padding: 20px 30px;
    border-radius: 12px;
    border-left: 4px solid #09c;
}

.edu-card h4 {
    color: #09c;
    margin-bottom: 5px;
}

.edu-card p {
    color: #666;
    font-size: 0.95rem;
}

/* === Skills 区域 === */
.skills {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-bottom: 40px;
    padding: 0 1rem;
}

.skill-card {
    margin: 1rem;             /* 兼容旧版浏览器的间距写法 */
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 153, 204, 0.15);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.skill-card h3 {
    color: #09c;
    margin-bottom: 10px;
}

.skill-card p {
    color: #666;
    font-size: 0.95rem;
}

.skill-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.tag {
    margin: 0.5rem;           /* 兼容旧版浏览器的间距写法 */
    background: linear-gradient(135deg, #e8f4fc 0%, #b8e4f8 100%);
    color: #09c;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.95rem;
    border: 1px solid #09c;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #09c 0%, #069 100%);
    color: #fff;
}

/* === Projects 区域 === */
.projects {
    background: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 0.75rem;
}

.project-card {
    margin: 0.75rem;           /* 兼容旧版浏览器的间距写法 */
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-top: 3px solid #09c;
    transition: all 0.3s ease;
}

.project-card:hover {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.project-card h3 a {
    color: #09c;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

.project-card h3 a:hover {
    text-decoration: underline;
}

.project-card p {
    color: #666;
    font-size: 0.9rem;
}

/* === Blog 区域 === */
.blog {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%);
}

.blog-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 40px;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0.75rem;
}

.blog-category {
    margin: 0.75rem;           /* 兼容旧版浏览器的间距写法 */
    background: #fff;
    padding: 25px 35px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.blog-category h3.category-title {
    color: #09c;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.category-icon {
    height: 1.5rem;
    width: auto;
    margin-right: 0.5rem;      /* 兼容旧版浏览器的间距写法 */
}

.blog-post {
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post h4 a {
    color: #09c;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
}

.blog-post h4 a:hover {
    text-decoration: underline;
}

.post-meta {
    color: #999;
    font-size: 0.8rem;
    margin: 8px 0;
}

.blog-post p {
    color: #666;
    font-size: 0.9rem;
}

.more-blog {
    text-align: center;
    padding-top: 30px;
    border-top: 1px dashed #ddd;
}

.more-blog a {
    color: #09c;
    text-decoration: none;
    font-weight: 500;
}

.more-blog a:hover {
    text-decoration: underline;
}

/* === Contact 区域 === */
.contact {
    background: #fff;
}

.contact-intro {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-card {
    margin: 1rem;              /* 兼容旧版浏览器的间距写法 */
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%);
    padding: 25px 40px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    border: 1px solid #b8e4f8;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 153, 204, 0.15);
}

.contact-icon {
    margin-right: 1rem;
}

.contact-icon img {
    height: 1.8rem;
    vertical-align: middle;
}

.contact-label {
    font-weight: bold;
    color: #09c;
    min-width: 50px;
    font-size: 1rem;
}

.contact-value {
    color: #666;
    font-size: 1rem;
}

/* === Footer === */
footer {
    background: linear-gradient(135deg, #6cf 0%, #09c 100%);
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
}

footer p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

footer p:last-child {
    margin-bottom: 0;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(102, 204, 255, 0.98);
        width: 100%;
        text-align: center;
        padding: 20px 0;
        transition: left 0.3s ease;
        backdrop-filter: blur(10px);
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .profile-card {
        padding: 40px 20px;
        margin: 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }

    .social-links img {
        width: 40px;
        height: 40px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-cards {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        max-width: 300px;
    }

    .blog-categories {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}