* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    overflow-y: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    color: #333;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0077ff;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: #0077ff;
}

nav a.active {
    color: #0077ff;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #0077ff;
    border-radius: 2px;
}

section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem;
    position: relative;
}

.section-content {
    max-width: 1200px;
    width: 100%;
}

#about {
    background-color: #f8f9fa;
}

#projects {
    background-color: #e9f0fe;
}

#contact {
    background-color: #f0f5ff;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #0077ff;
}

p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.profile-img {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Logo容器 - 无边框，用于放置logo和光晕 */
.logo-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 移除边框，只作为定位容器 */
    background-color: transparent;
    border-radius: 50%;
    overflow: visible; /* 让光晕可以超出容器 */
}

/* 蓝色光晕 - 从logo的蓝色边框开始向外散发 */
.logo-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(0, 119, 255, 0.5) 0%,
        rgba(0, 119, 255, 0.3) 30%,
        rgba(0, 119, 255, 0.1) 60%,
        transparent 90%
    );
    filter: blur(12px);
    z-index: 1;
    animation: gentle-glow 3s ease-in-out infinite alternate;
}

/* Logo的白色背景容器 - 添加白色背景 */
.logo-background {
    position: relative;
    width: 120px; /* 和logo-svg同样大小 */
    height: 120px;
    background-color: white; /* 改为白色背景 */
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 确保内容不溢出 */

}

/* Logo本身 - 直接显示在白色背景上 */
.logo-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: white;
    padding: 0;
    box-sizing: border-box;
    /* 增强SVG本身的蓝色边框效果 */
    filter: drop-shadow(0 0 5px rgba(0, 119, 255, 0.3));
}

/* 柔和光晕动画 */
@keyframes gentle-glow {
    0% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 响应式调整 */
@media (min-width: 640px) {
    .profile-img {
        width: 220px;
        height: 220px;
        padding: 25px;
    }

    .logo-container {
        width: 200px;
        height: 200px;
    }

    .logo-glow {
        filter: blur(14px);
    }

    .logo-background {
        width: 140px;
        height: 140px;
    }

    .logo-svg {
        filter: drop-shadow(0 0 8px rgba(0, 119, 255, 0.4));
    }
}

@media (min-width: 960px) {
    .profile-img {
        width: 240px;
        height: 240px;
        padding: 30px;
    }

    .logo-container {
        width: 220px;
        height: 220px;
    }

    .logo-glow {
        filter: blur(16px);
    }

    .logo-background {
        width: 160px;
        height: 160px;
    }

    .logo-svg {
        filter: drop-shadow(0 0 12px rgba(0, 119, 255, 0.5));
    }
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.skill-tag {
    background-color: #0077ff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-img {
    height: 200px;
    width: 100%;
    background-color: #ddd;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-tag {
    background-color: #e1efff;
    color: #0077ff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.contact-form {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    background-color: #0077ff;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0055cc;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0077ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: white;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s, opacity 0.3s;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    nav.active ul {
        transform: translateY(0);
        opacity: 1;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Blog Section Styles ===== */
/* ===== Blog Section Styles ===== */

#blog {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    background-color: #f8faff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
}

/* 首页只显示3个blog时的容器 */
.blog-grid-limit {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
}

.blog-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #ddd;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.blog-card-content {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    color: #0077ff;
    font-weight: 500;
    text-decoration: none;
    margin-top: auto;
    transition: color 0.3s;
}

.blog-card-link:hover {
    color: #0055cc;
    text-decoration: underline;
}

/* View More按钮样式 */
.view-more-container {
    margin-top: 3rem;
    text-align: center;
    width: 100%;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #0077ff;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
}

.view-more-btn:hover {
    background-color: #0055cc;
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .blog-grid,
    .blog-grid-limit {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-card-content {
        padding: 1.25rem;
    }
}