/* 全局样式重置 */
:root {
    --primary-color: #212121;
    --secondary-color: #424242;
    --accent-color: #757575;
    --dark-color: #000000;
    --light-color: #ffffff;
    --text-color: #212121;
    --text-light: #616161;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* 英雄区域样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(50, 50, 50, 0.9));
    color: white;
    position: relative;
    overflow: hidden;
}

#fireworks-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

.hero-image {
    position: relative;
    height: 500px;
}

/* 项目区域样式 */
.projects {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: white; /* 白色背景 */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid #eee; /* 添加浅色边框增强视觉效果 */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-card:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px; /* 只覆盖图片区域的高度 */
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: 1;
}

.project-image {
    height: 200px;
    background-color: #333; /* 浅黑色背景 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* 白色图标 */
    font-size: 2rem; /* 减小字体大小 */
    padding: 20px; /* 添加内边距，使图标不会占满整个区域 */
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.project-image i {
    transition: transform 0.3s ease; /* 添加过渡效果 */
}

.project-card:hover .project-image i {
    transform: scale(1.1); /* 鼠标悬停时图标放大10% */
}

/* 自定义图标样式 */
.custom-icon {
    width: 60%; /* 调整图标宽度为容器的60%，使其更小 */
    height: 60%; /* 调整图标高度为容器的60%，使其更小 */
    max-width: 120px; /* 设置最大宽度，减小尺寸 */
    max-height: 120px; /* 设置最大高度，减小尺寸 */
    object-fit: contain; /* 保持图标比例，不拉伸 */
    border-radius: 10px; /* 添加圆角 */
    transition: transform 0.3s ease; /* 添加过渡效果 */
}

.project-card:hover .custom-icon {
    transform: scale(1.1); /* 鼠标悬停时图标放大10% */
}

.project-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background-color: white; /* 下半部分改为白色背景 */
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #212121; /* 文字颜色改为黑色 */
}

.project-description {
    color: #424242; /* 深灰色文字，提高可读性 */
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    background-color: transparent; /* 透明背景 */
    color: #555; /* 深灰色文字 */
    padding: 0.3rem 0.8rem;
    border-radius: 4px; /* 更小的圆角 */
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #ddd; /* 浅灰色边框 */
    position: relative;
    transition: all 0.2s ease;
}

.project-tag::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2); /* 底部渐变线 */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-tag:hover {
    color: #333; /* 悬停时文字变深 */
    border-color: #bbb; /* 悬停时边框变深 */
}

.project-tag:hover::before {
    transform: scaleX(1); /* 悬停时显示底部线 */
}

/* 项目更新时间样式 */
.project-card .project-image .project-update-time {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    bottom: 5px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 0.65rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    z-index: 3 !important;
}

.project-card .project-image .project-update-time i {
    margin-right: 2px !important;
    font-size: 0.6rem !important;
}

/* 关于区域样式 */
.about {
    padding: 100px 0;
    background-color: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.4rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.skill-tag {
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.focus-areas {
    margin-top: 2rem;
}

.focus-areas h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.4rem;
}

.focus-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.focus-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.focus-item:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.focus-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.focus-item span {
    font-weight: 500;
    color: var(--text-color);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.image-placeholder:hover {
    transform: scale(1.05);
}

/* 联系区域样式 */
.contact {
    padding: 100px 0;
    background-color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    transition: var(--transition);
}

.contact-item:hover {
    background-color: rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.contact-item i {
    width: 50px;
    height: 50px;
    background-color: var(--dark-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-details h4 {
    margin-bottom: 0.3rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.contact-details p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.contact-note {
    margin-top: 1rem;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 10px 10px 0;
}

.contact-note p {
    color: var(--text-light);
    line-height: 1.6;
    font-style: italic;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    padding: 2rem;
    border-radius: 15px;
}

.contact-form h3 {
    color: var(--dark-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dark-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.copyright-section {
    width: 100%;
    margin-bottom: 1rem;
}

.copyright-section p {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.copyright-notice {
    opacity: 0.7;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 800px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.cooperation-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
}

.cooperation-label {
    font-size: 0.9rem;
    opacity: 0.8;
    width: 100%;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.cooperation-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.73rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: var(--transition);
    font-size: 0.73rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cooperation-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.cooperation-link i {
    font-size: 0.8rem;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-text {
        order: 2;
    }
    
    .about-image {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .focus-items {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        padding-top: 90px; /* 为固定导航栏留出空间 */
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .skills h3, .focus-areas h3, .contact-form h3 {
        font-size: 1.2rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .copyright-section {
        min-width: auto;
    }
    
    .cooperation-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        align-items: center;
    }
    
    .cooperation-label {
        width: auto;
        margin-bottom: 0.5rem;
    }
    
    .image-placeholder {
        width: 200px;
        height: 200px;
        font-size: 6rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .contact-note {
        padding: 1rem;
        font-size: 0.9rem;
    }
}