/* ==========================================================================
   个人网站 · 简约科技风设计系统
   深色底 + 霓虹蓝紫点缀，适合展示电脑知识内容
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #070b14;
  --bg-soft: #0b1120;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);

  --text: #e6edf7;
  --text-muted: #8b9bb4;
  --text-dim: #64748b;

  --indigo: #6366f1;
  --cyan: #22d3ee;
  --purple: #a855f7;
  --green: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;

  --gradient: linear-gradient(135deg, #22d3ee 0%, #6366f1 50%, #a855f7 100%);
  --gradient-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.16));

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-card: 0 10px 40px -18px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 40px -8px rgba(99, 102, 241, 0.45);

  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;

  --nav-height: 66px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 背景氛围光斑 */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 70%);
}

body::after {
  width: 560px;
  height: 560px;
  bottom: -220px;
  right: -160px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.16), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

::selection {
  background: rgba(99, 102, 241, 0.45);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 6px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ---------- 布局工具 ---------- */
.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-title .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin-top: 10px;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 11, 20, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--text);
  background: rgba(99, 102, 241, 0.16);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  place-items: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 52px -6px rgba(99, 102, 241, 0.65);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

/* ---------- Hero 首屏 ---------- */
.hero {
  padding: calc(var(--nav-height) + 84px) 0 64px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.hero-stat .num {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stat .label {
  color: var(--text-dim);
  font-size: 0.84rem;
  margin-top: 2px;
}

/* Hero 聊天提示语 */
.hero-chat-hint {
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.hero-chat-hint strong {
  color: var(--cyan);
  font-weight: 600;
}

/* ---------- 聊天窗口（Hero 右侧 · AI 分身） ---------- */
.chat-card {
  display: flex;
  flex-direction: column;
  height: 512px;
  max-height: 74vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(9, 14, 26, 0.9);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 22px -4px rgba(99, 102, 241, 0.65);
}

.chat-id strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.chat-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.2s infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  max-width: 84%;
}

.chat-msg p {
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.theirs {
  align-self: flex-start;
}

.chat-msg.theirs p {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-top-left-radius: 5px;
  color: var(--text);
}

.chat-msg.mine {
  align-self: flex-end;
}

.chat-msg.mine p {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(99, 102, 241, 0.38));
  border: 1px solid rgba(99, 102, 241, 0.42);
  border-top-right-radius: 5px;
}

.chat-msg.error p {
  background: rgba(251, 191, 36, 0.09);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
}

.chat-msg.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 15px;
  border-top-left-radius: 5px;
}

.t-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: t-bounce 1.2s infinite;
}

.t-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.t-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes t-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.chat-input-bar input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-input-bar input::placeholder {
  color: var(--text-dim);
}

.chat-input-bar input:focus {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.chat-input-bar button {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition), opacity var(--transition);
}

.chat-input-bar button:hover {
  transform: translateY(-1px);
}

.chat-input-bar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-input-bar svg {
  width: 19px;
  height: 19px;
}

/* ---------- 分类卡片 ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform var(--transition), border-color var(--transition),
    background var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card > * {
  position: relative;
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: rgba(99, 102, 241, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.category-icon svg {
  width: 24px;
  height: 24px;
}

.category-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.category-card .count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ---------- 文章卡片 ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform var(--transition), border-color var(--transition),
    background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.article-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
}

.article-card:hover::after {
  opacity: 1;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid;
}

.badge-hardware {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

.badge-software {
  color: var(--indigo);
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.1);
}

.badge-network {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.badge-coding {
  color: var(--purple);
  border-color: rgba(168, 85, 247, 0.38);
  background: rgba(168, 85, 247, 0.09);
}

.badge-system {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.badge-security {
  color: var(--rose);
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.08);
}

.article-meta-top time {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.article-card h3 {
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.article-card:hover h3 {
  color: var(--cyan);
}

.article-card .summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.tag::before {
  content: "#";
  opacity: 0.6;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
  transition: gap var(--transition);
}

.article-card:hover .read-more {
  gap: 10px;
}

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: all var(--transition);
}

.filter-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-tab.active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.search-box input:focus {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty-state .icon {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

/* ---------- 页头（子页面） ---------- */
.page-head {
  padding: calc(var(--nav-height) + 64px) 0 12px;
}

.page-head .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-head .breadcrumb a:hover {
  color: var(--cyan);
}

.page-head h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.page-head .sub {
  color: var(--text-muted);
  max-width: 680px;
}

/* ---------- 文章详情排版 ---------- */
.article-hero {
  padding: calc(var(--nav-height) + 60px) 0 26px;
}

.article-hero .badge {
  margin-bottom: 20px;
}

.article-hero h1 {
  font-size: clamp(1.65rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 20px;
  max-width: 860px;
}

.article-info {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-family: var(--font-mono);
}

.article-info span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.article-info svg {
  width: 15px;
  height: 15px;
}

.article-body {
  max-width: 800px;
  padding-bottom: 40px;
  font-size: 1rem;
  color: #c7d2e3;
}

.article-body > * + * {
  margin-top: 1.15em;
}

.article-body h2 {
  font-size: 1.42rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2.3em;
  padding-left: 16px;
  position: relative;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient);
}

.article-body h3 {
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.9em;
}

.article-body ul,
.article-body ol {
  padding-left: 4px;
  display: grid;
  gap: 0.55em;
}

.article-body ul li,
.article-body ol li {
  position: relative;
  padding-left: 26px;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gradient);
  transform: rotate(45deg);
}

.article-body ol {
  counter-reset: item;
}

.article-body ol li {
  counter-increment: item;
}

.article-body ol li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 700;
  color: var(--cyan);
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body blockquote {
  padding: 18px 22px;
  border-left: 3px solid var(--indigo);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-muted);
}

.article-body pre {
  background: #0a0f1c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.85;
  color: #a5f3fc;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  padding: 2px 7px;
  border-radius: 6px;
}

.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.article-body th,
.article-body td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  font-weight: 600;
}

.article-body td {
  color: var(--text-muted);
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.article-tags .tag {
  font-size: 0.82rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.article-tags .tag::before {
  content: "# ";
  color: var(--cyan);
  opacity: 0.8;
}

/* 上一篇 / 下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 800px;
  padding: 8px 0 60px;
}

.article-nav a {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: all var(--transition);
}

.article-nav a:hover {
  border-color: rgba(99, 102, 241, 0.55);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.article-nav .dir {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
}

.article-nav .title {
  font-size: 0.95rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-nav a.next {
  text-align: right;
}

.article-nav a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- 关于区块 ---------- */
.about-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 46px 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(34, 211, 238, 0.04));
  position: relative;
  overflow: hidden;
}

.about-panel::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 70%);
  top: -120px;
  right: -80px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 32px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-glow);
  position: relative;
}

.about-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
  position: relative;
}

.about-panel > div:last-child {
  position: relative;
}

.about-panel p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.about-panel p + p {
  margin-top: 12px;
}

.about-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.chip {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer p {
  color: var(--text-dim);
  font-size: 0.86rem;
}

.footer .mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .chat-card {
    height: 460px;
    max-height: 72vh;
  }

  .about-panel {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 36px 30px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 24px 22px;
    gap: 4px;
    background: rgba(7, 11, 20, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 16px;
  }

  .section {
    padding: 52px 0;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 56px);
  }

  .hero-stats {
    gap: 28px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: 0;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav a.next {
    text-align: left;
  }
}
