/* ============================================
   CYBER JOURNAL - 赛博手账样式
   ============================================ */

:root {
  --bg: #0a0a12;
  --bg-2: #12122a;
  --bg-card: rgba(18, 18, 42, 0.7);
  --border: rgba(0, 255, 255, 0.2);
  --primary: #00f0ff;
  --primary-dim: rgba(0, 240, 255, 0.5);
  --secondary: #ff00e5;
  --accent: #ffe600;
  --success: #00ff88;
  --text: #e4e4f0;
  --text-dim: #8a8ab0;
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --glow: 0 0 20px rgba(0, 240, 255, 0.4);
  --glow-pink: 0 0 20px rgba(255, 0, 229, 0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ====== 全局背景层 ====== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#crt-scanlines {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 3px
  );
  mix-blend-mode: multiply;
}

#crt-vignette {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
}

/* 鼠标拖尾 */
.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: opacity 0.3s;
}

/* ====== 布局容器 ====== */
.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ====== 顶部导航 ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 18, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: var(--glow);
}

.logo .prompt { color: var(--secondary); }
.logo .cursor {
  display: inline-block;
  width: 10px; height: 18px;
  background: var(--primary);
  animation: blink 1s steps(2) infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

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

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--mono);
  transition: all 0.25s;
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: var(--glow);
}

.nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  font-size: 16px;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

/* 汉堡 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* ====== HERO 区 - 终端风 ====== */
.hero {
  padding: 140px 0 80px;
  position: relative;
}

.terminal {
  background: rgba(5, 5, 15, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 60px rgba(0,240,255,0.08);
  backdrop-filter: blur(10px);
}

.terminal-bar {
  background: linear-gradient(180deg, #1e1e3a, #15152a);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 28px 32px 32px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.9;
  min-height: 280px;
}

.term-line { margin-bottom: 4px; }

.term-prompt {
  color: var(--success);
  margin-right: 8px;
}
.term-prompt::before { content: "➜ "; }
.term-path { color: var(--secondary); margin-right: 8px; }
.term-path::after { content: " $"; color: var(--text-dim); }

.term-output {
  color: var(--text-dim);
  padding-left: 0;
}

.term-output .highlight { color: var(--primary); }
.term-output .accent { color: var(--accent); }
.term-output .pink { color: var(--secondary); }

.typewriter { display: inline; }
.term-cursor {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--primary);
  margin-left: 2px;
  animation: blink 0.8s steps(2) infinite;
  vertical-align: text-bottom;
}

/* ASCII ART */
.ascii-art {
  color: var(--primary);
  font-size: 11px;
  line-height: 1.2;
  white-space: pre;
  text-shadow: var(--glow);
  margin: 8px 0 16px;
}

/* Hero 底部标签 */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(0,240,255,0.03);
  transition: all 0.3s;
}

.chip:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* ====== 区块标题 ====== */
.section {
  padding: 60px 0;
  position: relative;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.section-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--primary);
  text-shadow: var(--glow);
}
.section-tag::before { content: "// "; color: var(--text-dim); }

.section-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-dim), transparent);
}

/* ====== 3D 磁贴文章卡片 ====== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  perspective: 1200px;
}

.card-3d {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.3s;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card-3d::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0%, var(--primary) 10%, transparent 20%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
  animation: rotate-border 4s linear infinite;
}

.card-3d::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: var(--bg-card);
  z-index: -1;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotate-border {
  to { --angle: 360deg; }
}

.card-3d:hover {
  box-shadow: 0 25px 50px rgba(0,0,0,0.5), var(--glow);
}

.card-3d:hover::before { opacity: 1; }

.card-category {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.card-category::before { content: "# "; color: var(--text-dim); }

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
  transition: color 0.3s;
}

.card-3d:hover .card-title {
  color: var(--primary);
  text-shadow: var(--glow);
}

.card-excerpt {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.card-glow {
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--primary-dim), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  transform: translate(-50%, -50%);
}

/* 精选大图卡片 */
.card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  padding: 0;
  min-height: 320px;
}

.card-featured-visual {
  position: relative;
  background: linear-gradient(135deg, #0f1635, #1a0a2e);
  overflow: hidden;
  border-radius: 14px 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-featured-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-featured .card-title { font-size: 26px; }

/* 精选区动态视觉 - 噪点网格 */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,240,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  to { background-position: 30px 30px; }
}

.orbit-ring {
  position: absolute;
  width: 180px; height: 180px;
  border: 1px solid var(--primary-dim);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}
.orbit-ring:nth-child(2) { width: 260px; height: 260px; animation-duration: 30s; animation-direction: reverse; border-color: rgba(255,0,229,0.3); }
.orbit-ring::before {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  top: -5px; left: 50%;
  margin-left: -5px;
  box-shadow: var(--glow);
}
.orbit-ring:nth-child(2)::before { background: var(--secondary); box-shadow: var(--glow-pink); }

@keyframes spin { to { transform: rotate(360deg); } }

.orbit-core {
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--primary), var(--secondary));
  border-radius: 50%;
  box-shadow: 0 0 40px var(--primary), 0 0 80px var(--secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ====== 故障文字效果 ====== */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
}
.glitch::before {
  color: var(--primary);
  animation: glitch-1 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.glitch::after {
  color: var(--secondary);
  animation: glitch-2 3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%,90%,100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-1px, -1px); }
}
@keyframes glitch-2 {
  0%,90%,100% { transform: translate(0); }
  92% { transform: translate(2px, -1px); }
  94% { transform: translate(-2px, 1px); }
  96% { transform: translate(1px, 1px); }
}

/* ====== 页脚 ====== */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 18px;
}
.footer-links a:hover { color: var(--primary); text-shadow: var(--glow); }

/* ====== 按钮 ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--primary);
  background: rgba(0,240,255,0.08);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
}
.btn:hover {
  background: var(--primary);
  color: var(--bg);
  box-shadow: var(--glow);
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(255,0,229,0.08);
  box-shadow: var(--glow-pink);
}

/* ====== 搜索浮层 ====== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.search-overlay.show { display: flex; animation: fadeIn 0.2s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-box {
  width: min(600px, 90vw);
  background: var(--bg-2);
  border: 1px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8), var(--glow);
  overflow: hidden;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: var(--mono);
}
.search-input::placeholder { color: var(--text-dim); }

.search-kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-item {
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: var(--text);
}
.search-item:hover { background: rgba(0,240,255,0.08); }
.search-item .title { font-weight: 600; font-size: 14px; }
.search-item .desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.search-item .cat { font-family: var(--mono); font-size: 11px; color: var(--secondary); }
.search-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 13px;
}

/* ====== 文章详情页 ====== */
.post-layout {
  padding-top: 100px;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 80px;
  padding-left: 24px; padding-right: 24px;
}

.post-main {}

.post-hero {
  margin-bottom: 40px;
}

.post-crumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.post-crumb a { color: var(--primary); text-decoration: none; }

.post-title-xl {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.post-meta-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.post-meta-bar span::before { margin-right: 6px; }

.post-cover {
  margin: 28px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 340px;
  position: relative;
  background: linear-gradient(135deg, #0f1635, #1a0a2e);
  display: flex; align-items: center; justify-content: center;
}

.post-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}

.post-content h2 {
  font-size: 26px;
  margin: 48px 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  color: var(--text);
}
.post-content h3 {
  font-size: 20px;
  margin: 32px 0 12px;
  color: var(--primary);
}
.post-content p { margin-bottom: 18px; }

.post-content blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 3px solid var(--accent);
  background: rgba(255,230,0,0.05);
  border-radius: 0 8px 8px 0;
  color: var(--text);
  font-style: italic;
}

.post-content code {
  font-family: var(--mono);
  background: rgba(0,240,255,0.1);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  margin: 24px 0;
  padding: 20px 24px;
  background: #050515;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  position: relative;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text);
}
.code-lang {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.post-content ul, .post-content ol {
  margin: 16px 0;
  padding-left: 28px;
}
.post-content li { margin-bottom: 8px; }

.post-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-dim);
  transition: all 0.2s;
}
.post-content a:hover {
  background: var(--primary);
  color: var(--bg);
  border-bottom-color: var(--primary);
}

.post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 20px 0;
  border: 1px solid var(--border);
}

/* 侧栏目录 */
.toc {
  position: sticky;
  top: 90px;
  font-size: 13px;
}
.toc-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.toc-title::before { content: "// "; color: var(--text-dim); }
.toc ul { list-style: none; padding: 0; }
.toc li { margin-bottom: 6px; border-left: 2px solid var(--border); padding-left: 12px; transition: all 0.3s; }
.toc li.active { border-left-color: var(--primary); }
.toc li.active a { color: var(--primary); text-shadow: var(--glow); }
.toc a {
  color: var(--text-dim);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}
.toc a:hover { color: var(--primary); }
.toc .lvl-3 { padding-left: 12px; font-size: 12px; }

/* ====== 关于页 ====== */
.about-wrap {
  padding-top: 100px;
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 80px;
  padding-left: 24px; padding-right: 24px;
}

.profile-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  backdrop-filter: blur(10px);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,240,255,0.15), transparent 70%);
  border-radius: 50%;
}

.avatar-wrap {
  width: 200px; height: 200px;
  position: relative;
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 60px;
  font-weight: 800;
  color: var(--bg);
  position: relative;
  overflow: hidden;
  transform: rotate(-3deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px);
}
.avatar-ring {
  position: absolute;
  inset: -8px;
  border: 2px dashed var(--primary);
  border-radius: 24px;
  animation: spin 30s linear infinite;
}

.profile-info h1 {
  font-size: 36px;
  margin-bottom: 8px;
}
.profile-info .handle {
  font-family: var(--mono);
  color: var(--primary);
  margin-bottom: 16px;
}
.bio { color: var(--text-dim); margin-bottom: 20px; line-height: 1.8; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.stat-item { text-align: center; padding: 16px; background: rgba(0,240,255,0.04); border-radius: 10px; border: 1px solid var(--border); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--primary); font-family: var(--mono); text-shadow: var(--glow); }
.stat-label { font-size: 12px; color: var(--text-dim); font-family: var(--mono); margin-top: 4px; }

/* 技能网格 */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.skill-item {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.skill-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}
.skill-icon { font-size: 28px; margin-bottom: 10px; }
.skill-name { font-weight: 600; margin-bottom: 8px; font-family: var(--mono); font-size: 14px; }
.skill-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  position: relative;
}
.skill-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff;
}

/* 时间线 */
.timeline {
  position: relative;
  margin-top: 24px;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px; top: 6px;
  width: 14px; height: 14px;
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: 50%;
  box-shadow: var(--glow);
}
.timeline-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--secondary);
  margin-bottom: 6px;
}
.timeline-title { font-weight: 700; margin-bottom: 4px; }
.timeline-desc { color: var(--text-dim); font-size: 14px; }

/* ====== 归档页：终端树状 ====== */
.archive-wrap {
  padding-top: 100px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 80px;
  padding-left: 24px; padding-right: 24px;
}

.archive-terminal {
  background: rgba(5,5,15,0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.archive-list {
  padding: 24px 28px;
  font-family: var(--mono);
  font-size: 14px;
}

.archive-year {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.archive-year:first-child { margin-top: 0; }
.archive-year::before {
  content: '📁';
}

.archive-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 8px 28px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-dim);
  transition: all 0.2s;
}
.archive-item:hover {
  background: rgba(0,240,255,0.06);
  color: var(--primary);
  padding-left: 34px;
}
.archive-item::before {
  content: '📄';
  font-size: 12px;
}
.archive-date { color: var(--text-dim); font-size: 12px; min-width: 90px; }
.archive-item:hover .archive-date { color: var(--secondary); }
.archive-name { flex: 1; }
.archive-cat {
  font-size: 11px;
  color: var(--secondary);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* 统计条 */
.archive-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.stat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}
.stat-card .num {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--mono);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .lbl {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-top: 4px;
}

/* ====== 分类页 - Bento Grid ====== */
.categories-wrap {
  padding-top: 100px;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 80px;
  padding-left: 24px; padding-right: 24px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 16px;
  margin-bottom: 48px;
}

.bento-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text);
}
.bento-item:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.bento-item.big { grid-column: span 2; grid-row: span 2; }
.bento-item.wide { grid-column: span 2; }
.bento-item.tall { grid-row: span 2; }

.bento-cat-name {
  font-size: 20px;
  font-weight: 700;
  z-index: 1;
}
.bento-item.big .bento-cat-name { font-size: 32px; }
.bento-cat-count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  z-index: 1;
}
.bento-cat-icon {
  position: absolute;
  right: 16px; bottom: 12px;
  font-size: 50px;
  opacity: 0.15;
  transition: all 0.3s;
}
.bento-item.big .bento-cat-icon { font-size: 100px; right: 24px; bottom: 16px; opacity: 0.2; }
.bento-item:hover .bento-cat-icon { opacity: 0.35; transform: rotate(-10deg) scale(1.1); }

.bento-item.c1 { background: linear-gradient(135deg, rgba(0,240,255,0.08), transparent); }
.bento-item.c2 { background: linear-gradient(135deg, rgba(255,0,229,0.08), transparent); }
.bento-item.c3 { background: linear-gradient(135deg, rgba(255,230,0,0.08), transparent); }
.bento-item.c4 { background: linear-gradient(135deg, rgba(0,255,136,0.08), transparent); }
.bento-item.c5 { background: linear-gradient(135deg, rgba(255,100,50,0.08), transparent); }
.bento-item.c6 { background: linear-gradient(135deg, rgba(138,80,255,0.08), transparent); }

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.tag {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  text-decoration: none;
  color: var(--text-dim);
  transition: all 0.25s;
  background: rgba(255,255,255,0.02);
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.tag.s1 { font-size: 12px; }
.tag.s2 { font-size: 14px; }
.tag.s3 { font-size: 16px; font-weight: 600; }
.tag.s4 { font-size: 19px; font-weight: 700; color: var(--primary); }

/* ====== 留言板（矩阵雨） ====== */
.guestbook-wrap {
  padding-top: 100px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 80px;
  padding-left: 24px; padding-right: 24px;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}

.gb-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 36px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}
.gb-input, .gb-textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.3s;
  margin-bottom: 14px;
}
.gb-textarea { min-height: 100px; resize: vertical; }
.gb-input:focus, .gb-textarea:focus { border-color: var(--primary); box-shadow: var(--glow); }

.gb-list { position: relative; z-index: 2; }

.gb-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.gb-item:hover { border-color: var(--primary); transform: translateX(4px); }
.gb-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.gb-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--bg);
  font-family: var(--mono);
}
.gb-name { font-weight: 600; }
.gb-time { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-left: auto; }
.gb-text { color: var(--text); line-height: 1.7; }

/* ====== 阅读进度条 ====== */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  z-index: 1000;
  width: 0;
  transition: width 0.1s;
  box-shadow: 0 0 10px var(--primary);
}

/* 回到顶部 */
.back-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  box-shadow: var(--glow);
}
.back-top.show { opacity: 1; transform: translateY(0); }
.back-top:hover { background: var(--primary); color: var(--bg); }

/* ====== 响应式 ====== */
@media (max-width: 900px) {
  .card-featured { grid-template-columns: 1fr; }
  .card-featured-visual { border-radius: 14px 14px 0 0; min-height: 220px; }
  .post-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .avatar-wrap { margin: 0 auto; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-item.big { grid-column: span 2; grid-row: span 1; }
  .archive-stats { grid-template-columns: repeat(2, 1fr); }
  .post-title-xl { font-size: 30px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 12px; border-bottom: 1px solid var(--border); gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
  .hamburger { display: flex; }
  .hero { padding: 110px 0 50px; }
  .terminal-body { padding: 20px; font-size: 12px; min-height: 240px; }
  .ascii-art { font-size: 8px; }
  .section-title { font-size: 22px; }
  .stat-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-num { font-size: 20px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 120px; }
  .bento-item.big, .bento-item.wide, .bento-item.tall { grid-column: span 1; grid-row: span 1; }
  .articles-grid { grid-template-columns: 1fr; }
}

/* ====== 滚动条美化 ====== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--secondary)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* 选中 */
::selection { background: var(--primary); color: var(--bg); }

/* 入场动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
