/* =====================================================================
   Keeeer 主站全局样式 - 全屏粒子动效风 / 深色暖调
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* 配色 */
    --bg: #0a0a0f;
    --bg-elev: #12121a;
    --card: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e8e8ed;
    --text-dim: #9ca3af;
    --text-mute: #6b7280;
    --accent: #ff6b35;
    --accent-2: #ffa566;
    --accent-3: #f7c948;
    --accent-grad: linear-gradient(135deg, #ff6b35 0%, #ffa566 100%);
    --shadow-glow: 0 0 40px rgba(255, 107, 53, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* 尺寸 */
    --nav-h: 70px;
    --max-w: 1200px;
    --radius: 14px;
    --radius-sm: 8px;

    /* 字体 */
    --font-display: 'Space Grotesk', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* ---------- 背景层（粒子 canvas 挂载点） ---------- */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 107, 53, 0.10), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(247, 201, 72, 0.06), transparent 45%);
}

/* ---------- 布局容器 ---------- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

main {
    position: relative;
    z-index: 1;
}

section {
    padding: 100px 0;
}

/* ---------- 排版 ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-dim);
    font-size: 1.05rem;
    margin-bottom: 56px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
    display: inline-block;
}

.gradient-text {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-2);
    transform: translateY(-2px);
}

/* ---------- 玻璃卡片（通用） ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.card:hover {
    background: var(--card-hover);
    border-color: var(--border-strong);
    transform: translateY(-4px);
}

/* ---------- 标签胶囊（技术栈） ---------- */
.tag {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(255, 107, 53, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.2);
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin: 4px 4px 0 0;
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(255, 107, 53, 0.16);
    border-color: var(--accent);
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--border);
}

.nav-container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-logo .dot {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    position: relative;
    padding: 8px 14px;
    font-size: 0.92rem;
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: var(--accent-2);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    background: var(--accent-grad);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.hamburger .bar {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 移动端遮罩 ---------- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.nav-overlay.show {
    display: block;
    opacity: 1;
}

/* ---------- 页脚 ---------- */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 36px 0;
    text-align: center;
    color: var(--text-mute);
    font-size: 0.88rem;
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(10px);
}

footer .accent {
    color: var(--accent-2);
}

/* ---------- 滚动渐入动画 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* ---------- 选择/滚动条 ---------- */
::selection {
    background: rgba(255, 107, 53, 0.35);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.5);
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 860px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 78%;
        max-width: 320px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        padding: 40px;
        background: rgba(18, 18, 26, 0.96);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border);
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu .nav-link {
        font-size: 1.1rem;
        padding: 12px 0;
        width: 100%;
    }

    .nav-link.active::after {
        left: 0;
        right: auto;
        width: 30px;
    }

    .hamburger {
        display: flex;
    }

    section {
        padding: 70px 0;
    }

    .card {
        padding: 24px;
    }
}

/* ---------- 无障碍：尊重 reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
