/* 页面标题（项目、文章、关于） */
.page-header {
    padding: 160px 0 64px;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(36px, 6vw, 56px);
    margin-bottom: 16px;
    /* 让背景渐变适配文字宽度 */
    display: inline-block;
    background: linear-gradient(135deg, #ffffff, #8e9a98);
    /* 背景裁剪到文字 */
    background-clip: text;
    /* 兼容Chrome/Safari */
    -webkit-background-clip: text;
    /* 隐藏原文字色，显示渐变背景 */
    color: transparent;
}

.page-header p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* 筛选tab */
.filters-section {
    padding-bottom: 48px;
}

.filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border-radius: 50px;
    background-color: #252533;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #ffffff;
    background-color: #2d2d3d;
    transform: scale(1.05);
}

.filter-btn.active {
    background-color: #00ff88;
    color: #17171c;
}

/* 项目列表 */
.projects-section {
    padding-bottom: 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    /* 关键：取消网格行高强制，让行高自适应 */
    grid-auto-rows: auto;
}

.project-card {
    position: relative;
    background-color: #252533;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    /* 硬件加速 + 初始状态 */
    transform: translateZ(0);
    will-change: transform;
    /* 核心：默认显示状态 */
    display: flex;
    flex-direction: column;
    opacity: 1;
    height: auto;
}

/* 隐藏卡片的样式（完全脱离布局流） */
.project-card.filter-hidden {
    /* 关键：display: none 仅在动画结束后设置，避免闪烁 */
    display: none;
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    height: 0;
    padding: 0;
    margin: 0;
}

.project-card:hover {
    transform: translateY(-8px) translateZ(0);
}

.project-image {
    position: relative;
    height: 288px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease 0.1s;
    /* 延迟动画，避免冲突 */
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #252533, transparent);
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* 悬停箭头 */
.project-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.project-card:hover .project-arrow {
    opacity: 1;
    transform: scale(1);
}

.project-info {
    padding: 24px;
}

/* 项目标签 */
/* 项目标题容器（核心：flex布局） */
.project-title {
    display: flex;
    justify-content: space-between;
    /* 文字靠左，标签靠右 */
    align-items: center;
    /* 垂直居中对齐 */
    margin-bottom: 8px;
    /* 标题和正文的间距，保留原有值 */
    font-size: 18px;
    /* 你的原有字号，可调整 */
}

/* 项目标签（适配flex布局） */
.project-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    background-color: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    font-size: 12px;
    margin-bottom: 0;
    /* 取消原有底部间距 */
    /* 取消左侧间距，flex会自动让标签靠右 */
    margin-left: 8px;
    /* 仅留少量间距，避免标签贴紧文字 */
    white-space: nowrap;
    /* 标签文字不换行 */
}

.project-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.project-card:hover .project-info h3 {
    color: #00ff88;
}

.project-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.6;
}

/* 页脚样式 */
.footer-note {
    padding: 64px 0;
    background-color: #1a1a20;
}

.footer-note-content {
    text-align: center;
}

.footer-note-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    margin-bottom: 32px;
}

.footer-note-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 页脚按钮（炫酷版） */
.footer-note-link {
    padding: 12px 24px;
    border-radius: 8px;
    /* 核心：渐变背景 + 轻微发光边框 */
    background: linear-gradient(135deg, #252533 0%, #1a1a28 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 主题色微光边框 */
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    /* 字体加粗，更醒目 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* 丝滑过渡曲线 */
    position: relative;
    overflow: hidden;
    display: inline-block;
    /* 适配发光效果 */
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
    /* 初始轻微阴影 */
}

/* 按钮内部渐变光效（hover时显示） */
.footer-note-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

/* 按钮文字层级（避免被光效覆盖） */
.footer-note-link span {
    position: relative;
    z-index: 1;
}

/* Hover炫酷效果 */
.footer-note-link:hover {
    color: #ffffff;
    /* 渐变背景加深 + 主题色渗透 */
    background: linear-gradient(135deg, #2d2d3d 0%, #202030 100%);
    border-color: rgba(0, 255, 136, 0.4);
    /* 边框发光增强 */
    transform: translateY(-2px) scale(1.05);
    /* 上移+轻微缩放 */
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.15);
    /* 主题色发光阴影 */
}

/* Hover时光效流动 */
.footer-note-link:hover::before {
    left: 100%;
}