/* =========================================
   01. 设计规范基础设置 (Design Tokens)
========================================= */
:root {
    /* 色彩规范 */
    --color-text-main: #1D1D1F;
    --color-text-sub: #6E6E73;
    --color-bg: #F5F5F7;
    --color-accent: #0071E3;
    
    /* 间距系统 */
    --spacing-base: 8px;
    --spacing-section: 80px;
    --max-width: 1440px;
}

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

body {
    /* 字体规范：优先苹方，回退至无衬线字体 */
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: var(--color-text-main);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-text-sub);
}

/* =========================================
   02. 布局框架
========================================= */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    padding-bottom: 32px;
}

section {
    margin-bottom: var(--spacing-section);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    border-bottom: 1px solid #E5E5EA;
    padding-bottom: 16px;
}

.section-header h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

.section-header .view-all {
    font-size: 0.9rem;
    color: var(--color-text-sub);
}

/* =========================================
   03. 顶部导航 (Header)
========================================= */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    padding-bottom: 32px;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo span {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    font-weight: 300;
}

.site-nav {
    display: flex;
    gap: 32px;
}

.site-nav a {
    font-size: 0.95rem;
    font-weight: 400;
}

.site-nav a.active {
    border-bottom: 2px solid var(--color-text-main);
    padding-bottom: 4px;
}

/* =========================================
   04. 首屏大图 (Hero Banner)
========================================= */
.hero-section {
    margin-bottom: var(--spacing-section);
}

.hero-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9; /* 换成固定电影比例 */
    overflow: hidden;
    border-radius: 4px;
}

.hero-image-container img {
    width: 100%;
    object-fit: cover;
    /* 第一个值是左右（50%是居中），第二个值是上下。
       比如 30% 就是焦点偏上一点，70% 就是焦点偏下一点。
       你可以自己改数字试试！*/
    object-position: 50% 30%; 
}

.hero-text {
    position: absolute;
    top: 50%;
    right: 80px;
    transform: translateY(-50%);
    text-align: right;
    color: #1D1D1F; /* 根据背景图深浅可能需要调整这里的颜色 */
}

.hero-text h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.hero-text p {
    font-size: 1.1rem;
    color: #333;
    font-weight: 300;
}

/* =========================================
   05. 作品集 (Portfolio 2栏布局)
========================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.portfolio-item img {
    width: 100%;
    aspect-ratio: 16/9; /* 强制统一横版比例，避免参差不齐 */
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 12px;
}

.item-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.item-info h5 {
    font-size: 1rem;
    font-weight: 500;
}

.item-info span {
    font-size: 0.85rem;
    color: var(--color-text-sub);
}

/* =========================================
   09. 还原设计稿的“关于我”页面 (Modern About)
========================================= */
.about-modern-grid {
    display: grid;
    /* 左侧图片占大头，右侧文字占小头，高度贴合设计稿比例 */
    grid-template-columns: 1.1fr 1fr; 
    gap: 100px; /* 巨大的左右留白，提升呼吸感 */
    padding: 60px 40px 100px 40px; /* 补齐左右40px的边距，与页头对齐 */
    align-items: start;
}

/* 左侧图片组排版 */
.about-visuals img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

.portrait-img {
    aspect-ratio: 3/4;
    object-fit: cover;
    margin-bottom: 40px; /* 两张照片之间的上下间距 */
}

.landscape-img {
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* 右侧文字排版 */
.section-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-text-main);
}

.greeting {
    font-size: 2.8rem; /* 超大字号冲击力 */
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.bio-desc {
    font-size: 1.05rem;
    color: var(--color-text-sub);
    line-height: 1.8;
    margin-bottom: 60px;
    max-width: 90%;
}

.style-section {
    margin-bottom: 40px;
}

.style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 0.95rem;
    color: var(--color-text-sub);
}

.separator {
    border: none;
    border-top: 1px solid #E5E5EA;
    margin: 40px 0;
}

.equipment-section {
    margin-top: 40px;
}

.eq-grid {
    display: grid;
    /* 左边分类名固定宽度 80px，右边内容自动拉伸 */
    grid-template-columns: 80px 1fr; 
    row-gap: 16px;
    font-size: 0.95rem;
}

.eq-key {
    color: var(--color-text-sub);
}

.eq-val {
    color: var(--color-text-main);
}

/* 手机端适配：改为上下结构 */
@media (max-width: 900px) {
    .about-modern-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 40px 20px;
    }
    .greeting {
        font-size: 2.2rem;
    }
}

/* =========================================
   07. 页脚 (Footer)
========================================= */
.site-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    padding-bottom: 40px;
    border-top: 1px solid #E5E5EA;
    margin-top: var(--spacing-section);
}

.copyright {
    font-size: 0.85rem;
    color: var(--color-text-sub);
}

.social-links {
    display: flex;
    gap: 24px;
}

.social-links a {
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* =========================================
   08. 响应式适配 (移动端)
========================================= */
@media (max-width: 900px) {
    .site-header, main, .site-footer { padding: 0 20px; }
    
    .portfolio-grid { grid-template-columns: 1fr; } /* 移动端改为单列 */
    
    .about-content { grid-template-columns: 1fr; gap: 32px; }
    
    .hero-text { right: 20px; text-align: left; left: 20px; }
    
    .hero-text h2 { font-size: 2rem; }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

/* 强制修复首页左右贴边的问题，对齐二级页面 */
.site-header, 
main,
.site-footer {
    max-width: 1200px;   /* 限制网页内容的最大宽度 */
    margin: 0 auto;      /* 让整体内容在浏览器里居中 */
    padding-left: 40px;  /* 强制左边留白 */
    padding-right: 40px; /* 强制右边留白 */
    box-sizing: border-box;
}

/* 针对手机端稍微把留白缩小一点，避免屏幕太挤 */
@media (max-width: 768px) {
    .site-header, 
    main,
    .site-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =========================================
   10. 全局图片加载动画 (Image Load Animations)
   注意：这些动画会在页面加载时播放
========================================= */

/* 定义从下往上渐变动画关键帧 */
@keyframes slideInFromBottom {
    0% {
        transform: translateY(30px); /* 初始位置：向下偏移30px */
        opacity: 0;                  /* 初始透明度：完全透明 */
    }
    100% {
        transform: translateY(0);    /* 最终位置：原位对齐 */
        opacity: 1;                  /* 最终透明度：完全不透明 */
    }
}

/* 应用动画到所有作品集列表图片 (portfolio.html) */
.portfolio-item img {
    animation: slideInFromBottom 0.8s ease-out; /* 【修改这里】持续时间0.8秒，缓动函数 */
    animation-fill-mode: forwards;             /* 动画结束后保持最终状态（可见且对齐） */
    opacity: 0;                                 /* 【核心步骤】初始设为透明，防止加载瞬间闪烁 */
}

/* 应用动画到“关于我”页面图片 (about.html - 竖图和横图) */
.portrait-img,
.landscape-img {
    animation: slideInFromBottom 0.8s ease-out; /* 持续时间和缓动与作品集保持一致 */
    animation-fill-mode: forwards;             /* 保持最终状态 */
    opacity: 0;                                 /* 【核心步骤】初始设为透明，防止闪烁 */
}

/* =========================================
   修复补丁：恢复首页的“关于我”模块样式 
   (仅对 index.html 生效，不影响二级页面)
========================================= */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* 经典的 1:2:1 三栏排版 */
    gap: 48px;
    align-items: start;
}

.about-avatar img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 2px;
}

.about-text h4 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--color-text-main);
}

.about-text p {
    font-size: 1rem;
    color: var(--color-text-sub);
    margin-bottom: 24px;
    max-width: 90%;
    line-height: 1.6;
}

.about-text .learn-more {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
}

.about-specs {
    display: flex;
    gap: 48px;
}

.spec-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-col span {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    margin-bottom: 8px;
}

.spec-col strong {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-main);
}

/* 首页关于我模块：手机端适配 */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}


/* 统一全站手机端高清放大标准 */
@media screen and (max-device-width: 850px) {
    /* 导航与Logo */
    .logo h1 { font-size: 2.2rem !important; }
    .logo-img { width: 50px !important; height: 50px !important; }
    .site-nav a { font-size: 1.5rem !important; }

    /* 各页面大标题 */
    .section-header h3, .page-header h2, .greeting { 
        font-size: 2.8rem !important; 
    }
    
    /* 正文与描述 */
    .hero-text p, .page-header p, .bio-desc, .about-text p { 
        font-size: 1.4rem !important; 
    }

    /* 照片下方信息 */
    .item-info h5, .photo-card-title, .photo-title { 
        font-size: 1.8rem !important; 
    }
    .item-info span, .photo-card-meta, .photo-meta { 
        font-size: 1.2rem !important; 
    }

    /* 页脚 */
    .copyright, .social-links a { font-size: 1.2rem !important; }
}

/* =========================================
   首页视频背景增强
   ========================================= */
.hero-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9; /* 保持和你之前图片一样的电影比例 */
    overflow: hidden;
    border-radius: 4px;
    background-color: #000; /* 视频加载前的底色 */
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 核心：确保视频裁切填充，不留黑边 */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* 确保文字在视频之上，并且清晰易读 */
.hero-text {
    position: absolute;
    top: 50%;
    right: 80px;
    transform: translateY(-50%);
    text-align: right;
    z-index: 2; /* 确保层级高于视频 */
    color: #FFFFFF; /* 动态视频背景下，白色通常更显眼 */
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* 给文字加点阴影，防止被明亮的画面遮盖 */
}

/* 页脚自定义图标样式 */
.footer-logo {
    width: 32px;          /* 从原来的 20px 调大到 28px，你可以根据感觉继续改数字 */
    height: 32px;         
    vertical-align: middle;
    margin-right: 12px;   /* 图标之间的间距稍微拉开一点，更透气 */
    border-radius: 4px;   
    object-fit: cover;
    transition: transform 0.3s ease; /* 增加一个顺滑的过渡动画 */
}

/* 增加高级感：鼠标悬停时图标微微放大 */
.footer-logo:hover {
    transform: scale(1.15); 
}

/* 手机端适配：可以稍微再大一点点，方便手指点击 */
@media screen and (max-device-width: 850px) {
    .footer-logo {
        width: 36px;
        height: 36px;
        margin-right: 16px;
    }
}



.portfolio-wrapper {
    position: relative;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
    display: none; /* 加这一行 */
}
