/* 1. 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 彻底解决 About 出界问题 */
}

html {
    /* 使用邻近吸附，防止切换项目时产生大幅度误跳 */
    scroll-snap-type: y proximity; 
    scroll-behavior: smooth;
    height: auto;
}

body {
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

html, body {
    height: auto; /* 从 100% 改为 auto，允许页面随内容撑开 */
    margin: 0;
    background-color: #000;
}

/* 给每个大 Section 明确吸附起点 */
.hero-section {
    scroll-snap-align: start; /* 保留 Hero 的吸附，保证开屏感 */
}

#projects {
    /* 只让项目区的“开头”有吸附感，这样从 Hero 滑下来会停住 */
    scroll-snap-align: start; 
    /* 增加一个较大的偏移量，防止它和下方的 About 离得太近触发误吸 */
    scroll-margin-top: 100px; 
}

/* 3. ✅ 彻底释放 About */
.about-section {
    scroll-snap-align: none !important; /* 强制关掉 About 的对齐 */
    scroll-margin-top: 0;
}
/* 2. 字体定义 - 确保路径和你文件夹一致 */
@font-face {
    font-family: 'SFPro-Heavy';
    src: url('./font/SFPRODISPLAYHEAVYITALIC.OTF');
}
@font-face {
    font-family: 'SFPro-Medium';
    src: url('./font/SFPRODISPLAYMEDIUM.OTF');
}

/* 3. 导航栏 */
/* 修改 3. 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 60px; /* 稍微缩小一点高度，更精致 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    /* --- 添加下面这两行 --- */
    background: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
    backdrop-filter: blur(10px);    /* 磨砂效果 */
}

/* 左侧名字 Logo 的样式 */
.nav-logo {
    color: white;
    text-decoration: none;
    font-family: 'SFPro-Heavy'; /* 使用你的 Heavy 粗体 */
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.nav-logo:hover {
    opacity: 0.7;
}

/* 确保右侧链接的 margin-left 依然生效 */
.nav-links {
    display: flex;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 40px; /* 链接之间的间距 */
    font-family: 'SFPro-Medium';
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* 修改 4. Hero 区域 */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    /* --- 添加下面这一行 --- */
    transition: opacity 0.2s ease-out; 
}

/* 针对 Hero 内容的容器 */
.hero-content {
    will-change: opacity, transform; /* 性能优化 */
}

.main-name {
    font-family: 'SFPro-Heavy';
    font-size: 12vw;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -3px;
    margin-bottom: 20px;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: #aaa;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 28px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    transition: 0.3s;
    background: rgba(255,255,255,0.05);
}

.btn:hover {
    background: white;
    color: black;
}

.dive-in {
    position: absolute;
    bottom: 40px;
    font-size: 10px;
    letter-spacing: 3px;
}

/* 在 Hero 区域样式附近添加 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
    animation: bounce 2s infinite; /* 跳动动画 */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 5. About 区域 (Origin Story) */
.about-section {
    min-height: 100vh;
    padding: 100px 10%;
    background: #000;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 左图右文 */
    gap: 80px;
    align-items: start;
}

/* 修改图片本身的尺寸 */
.about-image img {
    width: 100%;        /* 宽度占满父容器 */
    max-width: 600px;   /* ✅ 核心修改：设置一个你觉得合适的最大宽度 */
    height: auto;       /* 保持比例 */
    border-radius: 15px;
    border: 1px solid #333;
    display: block;     /* 消除图片底部间隙 */
}

/* 如果你希望图片在左侧区域居中显示 */
.about-image {
    display: flex;
    justify-content: center; 
    align-items: flex-start; /* 靠上对齐 */
}

.serif-title {
    font-family: "SFPro-Medium", serif; /* 衬线体 */
    font-size: 4rem;
    font-style: italic;
    margin-bottom: 10px;
}

.divider {
    width: 60px;
    height: 3px;
    background: #7a7adb; /* 加一点参考图的淡紫色 */
    margin-bottom: 30px;
}

.description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 50px;
}

.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #7a7adb;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9rem;
    color: #888;
}

/* ...保留之前的样式，在末尾添加以下内容... */

/* 1. 首页进入时的淡入升起动画 */
.fade-in-up {
    animation: fadeInUp 1.2s ease-out forwards;
}

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

/* 2. 确保 About 页面有足够的空间 */
.about-section {
    padding-top: 150px; /* 留出导航栏的高度 */
    min-height: 100vh;
    background: #000;
}

/* 导航栏高亮效果 */
.nav-links a.active {
    opacity: 1;
    border-bottom: 1px solid white;
    padding-bottom: 5px;
}

/* 针对一屏页面的处理 */
html, body {
    height: 100%;
    margin: 0;
    background-color: #000;
}

/* 移除默认下划线，设置颜色 */
.about-link {
    color: #888; /* 默认灰色，与 Toolbox 文字一致 */
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

/* 悬停时的交互效果 */
.about-link:hover {
    color: #7a7adb; /* 变成你作品集标志性的紫色 */
    transform: translateX(3px); /* 轻轻向右移动一点，增加灵动感 */
}

/* ==========================================
   ABOUT SECTION MOBILE (手机端图片置顶版)
   ========================================== */
@media (max-width: 900px) {
    /* 1. 将网格布局改为垂直堆叠 */
    .about-grid {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* 保持左对齐，符合你的 Clean 审美 */
        gap: 15px; /* 图片和文字之间的间距 */

    }

    /* 2. 调整图片容器 */
    .about-image {
        width: 100%;
        max-width: 350px; /* 手机端图片不需要太大，保持精致感 */
        margin-bottom: 10px;
    }

    .about-image img {
        width: 100%;
        height: auto;
        border-radius: 12px; /* 延续你的设计风格 */
    }

    /* 3. 解决“标题好大”的问题 */
    .about-text .serif-title {
        font-size: 2.2rem !important; /* 强制减小字号 */
        line-height: 1.1;
        margin-bottom: 10px;
        font-style: italic; /* 延续 Y2K 斜体美感 */
        text-align: left;
    }

    /* 4. 调整分割线和描述文字 */
    .divider {
        width: 40px;
        height: 2px;
        background: #555;
        margin-bottom: 20px;
    }

    .description {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #bbb; /* 略微调暗以突出重点 */
    }

    /* 5. 信息卡片改为更紧凑的排列 */
    .info-cards {
        display: grid;
        grid-template-columns: 1fr; /* 手机端单列显示卡片 */
        gap: 20px;
        margin-top: 30px;
    }

    .card h3 {
        font-size: 0.8rem;
        margin-bottom: 8px;
        color: #7a7adb; /* 使用点缀色突出类别 */
    }

    .card p {
        font-size: 0.85rem;
        color: #999;
    }
}