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

:root {
    --text: #f0f0f0;
    --text-muted: rgba(255,255,255,0.6);
    --accent: #c8ff00;
    --card-bg: rgba(255,255,255,0.05);
    --border: rgba(255,255,255,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== 流动背景 ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a3e 25%, #24243e 50%, #1b1464 75%, #0f0c29 100%);
}

body::after {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 15% 15%, rgba(139,92,246,0.45) 0%, transparent 55%),
        radial-gradient(ellipse 60% 80% at 85% 25%, rgba(236,72,153,0.4) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 40% 80%, rgba(56,189,248,0.45) 0%, transparent 45%),
        radial-gradient(ellipse 50% 40% at 75% 75%, rgba(244,114,182,0.35) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 10% 65%, rgba(52,211,153,0.35) 0%, transparent 45%),
        radial-gradient(ellipse 45% 50% at 60% 10%, rgba(251,146,60,0.3) 0%, transparent 45%);
    animation: flowBackground 18s ease-in-out infinite alternate;
}

@keyframes flowBackground {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(5%, -3%) rotate(3deg) scale(1.03); }
    50% { transform: translate(-3%, 5%) rotate(-2deg) scale(0.98); }
    75% { transform: translate(3%, 3%) rotate(2deg) scale(1.02); }
    100% { transform: translate(-5%, -2%) rotate(-3deg) scale(1); }
}

body::before::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
}

/* 额外流动层 */
.flow-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.flow-layer::before,
.flow-layer::after {
    content: '';
    position: absolute;
    inset: -30%;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: flowLayer 25s ease-in-out infinite alternate;
}

.flow-layer::before {
    background: radial-gradient(circle at 25% 25%, rgba(251,146,60,0.35), transparent 45%),
                radial-gradient(circle at 75% 55%, rgba(56,189,248,0.3), transparent 45%),
                radial-gradient(circle at 50% 80%, rgba(168,85,247,0.25), transparent 40%);
    animation-delay: -5s;
}

.flow-layer::after {
    background: radial-gradient(circle at 55% 15%, rgba(236,72,153,0.3), transparent 40%),
                radial-gradient(circle at 15% 70%, rgba(52,211,153,0.25), transparent 40%);
    animation-delay: -12s;
    animation-duration: 28s;
}

@keyframes flowLayer {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(8%, -5%) scale(1.1); }
    66% { transform: translate(-5%, 8%) scale(0.95); }
    100% { transform: translate(3%, -3%) scale(1.05); }
}

/* ===== 导航 ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2rem;
    background: rgba(10,10,30,0.3);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: border-bottom-color 0.3s;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

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

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== 首屏 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 40px rgba(0,0,0,0.3);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 480px;
}

.btn {
    display: inline-block;
    padding: 1.1rem 3rem;
    background: var(--accent);
    color: #000;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 100px;
    transition: transform 0.3s, box-shadow 0.3s;
    letter-spacing: 0.02em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 255, 0, 0.35);
}

/* ===== 通用容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== 作品 ===== */
.work {
    padding: 8rem 0;
    background: transparent;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}

.work-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(200,255,0,0.5);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 80px rgba(139,92,246,0.15);
}

.work-thumb {
    height: 340px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.work-year {
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
}

.work-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.work-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.work-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.work-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
}

/* ===== 关于 ===== */
.about {
    padding: 8rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    max-width: 540px;
}

.about-text p:last-child {
    color: var(--text);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    border-left: 2px solid var(--accent);
    padding-left: 1.2rem;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, rgba(200,255,0,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ===== 联系 ===== */
.contact {
    padding: 8rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.contact-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.contact-link {
    padding: 0.7rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 100px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(200,255,0,0.12);
}

/* ===== 页脚 ===== */
.footer {
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ===== 作品详情弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(5,5,20,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: rgba(15,12,41,0.8);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    width: 90%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(200,255,0,0.2);
    border-color: var(--accent);
}

.modal-hero {
    height: 300px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.modal-body {
    padding: 2.5rem;
}

.modal-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--accent);
    border-radius: 100px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-year {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.modal-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.modal-gallery-item {
    height: 71vw;
    max-height: 500px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--accent);
}

.modal-content h3:first-child {
    margin-top: 0;
}

.modal-desc,
.modal-role,
.modal-tools {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    max-width: 600px;
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 1.2rem;
    }

    .work-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .work-thumb {
        height: 260px;
    }

    .work-info {
        padding: 1.2rem;
    }

    .work-title {
        font-size: 1.05rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .modal {
        width: 95%;
        border-radius: 16px;
    }

    .modal-hero {
        height: 200px;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .modal-gallery-item {
        height: 80px;
    }
}

/* ===== 滚动动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
