/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

img {
    max-width: 100%;
    height: auto;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

header h1 {
    font-size: 1.8rem;
    color: #333;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 主页英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.profile {
    max-width: 600px;
    margin: 0 auto;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid rgba(255, 255, 255, 0.2);
}

.profile h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.profile p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 博客文章区域 */
.blog-posts {
    padding: 60px 0;
    background-color: #fff;
}

.blog-posts h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    position: relative;
}

.blog-posts h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post h3 {
    font-size: 1.5rem;
    margin: 20px;
    line-height: 1.3;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin: 0 20px 15px;
}

.post p {
    padding: 0 20px 20px;
    color: #555;
}

.post-link {
    color: #333;
    display: block;
}

.read-more {
    display: block;
    text-align: right;
    padding: 15px 20px;
    background-color: #f8f9fa;
    color: #007bff;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #e9ecef;
}

/* 关于我区域 */
.about {
    padding: 60px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.about h2 {
    margin-bottom: 30px;
    color: #333;
}

.about p {
    max-width: 800px;
    margin: 0 auto 15px;
    line-height: 1.8;
}

/* 联系区域 */
.contact {
    padding: 60px 0;
    background-color: #fff;
}

.contact h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.contact-info p {
    margin-bottom: 15px;
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

footer a {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .profile h2 {
        font-size: 2rem;
    }
    
    .posts {
        grid-template-columns: 1fr;
    }
}