/* #region 页面控制变量 */
:root {
    --sidebar-width: clamp(250px, 23vw, 370px);
    --page-padding: clamp(24px, 3vw, 56px);
    --header-height: 64px;
    --accent: #cbb842;
    --background: #080808;
    --text-primary: rgba(255,255,255,.94);
    --text-secondary: rgba(255,255,255,.58);
    --border: rgba(255,255,255,.16);
}

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

html {
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--background);
    color: var(--text-primary);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
/* #endregion */


/* #region 中英文切换 */
body:not(.en-mode) .lang-en {
    display: none !important;
}

body.en-mode .lang-zh {
    display: none !important;
}
/* #endregion */


button,
a {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
}

img {
    display: block;
    max-width: 100%;
}
/* #endregion */



/*   DROWNING PROJECT PAGE  左侧固定信息 + 右侧全屏滚动页面 + 图片灯箱  */
/* #region 页面控制变量 */

:root {
    /*
     * 导航栏高度。
     * 如果你的全局导航高度不同，可以修改这里。
     */
    --global-nav-height: ;


    /*
     * 左侧介绍框的位置。
     *
     * 修改这两个数字，就可以整体移动介绍框。
     */
    --sidebar-left: clamp(60px, 3vw, 155px);
    --sidebar-top: clamp(80px, 1vh, 155px);


    /*
     * 左侧介绍框宽度。
     */
    --sidebar-width: clamp(160px, 23vw, 690px);


    /*
     * 左侧介绍框内部留白。
     */
    --sidebar-padding-x: clamp(20px, 2.2vw, 34px);
    --sidebar-padding-y: clamp(22px, 3vh, 38px);


    /*
     * 半透明程度。
     *
     * 最后一个数字越接近 1，背景越黑。
     * 越接近 0，背景越透明。
     */
    --sidebar-background: rgba(7, 7, 7, 0);


    --line-color: rgba(255, 255, 255, 0);
    --soft-text: rgba(255, 255, 255, 0.68);
}

/* #endregion */





/* #region 全局导航 */

.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 80px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.205) 0%, rgba(0, 0, 0, 0.198) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 导航栏 LOGO 样式及多语言微调 */
.nav-logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}
:lang(zh-CN).nav-logo a {
    letter-spacing: 1px;
}
:lang(en).nav-logo a {
    letter-spacing: 2px;
}

/* 导航栏链接文字及装饰 */
    .nav-links{
    margin-left: auto;
    }
    .nav-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 1px;
    margin-left: 30px;
    transition: color 0.3s ease;
}
    .nav-links a:hover, 
    .nav-links a.active {
    color: #ffffff;
}


/* #region 语言切换按钮*/
/* 语言切换按钮核心样式 */ 
.lang-toggle { 
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 4px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    /*按钮多圆*/
    border-radius:900px;
    transition: all 0.3s ease;
    margin-left: 15px;
    vertical-align: middle;
    }
    .lang-toggle:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}
/* #endregion */

/* #endregion */





/* 背景 */
.project-backdrop {
    position: fixed;

    inset: 0;

    z-index: 0;

    background-image:
    url("https://cdn.liuxinzhu.info/images/Defocus-Aberration/Defocus-7.jpg");

    background-size: cover;

    background-position: center center;

    background-repeat: no-repeat;
}


/* #region side 悬浮介绍 */
.project-sidebartext {
    /* 固定在浏览器画面中。页面向下滚动时不移动。*/
    position: fixed;
    top: 0;
    left: 0;
    z-index: 800;
    width: 26%;
    
    color: #ffffff;

    width: var(--sidebar-width);
    height: 100vh;
    padding: calc(var(--header-height) + 38px) clamp(22px, 2.7vw, 46px) 34px;
    display: flex;
    flex-direction: column;

    /* 背景模糊。*/
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    /* 边框。*/
    border: 0px solid  rgba(255, 255, 255, 0.11);
    box-shadow: 0 25px 70px  rgba(0, 0, 0, 0);
}

.project-heading {
    margin-bottom: clamp(32px, 5vh, 70px);
}

.project-number {
    margin-bottom: 12px;
    color: #cbb842;
    font-size: 10px;
    letter-spacing: .15em;
}

.project-heading h1 {
    color: #fff;
    font-size: clamp(24px, 2.25vw, 37px);
    font-weight: 500;
    line-height: .94;
    letter-spacing: -.045em;
}

.project-title-zh {
    margin-top: 12px;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    letter-spacing: .08em;
}

.project-year {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 10px;
    letter-spacing: .12em;
}

/*章节小导航 */
.project-index {
    display: grid;
    gap: 12px;
    margin-bottom: clamp(32px, 5vh, 64px);
}

.project-index a {
    display: grid;
    grid-template-columns: 34px 1fr;
    color: rgba(255,255,255,.32);
    font-size: 10px;
    letter-spacing: .13em;
    text-decoration: none;
    transition: color .3s ease;
}

.project-index a:hover,
.project-index a.is-active {
    color: #fff;
}


.project-about {
    color: rgba(255,255,255,.68);
    font-size: clamp(10px, .72vw, 12px);
    font-weight: 300;
    line-height: 1.65;
}

.project-about p + p {
    margin-top: 12px;
}

.project-credits {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.credit-label {
    margin-bottom: 61px;
    color: rgb(255, 255, 255);
    font-size: 11px;
    letter-spacing: .18em;
}

.project-credits dl {
    display: grid;
    gap: 13px;
}

.project-credits dl div {
    
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 80px;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgb(255, 255, 255);
    line-height: 1.4;
}

.project-credits dt {
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.507);
}
.project-credits dt .lang-zh{
     font-size: 12px;
}




.project-credits dd {
    color: rgba(255,255,255,.72);

    
}

.project-main {
    margin-left: var(--sidebar-width);
}



/* 返回按键*/

.back-button {
    display: inline-block;

    margin-top: 88px;
    align-items: center;
    gap: 8px;
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: rgba(255,255,255,.75);

    font-size: 10px;
    font-weight: 300;
    text-decoration: none;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        color 250ms ease,
        transform 250ms ease;
}

.back-button:hover {
    color: #ffffff;

    
    transform: translateX(-3px);
}

/* #endregion */



/* #region 第一屏背景 */
.project-section {
    position: relative;
    min-height: 100vh;
}
.hero-panel {
    overflow: hidden;
}

/* 第一屏暗角。 它不会影响原图，只是在图片上覆盖一层渐变。*/
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.02) 45%, rgba(0,0,0,.32)),
        linear-gradient(0deg, rgba(0,0,0,.68), transparent 48%);
}
/* #endregion */


/* #region 介绍文字整体 */
.intro-panel {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: calc(var(--header-height) + 58px) var(--page-padding) 68px;
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 34px);
    align-items: end;
}

.intro-text1 {
    grid-column: 1 / span 5;
}

.intro-text2 {
    grid-column: 7 / span 3;
    align-self: end;
    color: rgba(255,255,255,.78);
    font-size: clamp(12px, .9vw, 15px);
    font-weight: 300;
    line-height: 1.7;
}

.intro-text2 p + p {
    margin-top: 18px;
}


.section-label {
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .16em;
}

.intro-text1 h2 {
    max-width: 780px;
    font-size: clamp(42px, 6.7vw, 112px);
    font-weight: 400;
    line-height: .88;
    letter-spacing: -.065em;
    text-transform: uppercase;
}
/* #endregion */



/*  #region滚动提示 */
.scroll-indicator {
    position: absolute;
    right: var(--page-padding);
    bottom: 34px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 13px;
    color: rgba(255,255,255,.56);
    font-size: 9px;
    letter-spacing: .17em;
    text-decoration: none;
    text-transform: uppercase;
}
.scroll-line {
    width: 52px;
    height: 1px;
    overflow: hidden;
    background: rgba(255,255,255,.25);
}

.scroll-line::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: #fff;
    animation: scroll-line 2.2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% {
        transform: translateX(-100%);
    }

    55%,
    100% {
        transform: translateX(100%);
    }
}
/* #endregion */




/* #region 第二屏视频 */


.film-panel {
    
    display: flex;
    align-items: center;
    background:rgba(0, 0, 0, 0.692);
}



.section-content {
    width: 100%;
    padding: calc(var(--header-height) + 65px) var(--page-padding) 80px;
}

.section-heading h2,
.gallery-heading h2 {
    font-size: clamp(40px, 6vw, 104px);
    font-weight: 400;
    line-height: .9;
    letter-spacing: -.06em;
}

.film-status {
    margin-top: 20px;
    color: rgba(255,255,255,.45);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.video-wrapper {
    position: relative;
    width: 100%;
    margin-top: clamp(35px, 6vh, 70px);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #030303;
    border: 1px solid rgba(255,255,255,.12);
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-wrapper iframe[src=""] {
    display: none;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.35);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
}
/*影节*/
.festival-link {
    width: max-content;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color .3s ease;
}

.festival-link:hover {
    color: #fff;
}
/* #endregion */





/* #region  第三屏画廊 */
.gallery-panel {
    min-height: 100vh;
    padding: calc(var(--header-height) + 65px) var(--page-padding) 100px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.709) 0%, rgba(0, 0, 0, 0.14) 40%, rgba(0, 0, 0, 0.03) 75%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.42) 0%, transparent 0%);
}

.gallery-heading {
    margin-bottom: clamp(50px, 8vw, 120px);
}

/* 网格容器 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(38px, 7vw, 120px) clamp(16px, 2vw, 34px);
}

/* 动效基础类：注意！因为加了 opacity: 0，如果没有 JS 把它变成 .is-visible，静帧图片会看不见 */
.gallery-item {
    min-width: 0;
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity .8s ease,
        transform .8s cubic-bezier(.2,.7,.2,1);
}

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

/* 【修复】让 gallery-item 和 gallery-post 的按钮同时变隐形 */
.gallery-item button 
.gallery-post button {
    width: 100%;
    overflow: hidden;
    border: none; /* 确保彻底扒光边框 */
    padding: 0;    /* 确保清空内边距 */
    background: transparent;
    cursor: zoom-in;
}

/* 图片比例与悬停放大动效 */
.gallery-item img {
    width: 100%;
    aspect-ratio: 1.66 / 1;
    object-fit: cover;
    transition:
        transform 1s cubic-bezier(.2,.7,.2,1),
        filter .5s ease;
}

.gallery-item button:hover img,
.gallery-post button:hover img {
    transform: scale(1.018);
    filter: brightness(.88);
}

/* 画廊普通缩略图的文字样式 */
.gallery-item figcaption {
    margin-top: 10px;
    color: rgba(255,255,255,.38);
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gallery-post {
    grid-column: span 2;    /* 【核心】横跨两列，强行让自己独占一行 */
    justify-self: center;   /* 【核心】在这一行里，让自己居中对齐 */
/* 最少 300px，大屏幕卡死在 600px，中间随屏幕宽度的 80% 自由缩放 */


    display: flex;
    flex-direction: column; /* 【关键】让图片和文字变成上下“齐步走”堆叠 */
    align-items: left;    /* 当方向变成 column 后，这行代码就变成了【水平居中】 */
 
}

   .gallery-post img{ width: clamp(300px, 80vw, 600px);
   }
/* 别忘了让底下的文字自己也居中对齐 */
.gallery-post figcaption {
    text-align: left;
    margin-top: 15px;
    color: rgba(255,255,255,.38);
    letter-spacing: .1em;
    text-transform: uppercase;
}

 
/* #endregion */




/* #region 图片灯箱 */

.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    padding: 0;
    overflow: hidden;
    background: rgba(0,0,0,.94);
    border: 0;
    color: #fff;
}

.lightbox::backdrop {
    background: rgba(0,0,0,.92);
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox figure {
    width: min(92vw, 1680px);
    height: min(88vh, 980px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox figure img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100% - 68px);
    object-fit: contain;
}

.lightbox figure figcaption {
    margin-top: 15px;
    color: rgba(255,255,255,.56);
    font-size: 10px;
    letter-spacing: .1em;
    text-align: center;
    text-transform: uppercase;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    z-index: 3;
    background: transparent;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    transition: color .25s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #fff;
}

.lightbox-close {
    top: 24px;
    right: 30px;
    font-size: 35px;
    font-weight: 200;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 54px;
    font-weight: 200;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: fixed;
    left: 30px;
    bottom: 24px;
    color: rgba(255,255,255,.46);
    font-size: 10px;
    letter-spacing: .14em;
}
/* #endregion */



/* #region 手机端 */
@media screen and (max-width: 900px) {
    :root {
        --header-height: 58px;
    }

    /* #region 手机端导航 */
    .global-nav {
        padding: 10px 10px 10px 6px; 
        flex-wrap: wrap; /* 空间不足时自动换行，防组件溢出屏幕 */
        justify-content: space-between;
        align-items: center; 
    } 

    /* 手机端导航 LOGO 微调 */
        .nav-logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        }   
        :lang(zh-CN) .nav-logo a,
        :lang(en) .nav-logo a { 
        font-size: 8px; 
        letter-spacing: 1px; 
        margin-left: 0px; 
    }
    
    /*导航文字*/
        .nav-links { 
        display: flex !important; /* 强制保持原导航显示状态 */
        flex-wrap: wrap; 
        align-items: center;
        text-align: justify;
        }
        :lang(zh-CN) .nav-links a {
        font-size: 13px; 
        margin-left: 16px;
        }
        .nav-links  a {
        font-size: 12px; 
        margin-left: 8px;   
    }
   
      /* 语言按钮优化 */
        :lang(zh-CN) .lang-toggle {
        margin-left: 10px; 
        padding: 3px 10px; 
        font-size: 10px;
        }
        :lang(en) .lang-toggle {
        margin-left: 10px; 
        padding: 3px 8px; 
        font-size: 9px;
    }
    /* #endregion */

    /* #region 悬浮项目信息*/
    .project-sidebartext {
        position: relative;
        width: 100%;
        height: auto;
        padding: calc(var(--header-height) + 36px) 20px 30px;
        background: rgba(6, 6, 6, 0.08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.11);
    }

    .project-heading {
        margin-bottom: 28px;
    }

    .project-heading h1 {
        font-size: 36px;
    }
    /* #endregion */


    /* #region 项目章节小导航 */
    .project-index {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 30px;
    }

    .project-index a {
        grid-template-columns: 24px 1fr;
        font-size: 9px;
    }

    .project-about h2 {
        max-width: 500px;
        font-size: 12px;
    }

    .project-credits {
        margin-top: 30px;
    }
    /* #endregion */

    /* #region 第一页*/
    .project-main {
        margin-left: 0;
    }

    .hero-panel {
        min-height: auto;
    }

    .intro-panel {
        min-height: auto;
        padding: 24px 20px 64px;
        grid-template-columns: 1fr;
        align-content: start;
        align-items: start;
    }

    .intro-text1,
    .intro-text2 {
        grid-column: 1;
    }

    .intro-text1 h2 {
        font-size: clamp(45px, 14vw, 82px);
    }

    .intro-text2 {
        max-width: 620px;
        margin-top: 32px;
        font-size: 12px;
    }

    .scroll-indicator {
        display: none;
    }
    /* #endregion */


    /* #region 第二页*/
    .section-content,
    .gallery-panel {
        padding-left: 20px;
        padding-right: 20px;
        
    }

    .image-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    /* #endregion */


    /* #region 灯箱*/
    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
    }

    .lightbox-close {
        top: 16px;
        right: 18px;
    }

    .lightbox-counter {
        left: 18px;
        bottom: 18px;
    }
    /* #endregion */

}

@media screen and (max-width: 560px) {


    /* #region 手机端导航 */
    .global-nav {
        padding: 10px 10px 10px 6px; 
        flex-wrap: wrap; /* 空间不足时自动换行，防组件溢出屏幕 */
        justify-content: space-between;
        align-items: center; 
    } 

    /* 手机端导航 LOGO 微调 */
        .nav-logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        }   
        :lang(zh-CN) .nav-logo a,
        :lang(en) .nav-logo a { 
        font-size: 8px; 
        letter-spacing: 1px; 
        margin-left: 0px; 
    }
    
    /*导航文字*/
        .nav-links { 
        display: flex !important; /* 强制保持原导航显示状态 */
        flex-wrap: wrap; 
        align-items: center;
        text-align: justify;
        }
        :lang(zh-CN) .nav-links a {
        font-size: 13px; 
        margin-left: 16px;
        }
        .nav-links  a {
        font-size: 12px;
        font-weight: 300; 
        margin-left: 8px;   
    }
   
      /* 语言按钮优化 */
        :lang(zh-CN) .lang-toggle {
        margin-left: 10px; 
        padding: 3px 10px; 
        font-size: 10px;
        }
        :lang(en) .lang-toggle {
        margin-left: 10px; 
        padding: 3px 8px; 
        font-size: 9px;
    }
    /* #endregion */

    
    /* #region 背景*/  .hero-background img {
        object-position: 55% center;
    }
    /* #endregion */


    /*  #region  sidebar */
     .project-sidebartext {

        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;

        z-index: 10;
        width: calc(100% - 32px);
        max-width: none;
        max-height: none;

        margin: 90px 16px 20px 16px ;
        padding: 24px 22px;

        overflow: visible;

        background: rgba(6, 6, 6, 0.029);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        /* 边框。*/
        border: 0px solid  rgba(255, 255, 255, 0.11);
        box-shadow: 0 25px 70px  rgba(0, 0, 0, 0);
    }

    .project-back {
    display: inline-block;
    margin-top: 48px;
    color: var(--soft-text);

    font-size: 9px;
    text-decoration: none;
    letter-spacing: 0.14em;

    transition:
        color 250ms ease,
        transform 250ms ease;
}

    /* #endregion */


    /* #region 第一页*/.project-about {
        max-width: 360px;
        font-size: 12px;
    }
    /* #endregion */

    
    /* #region 第二页*/ .section-heading h2,
    .gallery-heading h2 {
        font-size: clamp(44px, 16vw, 72px);
    }
    /* #endregion */


    /* #region 第三页*/  .gallery-item img {
        aspect-ratio: 2.1 / 1;
    }
    /* #endregion */

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* #endregion */
