
*, *::before, *::after {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;  /* 确保所有元素都使用 Inter */
}


html {
    scroll-behavior: smooth;  /* 平滑滚动 */
}

html, body {
    margin: 0;
    padding: 0;
}

/* 页面切换动画 */
@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    background-color: #f7f7f7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: pageFadeIn 0.4s ease-in-out;
}


.section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-nav {
    padding-top: 80px;
    padding-bottom: 0;
}

/* 为有 id 的 section 设置 scroll-margin，确保锚点跳转位置正确 */
#about,
#projects,
#contact {
    scroll-margin-top: 80px;  /* 补偿 section 的 padding-top */
}

.section-last {
    padding-bottom: 0 !important;  /* 最后一个 section 底部没有 padding */
    margin-bottom: 0 !important;   /* 确保没有 margin */
}

.container {
    margin: 0 160px;  
    display: flex;
    justify-content: flex-start; 
}

.project-section-container {
    flex-direction: column;
}

.nav-container {
    display: flex;
    gap: 32px;
    justify-content: flex-start;
}

.nav-button {
    background-color: transparent;
    width: fit-content; 
    height: fit-content;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;  /* 移除链接下划线 */
    color: inherit;  /* 继承文字颜色 */
    cursor: pointer;  /* 鼠标指针样式 */
}

.nav-button:hover {
    text-decoration: underline;
}

.nav-font {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.04em;
}


.hero {
    display: flex;
    flex-direction: column;  
    gap: 20px;  
}

/* 项目页：主标题与右侧 caption 同一行、对齐 */
.hero-title-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-title {
    font-size: 36px;
    font-weight: 550;  /* semi-bold */
    letter-spacing: -0.04em;
    margin: 0;  /* 移除默认 margin */
}

.hero-caption {
    font-size: 20px;
    font-weight: 400;
    color: #878787;
    letter-spacing: -0.04em;
    margin: 0;
    flex-shrink: 0;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin: 0;  /* 移除默认 margin */
    letter-spacing: -0.04em;
}

.hero-text {
    font-size: 16px;
    font-weight: 300;
    margin: 0;  /* 移除默认 margin */
    line-height: 1.5;
    letter-spacing: -0.04em;
}

.project-container {
    display: grid;
    gap: 16px;
    width: 100%; 
}

/* 包含featured和featured-secondary卡片的容器：7:5的比例 */
.project-container:has(.project-card-featured) {
    grid-template-columns: 7fr 5fr;
}

/* 包含三个normal卡片的容器：三等分 */
.project-container:has(.project-card-normal):not(:has(.project-card-featured)) {
    grid-template-columns: repeat(3, 1fr);
}

.project-card-featured {
    display: flex;
    flex-direction: column;  
    height: 400px;
    border: 1px solid #E5E7EB;
    padding: 16px;
    border-radius: 16px;
    justify-content: flex-start;
    gap: 8px;
    text-decoration: none;  /* 移除链接下划线 */
    color: inherit;  /* 继承文字颜色 */
    cursor: pointer;  /* 鼠标指针样式 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;  /* 添加过渡效果 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 使用伪元素实现平滑的背景图片切换 */
.project-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--hover-bg-image, url('path/to/your/image.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
    z-index: 0;
}

.project-card-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card-featured:hover::before {
    opacity: 1;
}

/*
.project-card-featured:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);  
    z-index: 0;
    border-radius: 16px;
}
*/

.project-card-featured .card-title,
.project-card-featured .card-subtitle {
    position: relative;
    z-index: 1;  /* 确保文字在遮罩层之上 */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-card-featured:hover .card-title {
    transform: translateY(-2px);
}

.project-card-featured:hover .card-subtitle {
    opacity: 0.9;
}

.project-card-featured-secondary {
    display: flex;
    height: 400px;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 16px;
    border-radius: 16px;
    justify-content: flex-start;
    gap: 8px;
    flex-direction: column;
    text-decoration: none;  /* 移除链接下划线 */
    color: inherit;  /* 继承文字颜色 */
    cursor: pointer;  /* 鼠标指针样式 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;  /* 添加过渡效果 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 使用伪元素实现平滑的背景图片切换 */
.project-card-featured-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--hover-bg-image, url('path/to/your/image.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
    z-index: 0;
}

.project-card-featured-secondary:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card-featured-secondary:hover::before {
    opacity: 1;
}

/*
.project-card-featured-secondary:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: 0;
    border-radius: 16px;
}
*/

.project-card-featured-secondary .card-title,
.project-card-featured-secondary .card-subtitle {
    position: relative;
    z-index: 1;  /* 确保文字在遮罩层之上 */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-card-featured-secondary:hover .card-title {
    transform: translateY(-2px);
}

.project-card-featured-secondary:hover .card-subtitle {
    opacity: 0.9;
}


.project-card-normal {
    display: flex;
    height: 400px;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 16px;
    border-radius: 16px;
    justify-content: flex-start;
    gap: 8px;
    flex-direction: column;
    text-decoration: none;  /* 移除链接下划线 */
    color: inherit;  /* 继承文字颜色 */
    cursor: pointer;  /* 鼠标指针样式 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;  /* 添加过渡效果 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 使用伪元素实现平滑的背景图片切换 */
.project-card-normal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--hover-bg-image, url('path/to/your/image.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
    z-index: 0;
}

.project-card-normal:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card-normal:hover::before {
    opacity: 1;
}

/*
.project-card-normal:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 0;
    border-radius: 16px;
}
*/


.project-card-normal .card-title,
.project-card-normal .card-subtitle {
    position: relative;
    z-index: 1;  /* 确保文字在遮罩层之上 */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-card-normal:hover .card-title {
    transform: translateY(-2px);
}

.project-card-normal:hover .card-subtitle {
    opacity: 0.9;
}


.project-card-gap {
    height: 16px;
}

.project-title {
    font-size: 20px;
    font-weight: 400;
    margin: 0;  
    letter-spacing: -0.04em;
}

.card-title {
    font-size: 16px;
    font-weight: 400;
    margin: 0;   
}

.card-subtitle {
    font-size: 14px;
    font-weight: 300;
    margin: 0;
    color: #878787;
}

.connect-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.connect-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    flex-shrink: 0;
}

.connect-logo svg {
    width: 100%;
    height: 100%;
}

.connnect-text {
    font-size: 16px;
    font-weight: 300px;
}

.connect-button {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    text-decoration: none;  /* 移除链接下划线 */
    color: inherit;  /* 继承文字颜色 */
    cursor: pointer;  /* 鼠标指针样式 */
}

.connect-container {
    display: flex;
    gap: 16px;
    flex-direction: column;
}

.footer-container {
    display: flex;
    justify-content: center;
}

.footer-text {
    font-size: 14px;
    font-weight: 300;
    margin: 0;
    color: #878787;
    
}

