html {
    scroll-behavior: smooth;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--primary-pale);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 8px;
}

/* ===== Hero 区域 ===== */
.hero {
    position: relative;
    height: 64vh;
    /* min-height: 460px; */
    max-height: 720px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #f5e6e8 0%, #fcf8f7 60%, #f0e4e0 100%);
    overflow: hidden;
    margin: -72px 0 00;
    padding-top: 72px;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(212, 133, 138, 0.10) 0%, transparent 70%),
    radial-gradient(circle at 70% 60%, rgba(196, 168, 130, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero-bg-image {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-size: cover;
    background-position: center 30%;
    filter: blur(2px) saturate(0.8);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
    max-width: 780px;
}
.hero-content .hero-badge {
    display: inline-block;
    padding: 4px 20px;
    border-radius: 40px;
    background: rgba(212, 133, 138, 0.14);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 3px;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}
.hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 8vw, 4.8rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: 4px;
    margin-bottom: 16px;
}
.hero-content h1 .highlight {
    color: var(--primary-dark);
    position: relative;
}
.hero-content p {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--text-light);
    letter-spacing: 2px;
    font-weight: 300;
    max-width: 540px;
    margin: 0 auto 28px;
    line-height: 1.8;
}
.hero-content .hero-cta {
    display: inline-block;
    padding: 12px 44px;
    border-radius: 50px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(212, 133, 138, 0.30);
}
.hero-content .hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(212, 133, 138, 0.40);
    background: var(--primary-dark);
}

/* ===== 分类标题 ===== */
.section-header {
    text-align: center;
    padding: 16px 24px 28px;
}
.section-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: 3px;
}
.section-header h2 .accent {
    color: var(--primary);
}
.section-header p {
    color: var(--text-light);
    font-size: 15px;
    letter-spacing: 2px;
    margin-top: 6px;
    font-weight: 300;
}

/* ===== 作品瀑布流 ===== */
.gallery-wrapper {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.gallery {
    column-count: 4;
    column-gap: 20px;
    padding: 4px 0;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}
.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.gallery-item .img-wrap {
    position: relative;
    overflow: hidden;
    background: var(--primary-light);
}
.gallery-item .img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}
.gallery-item:hover .img-wrap img {
    transform: scale(1.03);
}

.gallery-item .item-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 3px 16px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--white);
    background: rgba(44, 24, 23, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 2;
}

.gallery-item .item-info {
    padding: 14px 18px 18px;
    background: var(--white);
}
.gallery-item .item-info h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}
.gallery-item .item-info p {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 0.3px;
    opacity: 0.8;
    line-height: 1.5;
}

/* 空状态提示 */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 300;
}

/* ===== 回到顶部 ===== */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(212, 133, 138, 0.30);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(212, 133, 138, 0.40);
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .gallery {
        column-count: 3;
        column-gap: 16px;
    }
    .gallery-item .item-info h3 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 321px;
        /* min-height: 360px; */
        max-height: 520px;
        margin: -64px 0 24px 0;
        padding-top: 64px;
    }
    .hero-content h1 {
        font-size: clamp(1.8rem, 10vw, 2.8rem);
    }
    .hero-content p {
        font-size: 14px;
        max-width: 100%;
    }
    .hero-content .hero-cta {
        padding: 10px 32px;
        font-size: 14px;
    }

    .gallery-wrapper {
        padding: 0 12px 24px;
    }
    .gallery {
        column-count: 2;
        column-gap: 12px;
    }
    .gallery-item {
        margin-bottom: 12px;
        border-radius: 12px;
    }
    .gallery-item .item-info {
        padding: 10px 14px 14px;
    }
    .gallery-item .item-info h3 {
        font-size: 15px;
    }
    .gallery-item .item-info p {
        font-size: 12px;
    }
    .gallery-item .item-tag {
        top: 10px;
        left: 10px;
        font-size: 10px;
        padding: 2px 12px;
    }

    .section-header {
        padding: 8px 16px 16px;
    }
    .section-header h2 {
        font-size: 1.6rem;
    }

    .back-top {
        width: 42px;
        height: 42px;
        font-size: 18px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1;
        column-gap: 10px;
    }
    .gallery-item {
        margin-bottom: 10px;
        border-radius: 10px;
    }
    .gallery-item .item-info {
        padding: 8px 10px 12px;
    }
    .gallery-item .item-info h3 {
        font-size: 14px;
    }
    .gallery-item .item-info p {
        font-size: 11px;
    }
    .hero-content .hero-badge {
        font-size: 11px;
        padding: 2px 14px;
        margin-bottom: 12px;
    }
    .nav-links{
        display: none;
    }
    .nav-links.open{
        display: block;
    }
}

/* ===== 加载动画 ===== */
.gallery-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}
.gallery-item:nth-child(1) {
    animation-delay: 0.02s;
}
.gallery-item:nth-child(2) {
    animation-delay: 0.04s;
}
.gallery-item:nth-child(3) {
    animation-delay: 0.06s;
}
.gallery-item:nth-child(4) {
    animation-delay: 0.08s;
}
.gallery-item:nth-child(5) {
    animation-delay: 0.10s;
}
.gallery-item:nth-child(6) {
    animation-delay: 0.12s;
}
.gallery-item:nth-child(7) {
    animation-delay: 0.14s;
}
.gallery-item:nth-child(8) {
    animation-delay: 0.16s;
}
.gallery-item:nth-child(9) {
    animation-delay: 0.18s;
}
.gallery-item:nth-child(10) {
    animation-delay: 0.20s;
}
.gallery-item:nth-child(11) {
    animation-delay: 0.22s;
}
.gallery-item:nth-child(12) {
    animation-delay: 0.24s;
}
.gallery-item:nth-child(13) {
    animation-delay: 0.26s;
}
.gallery-item:nth-child(14) {
    animation-delay: 0.28s;
}
.gallery-item:nth-child(15) {
    animation-delay: 0.30s;
}
.gallery-item:nth-child(16) {
    animation-delay: 0.32s;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 分类切换过渡 ===== */
.gallery {
    transition: opacity 0.3s ease;
}
.gallery.switching {
    opacity: 0.4;
}