/* 基础样式 */
:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #ff4d4d;
    --background-color: #fff;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --text-color: #333;
    --text-light: #666;
    --transition: all 0.3s ease;
    --spacing: 100px;
    --spacing-sm: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 自定义鼠标跟随效果 */
.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 77, 77, 0.2);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    display: none;
}

/* 导航栏样式 */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 1000;
    transition: var(--transition);
    mix-blend-mode: difference;
}

.main-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 50px;
    mix-blend-mode: normal;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.main-nav.scrolled .logo a {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-item {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    position: relative;
}

.main-nav.scrolled .nav-item {
    color: var(--primary-color);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: var(--transition);
}

.main-nav.scrolled .nav-toggle span {
    background-color: var(--primary-color);
}

/* 首页英雄区域 */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--dark-gray);
    color: #fff;
    padding: 0 20px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.8;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background-color: var(--accent-color);
    color: #fff;
}

.primary-btn:hover {
    background-color: #ff3333;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 77, 77, 0.3);
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s infinite;
    z-index: 1;
}

.scroll-indicator span {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.scroll-indicator svg {
    fill: #fff;
    width: 24px;
    height: 24px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 通用部分样式 */
section {
    padding: var(--spacing) 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.section-footer {
    text-align: center;
    margin-top: 60px;
}

/* 作品展示区样式 */
.works-section {
    background-color: var(--light-gray);
}

.filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 20px;
    color: var(--text-light);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.work-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.work-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.work-image {
    height: 300px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-item:hover .work-image img {
    transform: scale(1.1);
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.work-item:hover .work-info {
    transform: translateY(0);
}

.work-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.work-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 文章区样式 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.article-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 25px;
}

.article-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--accent-color);
    font-weight: 500;
    display: inline-block;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.read-more:hover::after {
    width: 100%;
}

/* 社交媒体区样式 */
.social-section {
    background-color: var(--light-gray);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-10px);
}

.social-icon {
    width: 60px;
    height: 60px;
    fill: var(--accent-color);
}

.social-link span {
    font-weight: 500;
}

/* 关于我区域样式 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-top: 5px solid var(--accent-color);
    border-left: 5px solid var(--accent-color);
    z-index: -1;
}

.about-image::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-bottom: 5px solid var(--accent-color);
    border-right: 5px solid var(--accent-color);
    z-index: -1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.skills {
    margin: 40px 0;
}

.skills h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.skill-bar {
    margin-bottom: 15px;
}

.skill-name {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.skill-progress {
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 1s ease;
}

/* 联系区域样式 */
.contact-section {
    background-color: var(--light-gray);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: var(--accent-color);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:nth-child(3),
.form-group:nth-child(4) {
    grid-column: 1 / -1;
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

textarea {
    height: 150px;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.2);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-gray);
    color: #fff;
    padding: 80px 50px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-logo p {
    opacity: 0.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-social .social-icon {
    width: 24px;
    height: 24px;
    fill: #fff;
    transition: var(--transition);
}

.footer-social a:hover .social-icon {
    fill: var(--accent-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    :root {
        --spacing: 80px;
        --spacing-sm: 40px;
    }

    .hero-section h1 {
        font-size: 3.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto 40px;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: row;
        justify-content: space-around;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing: 60px;
        --spacing-sm: 30px;
    }

    .main-nav {
        padding: 15px 30px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-item {
        color: var(--primary-color);
        font-size: 1.2rem;
        margin: 15px 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    section {
        padding: var(--spacing) 30px;
    }

    .works-grid, .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .contact-info {
        flex-direction: column;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
.split-text {
    opacity: 0;
    animation: fadeIn 1s forwards 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-item, .article-card, .about-image, .skill-bar {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.work-item.show, .article-card.show, .about-image.show, .skill-bar.show {
    opacity: 1;
    transform: translateY(0);
} 