/* ============================================
   全局共用样式表
   ============================================ */

/* 基础重置与变量定义 */
* {
    /* margin: 0; */
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-light: #ffffff;
    --bg-secondary: #f8f8f8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent: #c9a96e;
    --accent-hover: #b8975d;
    --border: #e5e5e5;
}

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

/* ============================================
   页脚（Footer）
   ============================================ */
.footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 30px;
}

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

.footer-links a:hover {
    color: var(--accent);
}

/* ============================================
   回到顶部按钮（Scroll to Top）
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

/* ============================================
   页面过渡动画（Page Transition）
   ============================================ */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* ============================================
   首页专属样式 - Hero 区域
   ============================================ */
.hero {
    /* height: 60vh; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px 60px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201,169,110,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(201,169,110,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.3s;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.5s;
}

.hero-title span {
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: #010d0d;
    color: transparent !important;;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.7s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   首页专属样式 - 筛选按钮（Filter Section）
   ============================================ */
.filter-section {
    padding: 0 60px 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transition: left 0.4s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: #ffffff;
    border-color: var(--accent);
}

/* ============================================
   首页专属样式 - 作品网格（Portfolio Grid）
   ============================================ */
.portfolio-section {
    padding: 0 60px 100px;
    display: flex;
    justify-content: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 60%;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.08);
}

.portfolio-info {
    padding: 2px 0 0;
}

.portfolio-category {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1px;
}

.portfolio-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1px;
}

.portfolio-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ============================================
   详情页专属样式（Detail Page）
   ============================================ */

/* 详情页内容区域 */
.detail-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 60px 60px;
}

/* 详情页首图 */
.detail-hero-img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    margin-bottom: 60px;
}

/* 详情页分类标签 */
.detail-category {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

/* 详情页标题 */
.detail-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 30px;
}

/* 详情页描述文字 */
.detail-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 800px;
}



/* 返回按钮 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    margin-bottom: 40px;
}

.back-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.back-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ============================================
   响应式布局（Responsive）
   ============================================ */
@media (max-width: 1024px) {
    /* 平板端作品网格变为两列 */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 80%;
    }

    /* 详情页信息网格变为两列 */
    .detail-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 手机端 Hero 区域 */
    .hero {
        /* height: 50vh; */
        padding: 30px 20px 40px;
        margin-top: 30px;
    }

    /* 手机端筛选区域 */
    .filter-section,
    .portfolio-section {
        padding-left: 30px;
        padding-right: 30px;
    }

    /* 手机端作品网格变为两列且占满宽度 */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
    }

    /* 手机端页脚 */
    .footer {
        padding: 20px 30px;
        flex-direction: column;
        text-align: center;
    }

    /* 手机端详情页内容 */
    .detail-main {
        padding: 20px 30px 40px;
    }

    /* 手机端详情页信息网格变为一列 */
    .detail-meta {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 手机端详情页画廊变为一列 */
    .detail-gallery {
        grid-template-columns: 1fr;
    }

    .detail-gallery img:first-child {
        grid-column: span 1;
    }
}
