/* f:/cloudflare/备案/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --bg-color: #0f172a;
    /* 深色科技感背景 */
    --surface: rgba(30, 41, 59, 0.7);
    /* 玻璃滤镜面板 */
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-hover-y: -6px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, "Noto Sans SC", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 动态背景光晕特效 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 35%);
    z-index: -1;
    pointer-events: none;
}

/* ----- 导航栏 Navbar ----- */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-speed) ease;
}

.nav-scrolled {
    padding: 0.8rem 5%;
    border-bottom-color: var(--surface-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-speed);
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width var(--transition-speed) ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ----- 布局容器 ----- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex: 1;
    width: 100%;
}

/* ----- 动效与微交互 ----- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* ----- 通用排版样式 ----- */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
}

h2.section-title::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(to right, var(--surface-border), transparent);
}

/* ----- 按钮与标签 ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.tag {
    display: inline-block;
    background: var(--primary-light);
    color: #60a5fa;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ----- V2 新增组件: 统计卡片 (Stats Grid) ----- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
    width: 100%;
}

.stat-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.3);
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- V2 新增组件: 富图文项目卡片 (Feature Project Cards) ----- */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-light);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(var(--card-hover-y));
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(59, 130, 246, 0.15);
}

.project-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-bottom: 1px solid var(--surface-border);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.project-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-border);
}

.project-links a {
    color: var(--text-secondary);
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    text-decoration: none;
}

.project-links a:hover {
    color: #60a5fa;
}

/* ----- V2 新增组件: 技术栈进度条模块 (Tech Modules) ----- */
.tech-section {
    margin-bottom: 4rem;
}

.tech-section h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-list {
    display: grid;
    gap: 1.5rem;
    background: rgba(30, 41, 59, 0.3);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--surface-border);
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
}

.skill-bar-container {
    width: 100%;
    height: 8px;
    background: #0f172a;
    border-radius: 999px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #a78bfa);
    border-radius: 999px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-bar.visible {
    transform: scaleX(1);
}

.quote-box {
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    margin-top: 2rem;
    font-style: italic;
    color: #cbd5e1;
}

/* ----- V2 新增组件: 接触表单与社交矩阵 (Contact) ----- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.social-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(30, 41, 59, 0.4);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.social-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateY(-3px);
}

.social-card svg {
    stroke: #60a5fa;
}

/* ----- 底部合规 Footer ----- */
footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    margin-top: auto;
    background: rgba(15, 23, 42, 0.8);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.beian-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.beian-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ----- 响应式适配 ----- */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
        border-bottom: 1px solid var(--surface-border);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links a {
        padding: 1.2rem 2rem;
        display: block;
        text-align: center;
        width: 100%;
    }

    .nav-links a::after {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 2rem 1.5rem;
    }
}