/* ============================================================
   小朵科技工作室 Dark 主题 · 深色科技风
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  background: #07080c;
  color: #e6e8ee;
  line-height: 1.7;
  min-height: 100vh;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: #6e5cff; }

/* 背景层：网格 + 紫青渐变光晕（与主页同款） */
.grid-bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(rgba(120, 119, 198, .05) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(90deg, rgba(120, 119, 198, .05) 1px, transparent 1px) 0 0 / 60px 60px,
    radial-gradient(ellipse at 50% 0%, #1a1633 0%, #07080c 60%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}
.glow {
  position: fixed; z-index: -1; border-radius: 50%; filter: blur(120px); opacity: .35; pointer-events: none;
}
.glow-1 { width: 600px; height: 600px; background: #6e5cff; top: -200px; left: -150px; }
.glow-2 { width: 500px; height: 500px; background: #00d4ff; top: 30%; right: -200px; }
.glow-3 { width: 700px; height: 700px; background: #ff5cb3; bottom: -300px; left: 30%; opacity: .2; }

/* 容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* 导航栏 */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 8, 12, .7); border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; max-width: 1200px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, #6e5cff 0%, #00d4ff 100%);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 20px rgba(110, 92, 255, .4);
}
.logo-text span { color: #8a8a9e; font-weight: 400; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: #a8a8bc; }
.nav-links a { transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active {
  background: linear-gradient(135deg, #6e5cff 0%, #00d4ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 600;
}
.nav-cta {
  padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: linear-gradient(135deg, #6e5cff 0%, #00d4ff 100%);
  color: #fff; transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateX(2px); box-shadow: 0 4px 16px rgba(110, 92, 255, .4); color: #fff; }

/* Hero / 头图 */
.hero {
  padding: 100px 0 60px; text-align: center;
}
.hero-tag {
  display: inline-block; padding: 6px 14px; border-radius: 100px;
  background: rgba(110, 92, 255, .1); border: 1px solid rgba(110, 92, 255, .3);
  color: #b8b0ff; font-size: 12px; letter-spacing: .12em;
  font-family: 'JetBrains Mono', monospace; margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px); line-height: 1.1; letter-spacing: -.03em;
  font-weight: 700; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #6e5cff 0%, #00d4ff 50%, #ff5cb3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: #9a9ab0; font-size: 17px; max-width: 600px; margin: 0 auto 32px; }

/* 面包屑 */
.breadcrumb {
  font-size: 13px; color: #6a6a82; margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
}
.breadcrumb a { color: #6e5cff; }
.breadcrumb span { margin: 0 8px; color: #4a4a5e; }

/* 文章列表 */
.posts-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px; margin-top: 40px;
}
.post-card {
  position: relative; padding: 28px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.01) 100%);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .3s ease; overflow: hidden;
  display: flex; flex-direction: column;
}
.post-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px;
  background: linear-gradient(135deg, transparent 0%, rgba(110, 92, 255, .3) 50%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(110, 92, 255, .3); }
.post-card:hover::before { opacity: 1; }
.post-meta {
  display: flex; gap: 12px; font-size: 12px; color: #6a6a82;
  font-family: 'JetBrains Mono', monospace; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .08em;
}
.post-meta .tag {
  padding: 2px 10px; border-radius: 100px; background: rgba(110, 92, 255, .15);
  color: #b8b0ff; border: 1px solid rgba(110, 92, 255, .3);
}
.post-card h2 {
  font-size: 22px; font-weight: 600; margin-bottom: 12px;
  letter-spacing: -.01em; line-height: 1.4;
}
.post-card h2 a { color: #fff; }
.post-card h2 a:hover { color: #b8b0ff; }
.post-excerpt { color: #9a9ab0; font-size: 14px; line-height: 1.7; margin-bottom: 16px; flex: 1; }
.post-foot {
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #6a6a82;
}
.read-more { color: #6e5cff; font-weight: 500; }
.read-more:hover { color: #00d4ff; }

/* 文章详情 */
.post-detail { max-width: 800px; margin: 0 auto; padding: 60px 32px; }
.post-header { margin-bottom: 40px; text-align: center; }
.post-header h1 {
  font-size: clamp(28px, 4vw, 44px); line-height: 1.3;
  letter-spacing: -.02em; margin-bottom: 16px;
}
.post-header .post-meta { justify-content: center; }

/* Markdown 内容样式 */
/* Markdown 内容样式 */
.post-content { font-size: 16px; line-height: 1.85; color: #d4d6e0; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  color: #fff; margin: 32px 0 16px; letter-spacing: -.01em;
  font-weight: 600;
}
/* 文章详情页 post-header 已显示 H1，正文里再写 # 标题会重复 */
.post-detail .post-content h1:first-child { display: none; }
.post-content h2 {
  font-size: 24px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 17px; color: #b8b0ff; }
.post-content p { margin-bottom: 18px; }
.post-content a {
  color: #00d4ff; border-bottom: 1px dashed rgba(0, 212, 255, .4);
}
.post-content a:hover { color: #6e5cff; border-bottom-color: #6e5cff; }
.post-content ul, .post-content ol { margin: 0 0 18px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  margin: 20px 0; padding: 16px 20px;
  background: rgba(110, 92, 255, .08);
  border-left: 3px solid #6e5cff;
  border-radius: 0 8px 8px 0;
  color: #b8b0e0; font-style: italic;
}
.post-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(110, 92, 255, .15); color: #b8b0ff;
  padding: 2px 8px; border-radius: 4px; font-size: .9em;
}
.post-content pre {
  background: rgba(0, 0, 0, .4); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 16px 20px; overflow-x: auto;
  margin: 20px 0; line-height: 1.5;
}
.post-content pre code {
  background: none; color: #e6e8ee; padding: 0; font-size: 13px;
}
.post-content table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  background: rgba(255,255,255,.02); border-radius: 8px; overflow: hidden;
}
.post-content th, .post-content td {
  padding: 10px 16px; border: 1px solid rgba(255,255,255,.08); text-align: left;
}
.post-content th {
  background: rgba(110, 92, 255, .15); color: #fff; font-weight: 600;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
}
.post-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }
.post-content hr {
  border: none; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 92, 255, .3), transparent);
  margin: 32px 0;
}

/* 文章底部导航 */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 60px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.06);
}
.post-nav-item {
  padding: 20px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, transparent 100%);
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color .2s;
}
.post-nav-item:hover { border-color: rgba(110, 92, 255, .3); }
.post-nav-item.next { text-align: right; }
.post-nav-label {
  font-size: 12px; color: #6a6a82; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.post-nav-title { font-size: 15px; color: #fff; font-weight: 500; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag-cloud a {
  padding: 4px 12px; border-radius: 100px; font-size: 13px;
  background: rgba(110, 92, 255, .1); border: 1px solid rgba(110, 92, 255, .2);
  color: #b8b0ff;
}
.tag-cloud a:hover { background: rgba(110, 92, 255, .2); color: #fff; }

/* 分页 */
.pagination {
  display: flex; justify-content: center; gap: 8px; margin: 48px 0 0;
}
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: 8px; font-size: 14px;
  background: rgba(255,255,255,.05); color: #a8a8bc;
  border: 1px solid rgba(255,255,255,.08);
}
.pagination a:hover { background: rgba(110, 92, 255, .2); color: #fff; }
.pagination .current {
  background: linear-gradient(135deg, #6e5cff 0%, #00d4ff 100%);
  color: #fff; border: none;
}

/* 页脚 */
.footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 60px 32px 24px; margin-top: 80px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 3fr; gap: 48px; margin-bottom: 32px;
}
.foot-brand p { color: #6a6a82; font-size: 14px; margin-top: 12px; max-width: 320px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: #fff; }
.foot-col a, .foot-col span { display: block; font-size: 13px; color: #9a9ab0; margin-bottom: 6px; }
.foot-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.06);
  text-align: center; font-size: 12px; color: #4a4a5e;
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-inner { padding: 14px 20px; }
  .container { padding: 0 20px; }
  .hero { padding: 60px 0 40px; }
  .post-detail { padding: 40px 20px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next { text-align: left; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}

/* 引入 Google Fonts（Inter + JetBrains Mono） */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
