/* 全局样式 */
* {
    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: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    background-color: #333;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #00bcd4;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=photography%20equipment%20and%20electronics%20workspace&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content .highlight {
    color: #00bcd4;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.btn.primary {
    background-color: #00bcd4;
    color: #fff;
}

.btn.primary:hover {
    background-color: #00acc1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn.secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn.secondary:hover {
    background-color: #fff;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 通用section样式 */
.section {
    padding: 80px 0;
}

.section.bg-light {
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #00bcd4;
    margin: 10px auto 0;
}

/* 摄影作品 */
.photography-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-overlay h3 {
    margin-bottom: 5px;
}

.photo-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 编程项目 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.project-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-icon {
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #00bcd4;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-card:hover .project-icon {
    background-color: #00bcd4;
    color: #fff;
}

.project-card h3 {
    margin-bottom: 15px;
    color: #333;
}

.project-card p {
    margin-bottom: 20px;
    color: #666;
}

/* 电子DIY */
.diy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.diy-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.diy-item:hover {
    transform: translateY(-5px);
}

.diy-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.diy-item h3 {
    padding: 20px 20px 10px;
    color: #333;
}

.diy-item p {
    padding: 0 20px 20px;
    color: #666;
}

/* 关于我 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 2rem;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-info h3 {
    margin-bottom: 15px;
    color: #333;
}

.skills {
    list-style: none;
    margin-bottom: 30px;
}

.skills li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.skills li::before {
    content: '•';
    color: #00bcd4;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.contact {
    list-style: none;
}

.contact li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact li i {
    color: #00bcd4;
    margin-right: 10px;
    font-size: 1.2rem;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00bcd4;
}

.footer-links a i {
    margin-right: 10px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: #00bcd4;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .diy-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* 滚动动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}