/* ============================================================
   详情页公共样式 · 方向 A (Éditorial Noir)
   图文左右分屏：左 = 作品图（轮播 + 灯箱），右 = 编辑式文字面板
   被所有作品详情页共享，替代原先各页重复的内联 <style>
   依赖 fonts.css（Fraunces / Inter）
   ============================================================ */

:root {
    --bg: #0c0c0d;
    --fg: #ECE8E1;
    --muted: #b8b3aa;
    --line: rgba(236, 232, 225, 0.22);
    --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --edge: 56px;
}

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

/* 图片/视频禁止拖拽与选中；正文文字可正常选中 */
img,
video {
    -webkit-user-drag: none;
    user-select: none;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--fg);
}

/* ---------- 左右分屏容器 ---------- */
#fullpage {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.section {
    position: relative;
    overflow: hidden;
    background-color: var(--bg);
}

/* ---------- 左：作品图 ---------- */
.showcase-section {
    flex: 0 0 56%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 留白裱框：作品四周透出底色，画廊感 */
    padding: 7vh 0 7vh 7vh;
}

.showcase-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.showcase-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.showcase-item.active {
    opacity: 1;
    visibility: visible;
}

.showcase-item img,
.showcase-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 轮播圆点 */
.showcase-nav {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 10;
    mix-blend-mode: difference;
}

.nav-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: #fff;
    transform: scale(1.25);
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ---------- 右：文字面板（编辑式 · 左对齐 · 可选中）---------- */
.description-section {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    overflow-y: auto;
    padding: 8vh var(--edge);
    scrollbar-width: none;
}

.description-section::-webkit-scrollbar {
    display: none;
}

.description-content {
    max-width: 48ch;
    text-align: left;
}

.project-title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2.4rem, 3.8vw, 3.8rem);
    line-height: 1.06;
    letter-spacing: -0.5px;
    margin-bottom: 36px;
    color: #fff;
}

/* 元数据：每行一条，发丝线分隔 */
.project-details {
    margin-bottom: 36px;
}

.project-details p {
    font-size: 14px;
    letter-spacing: 0.3px;
    color: var(--muted);
    padding: 11px 0;
    border-top: 1px solid var(--line);
}

.project-details p:last-child {
    border-bottom: 1px solid var(--line);
}

.project-description {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1.12rem;
    line-height: 1.85;
    color: rgba(236, 232, 225, 0.92);
    user-select: text;
}

.project-description p + p {
    margin-top: 1.2em;
}

/* 外部跳转链接（如展览官方页面） */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 4px;
    transition: border-color 0.3s ease, opacity 0.3s ease;
    user-select: text;
}

.project-link::after {
    content: '↗';
    font-size: 14px;
}

.project-link:hover {
    border-color: var(--fg);
}

/* ---------- 返回链接 ---------- */
.back-link {
    position: fixed;
    top: 40px;
    right: 44px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    z-index: 100;
    mix-blend-mode: difference;
}

.back-link::before {
    content: '← ';
}

.back-link:hover {
    opacity: 1;
}

/* ---------- 灯箱 ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 9, 0.96);
    z-index: 1000;
    cursor: zoom-out;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox.zoomed { cursor: grab; }
.lightbox.zoomed.dragging { cursor: grabbing; }

.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* 画框：顶部留给关闭键、底部留给左右箭头，图片不与之重合 */
    padding: 84px 4vw 116px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.lightbox-image.zoomed {
    cursor: grab;
}

.lightbox-image.zoomed.dragging { cursor: grabbing; }

.lightbox-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    z-index: 1001;
}

.lightbox-nav button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    position: relative;
    opacity: 0.85;
    font-size: 0;
    transition: all 0.3s ease;
}

/* 用边框绘制简洁的雪佛龙箭头，无文字 */
.lightbox-nav button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-width: 1.5px 1.5px 0 0;
    border-color: #fff;
}

.lightbox-nav .lightbox-prev::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

.lightbox-nav .lightbox-next::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

.lightbox-nav button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.8);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 34px;
    color: #fff;
    font-size: 38px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover { opacity: 1; }

/* ---------- 响应式：移动端上下堆叠 ---------- */
@media (max-width: 900px) {
    :root { --edge: 28px; }

    html, body { overflow: auto; }

    #fullpage {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .showcase-section {
        flex: none;
        height: 56vh;
        width: 100%;
        padding: 28px 24px 8px;
    }

    .description-section {
        height: auto;
        justify-content: flex-start;
        padding: 48px var(--edge) 64px;
    }

    .description-content { max-width: none; }

    .project-title {
        font-size: clamp(1.9rem, 7vw, 2.6rem);
        margin-bottom: 26px;
    }

    .project-description {
        font-size: 1.06rem;
        line-height: 1.78;
    }

    .lightbox-nav { bottom: 28px; gap: 20px; }
    .lightbox-nav button { width: 46px; height: 46px; }
}
