:root {
    --bg-light: #f5f5f7;
    --accent-1: rgba(124, 58, 237, 0.12);
    --accent-2: rgba(30, 64, 175, 0.10);
    --accent-3: rgba(6, 182, 212, 0.12);
    --accent-4: rgba(236, 72, 153, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.55);
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(0, 0, 0, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow: hidden;
}

/* --- 固定页眉 (悬浮胶囊样式) --- */
.fixed-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 1rem 3rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.fixed-header h1 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    color: var(--text-primary);
    text-shadow: none;
    margin: 0;
    white-space: nowrap;
}

/* --- 背景层与动效 --- */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: var(--bg-light);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: pulse 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

.blob-4 {
    width: 300px;
    height: 300px;
    background: var(--accent-4);
    bottom: 20%;
    left: 10%;
    animation-delay: -15s;
}

@keyframes pulse {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, 50px) scale(1.1); }
    66% { transform: translate(-50px, 100px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* --- 滚动捕捉容器 --- */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.project-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    padding: 2rem;
    position: relative;
}

/* --- 作品卡片 --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #e8e8ec;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    backdrop-filter: blur(4px);
    transition: opacity 0.4s ease;
}

.glass-card:hover .project-img {
    transform: scale(1.05);
}

.project-image-wrapper:hover .hover-overlay {
    opacity: 1;
}

.icon-link {
    width: 50px;
    height: 50px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-link:hover {
    transform: scale(1.15);
}

.icon-link svg {
    width: 24px;
    height: 24px;
}

/* --- 文字信息 --- */
.project-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-primary) 0%, rgba(26,26,46,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* --- 动画状态 --- */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-section.active .reveal-text {
    opacity: 1;
    transform: translateY(0);
}

.project-section.active .reveal-text:nth-child(2) { transition-delay: 0.2s; }
.project-section.active .reveal-text:nth-child(3) { transition-delay: 0.4s; }

/* --- 鼠标滚轮标识 --- */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(26, 26, 46, 0.2);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* --- Footer (最后一块) --- */
.footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1rem;
}

.footer-content {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: inline-flex;
    flex-direction: column;
    padding: 0.8rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    gap: 0.3rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--text-primary);
}

/* --- 响应式 --- */
@media (max-width: 968px) {
    .glass-card {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
        border-radius: 24px;
    }

    h2 {
        font-size: 2.5rem;
    }
}

/* --- 菜单切换按钮 --- */
.menu-toggle {
    position: fixed;
    top: 2rem;
    right: 2.5rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.menu-toggle.active .line-1 { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active .line-2 { opacity: 0; }
.menu-toggle.active .line-3 { transform: translateY(-8px) rotate(-45deg); }

/* --- 侧边栏导航 --- */
.side-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    z-index: 999;
    visibility: hidden;
    overflow: hidden;
    transition: visibility 0.8s;
}

.side-nav.active {
    visibility: visible;
}

/* 颜色交替层 */
.nav-overlay {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.layer-1 { background: var(--accent-1); z-index: 1; }
.layer-2 { background: var(--accent-2); z-index: 2; }
.layer-3 {
    background: rgba(245, 245, 247, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: 3;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.side-nav.active .nav-overlay {
    transform: translateX(-100%);
}

.side-nav.active .layer-1 { transition-delay: 0s; }
.side-nav.active .layer-2 { transition-delay: 0.08s; }
.side-nav.active .layer-3 { transition-delay: 0.15s; }

.nav-content {
    position: relative;
    z-index: 4;
    height: 100%;
    padding: 6rem 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.side-nav.active .nav-content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.nav-header h3 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    color: rgba(6, 182, 212, 0.7);
    margin-bottom: 3rem;
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-item {
    margin-bottom: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
    transition: all 0.4s ease;
}

.nav-num {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(26, 26, 46, 0.15);
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.nav-title-wrapper {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: rgba(26, 26, 46, 0.4);
    line-height: 1.2;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-subtitle {
    font-size: 0.8rem;
    color: rgba(26, 26, 46, 0.25);
    margin-top: 0.3rem;
    letter-spacing: 0.05rem;
    transition: all 0.4s ease;
}

/* 激活状态 */
.nav-item.active .nav-num {
    color: rgba(6, 182, 212, 0.8);
    transform: scale(1.1);
}

.nav-item.active .nav-title {
    color: var(--text-primary);
    transform: translateX(8px);
}

.nav-item.active .nav-subtitle {
    color: var(--text-secondary);
}

/* 装饰性下划线 */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -0.8rem;
    left: 2.5rem;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(6,182,212,0.7), transparent);
    transition: width 0.4s ease;
}

.nav-item.active::after {
    width: 40px;
}

/* 悬停效果 */
.nav-item:hover .nav-title {
    color: var(--text-primary);
}

.nav-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 2rem;
}

.nav-footer p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05rem;
}

@media (max-width: 480px) {
    .side-nav {
        width: 100%;
    }
}
