/* ============================================
   赛博朋克终端风格博客 - 样式表
   ============================================ */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-card-hover: #1e2538;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.1);
    --accent-secondary: #00d4ff;
    --danger: #ef4444;
    --warning: #fbbf24;
    --success: #22c55e;
    --border: #1e293b;
    --border-light: #2d3748;
    --font-mono: 'Fira Code', 'Cascadia Code', monospace;
    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent: #059669;
    --accent-dim: rgba(5, 150, 105, 0.08);
    --accent-secondary: #0284c7;
    --border: #e2e8f0;
    --border-light: #cbd5e0;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: var(--transition);
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-secondary); }

/* 粒子 */
#particles, #matrix { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#matrix { z-index: 0; opacity: 0.06; }
[data-theme="light"] #matrix { opacity: 0.03; }

/* 导航 */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}
[data-theme="light"] .navbar { background: rgba(255, 255, 255, 0.9); }
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }
.nav-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 1.2rem; font-weight: 600; color: var(--accent); }
.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-link { color: var(--text-secondary); padding: 0.5rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.9rem; transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-dim); }
.nav-icon { margin-right: 0.3rem; }
.theme-toggle {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem; cursor: pointer; font-size: 1.1rem; transition: var(--transition); margin-left: 0.5rem;
}
.theme-toggle:hover { border-color: var(--accent); transform: scale(1.1); }
.mobile-menu-btn {
    display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 1.3rem; padding: 0.3rem 0.6rem; cursor: pointer;
}
.mobile-menu { display: none; position: fixed; top: 60px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); z-index: 999; padding: 1rem; }
.mobile-menu.active { display: block; }
.mobile-link { display: block; color: var(--text-secondary); padding: 0.8rem 1rem; border-radius: var(--radius-sm); transition: var(--transition); }
.mobile-link:hover { color: var(--accent); background: var(--accent-dim); }

/* Hero */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6rem 2rem 2rem; position: relative; z-index: 1; }
.terminal-window {
    width: 100%; max-width: 700px;
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 255, 136, 0.05);
}
.terminal-header { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid var(--border); }
[data-theme="light"] .terminal-header { background: rgba(0, 0, 0, 0.03); }
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.terminal-title { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.terminal-body { padding: 1.5rem; }
.terminal-line { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 1rem; }
.prompt { color: var(--accent); font-weight: 600; }
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
.terminal-output { margin-top: 1rem; }
.output-line { font-family: var(--font-mono); font-size: 0.9rem; padding: 0.2rem 0; color: var(--text-secondary); opacity: 0; animation: fadeInLine 0.3s ease forwards; }
.output-line .highlight { color: var(--accent); }
.output-line .accent { color: var(--accent-secondary); }
.output-line .warning { color: var(--warning); }
.output-line .love { color: #ff6b9d; }
@keyframes fadeInLine { to { opacity: 1; } }
.hero-subtitle { margin-top: 2rem; font-size: 1.1rem; color: var(--text-secondary); text-align: center; min-height: 2em; }
.typed-cursor { display: inline-block; width: 2px; height: 1.2em; background: var(--accent); margin-left: 2px; vertical-align: text-bottom; animation: blink 1s step-end infinite; }
.scroll-indicator { position: absolute; bottom: 2rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.8rem; animation: float 2s ease-in-out infinite; }
.mouse { width: 24px; height: 38px; border: 2px solid var(--text-muted); border-radius: 12px; position: relative; }
.wheel { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scroll 1.5s ease-in-out infinite; }
@keyframes scroll { 0%, 100% { opacity: 1; top: 6px; } 50% { opacity: 0.3; top: 18px; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Section */
.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-family: var(--font-mono); font-size: 1.5rem; color: var(--accent); display: inline-flex; align-items: center; gap: 0.5rem; }
.title-icon { font-size: 1.3rem; }
.title-decoration { width: 60px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-secondary)); margin: 1rem auto 0; border-radius: 2px; }

/* 文章 */
.post-filters { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-btn { padding: 0.5rem 1.2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: var(--transition); }
.filter-btn:hover, .filter-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 1.5rem; }
.post-card { position: relative; border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.post-card.hidden { display: none; }
.post-card-glow { position: absolute; inset: -1px; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); opacity: 0; transition: opacity 0.3s; border-radius: var(--radius); z-index: 0; }
.post-card:hover .post-card-glow { opacity: 0.5; }
.post-card-inner { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; z-index: 1; transition: var(--transition); }
.post-card:hover .post-card-inner { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.post-date { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.post-tag { padding: 0.15rem 0.6rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }
.post-tag.tech { background: rgba(0, 255, 136, 0.12); color: var(--accent); }
.post-tag.life { background: rgba(0, 212, 255, 0.12); color: var(--accent-secondary); }
.post-tag.thought { background: rgba(255, 107, 157, 0.12); color: #ff6b9d; }
.post-featured { font-size: 0.75rem; color: var(--warning); }
.post-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.6rem; line-height: 1.5; transition: var(--transition); }
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { display: flex; justify-content: space-between; align-items: center; }
.read-time { font-size: 0.8rem; color: var(--text-muted); }
.read-more { font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.read-more:hover { color: var(--accent-secondary); }

/* 关于 */
.about-container { max-width: 800px; margin: 0 auto; }
.about-card { display: flex; gap: 2rem; padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 2rem; flex-wrap: wrap; }
.about-avatar { position: relative; flex-shrink: 0; }
.avatar-ring { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--accent); padding: 3px; animation: ringPulse 3s ease-in-out infinite; }
@keyframes ringPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,0.3); } 50% { box-shadow: 0 0 0 10px rgba(0,255,136,0); } }
.avatar-placeholder { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.avatar-status { position: absolute; bottom: 5px; right: 5px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--bg-card); }
.avatar-status.online { background: var(--success); }
.about-name { font-size: 1.3rem; margin-bottom: 0.8rem; }
.about-bio { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.8; color: var(--text-secondary); }
.bio-label { color: var(--accent); }
.status-online { color: var(--success); }
.about-stats { display: flex; gap: 2rem; margin-top: 1.5rem; }
.stat { text-align: center; }
.stat-number { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); display: block; }
.skills-section { padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 2rem; }
.skills-title { font-size: 1.1rem; margin-bottom: 1.5rem; }
.skills-grid { display: flex; flex-direction: column; gap: 1rem; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 0.3rem; }
.skill-name { font-size: 0.9rem; }
.skill-level { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.skill-bar { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-secondary)); border-radius: 3px; width: 0; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.timeline { padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.timeline-title { font-size: 1.1rem; margin-bottom: 1.5rem; }
.timeline-items { position: relative; padding-left: 2rem; }
.timeline-items::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -2rem; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-card); box-shadow: 0 0 0 2px var(--accent); }
.timeline-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.timeline-content p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* 页脚 */
.footer { padding: 3rem 2rem 2rem; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.footer-content { max-width: 800px; margin: 0 auto; text-align: center; }
.footer-terminal { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; }
.footer-terminal .prompt { color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.footer-link { color: var(--text-muted); font-size: 1.2rem; transition: var(--transition); }
.footer-link:hover { color: var(--accent); transform: translateY(-2px); }
.footer-info { font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; }
.icp-info a, .police-info a { color: var(--text-muted); transition: var(--transition); }
.icp-info a:hover, .police-info a:hover { color: var(--accent); }

/* 回到顶部 */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%;
    color: var(--accent); font-size: 1.2rem; cursor: pointer; z-index: 100;
    opacity: 0; transform: translateY(20px); transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }

/* 彩蛋 */
.easter-egg-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: none; align-items: center; justify-content: center; z-index: 10000; }
.easter-egg-overlay.active { display: flex; }
.easter-egg-content { background: var(--bg-card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 3rem; text-align: center; position: relative; overflow: hidden; }
.easter-egg-content h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.close-egg { padding: 0.5rem 1.5rem; background: var(--accent); color: var(--bg-primary); border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; margin-top: 1rem; }
.emoji { position: fixed; font-size: 2rem; z-index: 10001; pointer-events: none; animation: emojiFall linear forwards; }
@keyframes emojiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* 滚动动画 */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* 响应式 */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero { padding: 5rem 1rem 2rem; }
    .terminal-window { margin: 0 0.5rem; }
    .section { padding: 3rem 1rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .about-card { flex-direction: column; align-items: center; text-align: center; }
    .about-stats { justify-content: center; }
    .about-bio { text-align: left; }
    .navbar { padding: 0.6rem 1rem; }
}
