@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;0,900;1,400&display=swap');

/* 基础重置与排版 */
body {
    margin: 0;
    background-color: #ffffff;
    font-family: 'Inter', 'Microsoft YaHei', sans-serif;
    color: #000;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 磨砂玻璃视觉层 */
.nav-glass-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.2) 70%, transparent 100%);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    z-index: 100;
    pointer-events: none;
}

.nav-glass-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.2) 70%, transparent 100%);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
    mask-image: linear-gradient(to top, black 60%, transparent 100%);
    z-index: 100;
    pointer-events: none;
}

/* 导航层 */
.interactive-layer {
    position: fixed;
    width: 100%;
    padding: 2rem;
    z-index: 101;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none; 
}

.nav-link, .footer-link {
    transition: opacity 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: black;
    font-weight: 700;
    pointer-events: auto; 
}
.nav-link:hover, .footer-link:hover { opacity: 0.5; }

/* 页面状态切换动画 */
.page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.99);
}

.page.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* 首页打字机光标 */
#home-typing-text { font-style: italic; font-weight: 400; letter-spacing: 0.05em; }
.typing-cursor { display: inline-block; width: 1px; height: 1.1em; background-color: black; margin-left: 2px; vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { from, to { background-color: transparent } 50% { background-color: black } }

/* 滚动区域 */
.exp-scroll-area {
    height: 100vh; 
    width: 100%;
    overflow-y: auto;
    padding-top: 180px;
    padding-bottom: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 150px, black calc(100% - 150px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 150px, black calc(100% - 150px), transparent 100%);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.content-wrapper { width: 100%; max-width: 1200px; padding: 0 4rem; }

/* 响应式适配 (手机端) */
@media (max-width: 768px) {
    .content-wrapper { padding: 0 2rem; }
    .exp-scroll-area { padding-top: 120px; padding-bottom: 120px; }
}

/* =======================================================
   Masonry 瀑布流组件专属样式
   ======================================================= */
.masonry-item {
    position: absolute;
    will-change: transform, width, height, opacity;
    padding: 10px; /* 控制瀑布流图片之间的间距 */
    box-sizing: border-box; /* 确保 padding 不会破坏宽度计算 */
    top: 0;
    left: 0;
    z-index: 1;
}

.masonry-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background-color: #f3f4f6; /* 图片加载前的底色 */
    transition: box-shadow 0.3s ease;
}

.masonry-item-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
}

.masonry-item:hover {
    z-index: 10;
}

.masonry-item:hover .masonry-item-inner {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}
/* =======================================================
   Masonry 瀑布流组件专属样式 (纯 CSS 终极防弹版)
   ======================================================= */
#masonry-gallery {
    column-count: 2;
    column-gap: 20px;
    width: 100%;
}

@media (min-width: 768px) { #masonry-gallery { column-count: 3; } }
@media (min-width: 1024px) { #masonry-gallery { column-count: 4; } }
@media (min-width: 1500px) { #masonry-gallery { column-count: 5; } }

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    width: 100%;
    /* 关键：彻底干掉之前的绝对定位 */
    position: relative !important; 
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

.masonry-item-inner {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background-color: #f3f4f6;
    transition: box-shadow 0.3s ease;
    font-size: 0; /* 消除底部的幽灵空白 */
}

.masonry-item-img {
    width: 100%;
    height: auto !important;
    display: block;
    object-fit: cover;
}

.masonry-item:hover { z-index: 10; }
.masonry-item:hover .masonry-item-inner { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); }

