/* 
 * 主样式文件
 * 参考网站: https://kaopu-xiaopu.github.io/XIAOPU/index.html
 */

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

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

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #000;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* 布局 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a {
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: #000;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

main {
    padding: 0 5%;
}

main > section:not(.hero) {
    margin-top: 6rem;
}

footer {
    padding: 3rem 5%;
    margin-top: 5rem;
    text-align: center;
    border-top: 1px solid #eee;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.social-links a {
    font-size: 0.9rem;
}

/* 首页样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 5rem;
    background-image: url("../images/backgrounds/生成主体图片.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 66.67% center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    max-width: 600px;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: #333;
    letter-spacing: 1px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.featured-works,
.featured-articles {
    margin-bottom: 5rem;
}

.featured-works h3,
.featured-articles h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-align: center;
}

.works-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 3rem;
}

.work-card {
    position: relative;
    overflow: hidden;
}

.work-image {
    overflow: hidden;
}

.work-image img {
    transition: transform 0.5s ease;
}

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

.work-info {
    padding: 1rem 0;
}

.work-info h4 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.work-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.view-more {
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
}

.view-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: #000;
    transition: width 0.3s ease;
}

.view-more:hover::after {
    width: 100%;
}

.article-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 3rem;
}

.article-card {
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 1rem;
}

.article-card h4 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.article-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.read-more {
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
}

.read-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: #000;
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

/* 摄影作品页面样式 */
.page-title {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.page-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.photography-categories {
    margin-bottom: 3rem;
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    color: #666;
}

.filter-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    transition: width 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: #000;
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 80%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

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

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

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.item-overlay h4 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.item-overlay p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 文章页面样式 */
.articles-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.article-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 3rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-date, .article-category {
    font-size: 0.8rem;
    color: #999;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1.5rem;
}

/* 关于我页面样式 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.about-image img {
    width: 100%;
    border-radius: 5px;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    margin-bottom: 1rem;
}

.skills-list, .contact-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.skills-list li, .contact-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.skills-list li::before, .contact-list li::before {
    content: '•';
    position: absolute;
    left: -1.5rem;
}

.resume {
    max-width: 800px;
    margin: 0 auto;
}

.resume h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-align: center;
}

.resume-section {
    margin-bottom: 3rem;
}

.resume-section h4 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.resume-item {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.resume-date {
    font-size: 0.9rem;
    color: #999;
}

.resume-content h5 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.resume-content p {
    margin-bottom: 1rem;
    color: #666;
}

.resume-content ul {
    padding-left: 1.5rem;
}

.resume-content ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.resume-content ul li::before {
    content: '•';
    position: absolute;
    left: -1.5rem;
}

.resume-download {
    text-align: center;
    margin-top: 3rem;
}

.download-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #000;
    color: #fff;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #333;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1.5rem 5%;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        gap: 1.5rem;
    }
    
    main {
        margin-top: 8rem;
    }
    
    .hero {
        min-height: 100vh;
        background-position: center center;
    }
    
    .hero-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .works-container,
    .article-container {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .resume-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
} 