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

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

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

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #666;
}

.social-links {
    display: flex;
    align-items: center;
}

.social-icon {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #666;
}

/* 内容区域样式 */
main {
    margin-top: 100px;
    min-height: 100vh;
}

.content-section {
    padding: 80px 0;
    background-color: #fff;
    margin-bottom: 20px;
}

.content-section:nth-child(odd) {
    background-color: #f9f9f9;
}

/* 文章样式 */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 20px;
}

/* 关于我样式 */
#about h2,
#photography h2,
#articles h2,
#resume h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
    color: #333;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.avatar img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bio {
    max-width: 600px;
    font-size: 18px;
    line-height: 1.8;
}

.bio p {
    margin-bottom: 20px;
}

/* 摄影作品样式 */
/* 摄影分类按钮 */
.photo-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.category-btn:hover {
    background-color: #f0f0f0;
    border-color: #333;
    color: #333;
}

.category-btn.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.photo-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    opacity: 1;
    position: relative;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-caption {
    padding: 15px;
    text-align: center;
    font-size: 16px;
    color: #333;
    background-color: #fff;
}

/* 隐藏不在当前分类的作品 */
.photo-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

/* 文章列表样式 */
.article-list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 30px;
}

.article-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.article-item a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: 500;
    display: block;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.article-item a:hover {
    color: #666;
}

.article-date {
    color: #888;
    font-size: 14px;
    font-style: italic;
    display: block;
    margin-top: 5px;
}

.article-item:last-child {
    border-bottom: none;
}

/* 阅读更多链接 */
.read-more {
    display: inline-block;
    margin-top: 15px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #666;
    text-decoration: underline;
}

.post-footer {
    margin-top: 20px;
    text-align: right;
}

/* 简历样式 */
.resume-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
}

.resume-content p {
    margin-bottom: 30px;
}

.download-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.download-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 15px 0;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links li {
        margin: 5px 15px;
    }
    
    .social-links {
        margin-top: 15px;
    }
    
    .social-icon {
        margin: 0 10px;
    }
    
    main {
        margin-top: 150px;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .photo-gallery {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .photo-categories {
        gap: 10px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 24px;
    }
    
    #about h2,
    #photography h2,
    #articles h2,
    #resume h2 {
        font-size: 24px;
    }
    
    .article-item a {
        font-size: 16px;
    }
    
    .download-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}