/* ================================================================
   个人工具集 - 公共样式文件
   ================================================================ */

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

:root {
    --bg-root: #080B12;
    --bg-surface: #0F1219;
    --bg-card: #141820;
    --bg-elevated: #1A1F2A;

    --border: #1E2330;
    --border-hover: #2C3244;

    --text-1: #E8ECF4;
    --text-2: #A0A8BD;
    --text-3: #6B7289;
    --text-4: #454C60;

    --accent: #00D4AA;
    --accent-dim: #00D4AA18;
    --accent-glow: #00D4AA30;
    --accent-soft: #00D4AA0C;

    --font-h: 'Sora', sans-serif;
    --font-b: 'DM Sans', sans-serif;
    --font-c: 'JetBrains Mono', monospace;

    --r-s: 6px;
    --r-m: 10px;
    --r-l: 14px;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --dur: 0.3s;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-b);
    background: var(--bg-root);
    color: var(--text-1);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

::selection {
    background: var(--accent-dim);
    color: var(--accent);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ---- Layout ---- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---- Header ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 11, 18, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-1);
    cursor: pointer;
}

.logo-symbol {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), #009980);
    border-radius: var(--r-s);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-c);
    font-size: 13px;
    font-weight: 700;
    color: #080B12;
}

.logo-text {
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-b);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 100px;
    transition: all var(--dur) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-1);
    background: var(--bg-elevated);
}

.back-link {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-3);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 100px;
    transition: all var(--dur) var(--ease);
}

.back-link:hover { color: var(--text-1); background: var(--bg-elevated); }

/* ---- Hero Section ---- */
.hero {
    padding: 80px 0 56px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -100px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-glow);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-family: var(--font-h);
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--accent), #00F0C0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 18px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ---- Section ---- */
.section {
    padding: 64px 0 80px;
    border-top: 1px solid var(--border);
}

.section-eyebrow {
    font-family: var(--font-c);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-h);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 560px;
}

/* ---- Stats Bar ---- */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 48px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stats-num {
    font-family: var(--font-h);
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.04em;
    line-height: 1;
}

.stats-lbl {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 6px;
}

/* ---- Footer ---- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-symbol {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent), #009980);
    border-radius: var(--r-s);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-c);
    font-size: 11px;
    font-weight: 700;
    color: #080B12;
}

.footer-name {
    font-family: var(--font-h);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.footer-role {
    font-size: 12px;
    color: var(--text-4);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.footer-links a:hover { color: var(--accent); }

.footer-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up {
    animation: fadeUp 0.5s var(--ease) both;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.06s; }
.stagger > *:nth-child(3) { transition-delay: 0.12s; }
.stagger > *:nth-child(4) { transition-delay: 0.18s; }
.stagger > *:nth-child(5) { transition-delay: 0.24s; }
.stagger > *:nth-child(6) { transition-delay: 0.30s; }

/* ---- Particle Canvas ---- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .container { padding: 0 18px; }
    .nav-links { display: none; }
    .hero { padding: 56px 0 40px; }
    .section { padding: 48px 0 56px; }
    .stats-bar { flex-direction: column; gap: 20px; }
    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
