/* ===== 科技感设计变量 ===== */
:root {
  --color-bg: #060b14;
  --color-bg-alt: #0b1220;
  --color-bg-card: rgba(10, 17, 33, 0.88);
  --color-bg-elevated: rgba(14, 22, 44, 0.95);
  --color-text: #dce8f5;
  --color-text-muted: #7890a5;
  --color-accent: #38bdf8;
  --color-accent-dim: rgba(56, 189, 248, 0.55);
  --color-accent-2: #818cf8;
  --color-accent-3: #34d399;
  --color-border: rgba(56, 189, 248, 0.13);
  --color-border-hover: rgba(56, 189, 248, 0.35);
  --color-glow: 0 0 24px rgba(56, 189, 248, 0.18);
  --color-glow-sm: 0 0 12px rgba(56, 189, 248, 0.12);
  --font-display: 'Orbitron', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  /* 博客正文：宋体 / 中文衬线栈（代码块仍用 --font-mono） */
  --font-article: 'SimSun', 'Songti SC', 'STSong', 'FangSong', 'Noto Serif SC', serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* ===== 亮色主题 ===== */
[data-theme="light"] {
  --color-bg: #f2f6fb;
  --color-bg-alt: #e6edf6;
  --color-bg-card: rgba(255, 255, 255, 0.96);
  --color-bg-elevated: rgba(248, 251, 255, 0.98);
  --color-text: #0d1829;
  --color-text-muted: #52697f;
  --color-accent: #0284c7;
  --color-accent-dim: rgba(2, 132, 199, 0.55);
  --color-accent-2: #6366f1;
  --color-accent-3: #059669;
  --color-border: rgba(2, 132, 199, 0.18);
  --color-border-hover: rgba(2, 132, 199, 0.4);
  --color-glow: 0 0 24px rgba(2, 132, 199, 0.15);
  --color-glow-sm: 0 0 12px rgba(2, 132, 199, 0.1);
}

[data-theme="light"] .grid-bg {
  background-image:
    linear-gradient(rgba(2, 132, 199, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.05) 1px, transparent 1px);
}

[data-theme="light"] .scan-line {
  background: linear-gradient(
    transparent 50%,
    rgba(2, 132, 199, 0.025) 50%
  );
}

[data-theme="light"] .navbar {
  background: rgba(242, 246, 251, 0.92);
}

/* ===== 网格背景 ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== 扫描线效果 ===== */
.scan-line {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    transparent 50%,
    rgba(56, 189, 248, 0.015) 50%
  );
  background-size: 100% 4px;
  animation: scan 10s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ===== 基础样式 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--color-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.07) 0%, transparent 70%);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  z-index: 2;
}

[data-theme="light"] body,
[data-theme="light"] {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(2, 132, 199, 0.06) 0%, transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* 焦点可见性：键盘与可访问性友好 */
a:focus-visible,
button:focus-visible,
.blog-search-input:focus-visible,
.blog-sort-select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== 选区颜色 ===== */
::selection {
  background: rgba(56, 189, 248, 0.25);
  color: inherit;
}

[data-theme="light"] ::selection {
  background: rgba(2, 132, 199, 0.25);
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 2rem;
  background: rgba(6, 11, 20, 0.88);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(56, 189, 248, 0.06), 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-accent);
  letter-spacing: 0.15em;
}

.nav-brand a {
  color: inherit;
}

.nav-brand .bracket {
  color: var(--color-accent-2);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  position: relative;
  letter-spacing: 0.05em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

/* ===== 主内容区 ===== */
main {
  padding-top: 70px;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ===== 首页全屏滚动 ===== */
body.page-home {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
}

body.page-home .fullpage-main {
  padding-top: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

body.page-home .fullpage-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  padding-top: calc(70px + 2rem);
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.page-home .fullpage-section.hero {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: calc(70px + 4rem) 0 4rem;
}

body.page-home .fullpage-section#about {
  justify-content: flex-start;
}

body.page-home .fullpage-section#blog {
  justify-content: flex-start;
}

body.page-home .fullpage-section#blog .blog-list-preview {
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
  /* 固定为单色，避免 thumb:hover 在 WebKit 下重绘导致拉条异常闪烁 */
  scrollbar-color: var(--color-border) transparent;
}

body.page-home .fullpage-section#blog .blog-list-preview::-webkit-scrollbar {
  width: 6px;
}

body.page-home .fullpage-section#blog .blog-list-preview::-webkit-scrollbar-track {
  background: transparent;
}

body.page-home .fullpage-section#blog .blog-list-preview::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

/* 预览区内卡片不做横向平移，否则易触发 overflow 抖动并与滚动条命中区域打架 */
body.page-home .fullpage-section#blog .blog-list-preview .blog-card:hover {
  transform: none;
}

/* 首页最新文章：确保标题与摘要不会被其他样式覆盖隐藏 */
body.page-home .fullpage-section#blog .blog-card h3,
body.page-home .fullpage-section#blog .blog-card p {
  display: block;
  opacity: 1;
  visibility: visible;
}

body.page-home .fullpage-section#blog .blog-card h3 a {
  color: var(--color-text);
}

/* 首页最新文章：下内边距为原先「整块」下边距的两倍；顶内边距缩小使首行更贴上沿 */
body.page-home .fullpage-section#blog .blog-card {
  padding: 0.625rem 1.75rem 6rem;
}

body.page-home .fullpage-section#blog .blog-card h3 {
  margin-bottom: 0.2rem;
  line-height: 1.6;
}

body.page-home .fullpage-section#blog .blog-card-meta {
  margin-bottom: 0.2rem;
}

body.page-home .fullpage-section#blog .blog-card p {
  color: var(--color-text-muted);
  line-height: 1.6;
}

body.page-home .blog-more-wrap {
  margin-top: auto;
  padding-top: 1rem;
}

/* ===== Hero 区域 ===== */
.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 4rem 0;
}

.hero-content {
  flex: 1;
  max-width: 520px;
}

.hero-greeting {
  font-size: 0.95rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.hero-greeting .prompt {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent-2);
  margin-right: 0.5rem;
}

.hero-prompt-icon {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.hero-title .glow {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.5));
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.hero-subtitle .accent {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
}

.hero-accent-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

.hero-desc {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* ===== 首页 Bento 卡片墙（独立 #home，避免与 .hero 双栏布局冲突）===== */
#home.home-dashboard {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: calc(70px + 1.25rem) 0 2rem;
  min-height: min(100vh, 900px);
}

.home-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(4.5rem, auto);
  gap: 8px;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}

.bento-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-2) 60%, transparent 100%);
  opacity: 0.7;
  pointer-events: none;
  border-radius: 0 3px 3px 0;
}

.bento-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.1), 0 1px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

[data-theme="light"] .bento-card:hover {
  box-shadow: 0 4px 24px rgba(2, 132, 199, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bento-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
  padding-left: 2px;
}

.bento-live {
  color: var(--color-accent);
  font-weight: 600;
}

.bento-clock {
  grid-column: 1 / 3;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1rem 1rem 1.1rem;
}

.bento-clock-time {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.65rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.bento-clock-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

.bento-date {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

.bento-date-main {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.bento-date-sub {
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-top: 0.25rem;
}

.bento-sse {
  grid-column: 5 / 7;
  grid-row: 1 / 2;
}

.bento-sse-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.bento-sse-change {
  font-size: 0.8rem;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.bento-sse.bento-sse--up .bento-sse-change {
  color: #f87171;
}

.bento-sse.bento-sse--down .bento-sse-change {
  color: #4ade80;
}

.bento-sse.bento-sse--flat .bento-sse-change {
  color: var(--color-text-muted);
}

.bento-gold {
  grid-column: 5 / 7;
  grid-row: 3 / 4;
}

.bento-gold::before {
  background: linear-gradient(180deg, #e8b923 0%, #ca8a04 55%, transparent 100%);
  opacity: 0.85;
}

.bento-gold-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.bento-gold-change {
  font-size: 0.8rem;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.bento-gold.bento-gold--up .bento-gold-change {
  color: #f87171;
}

.bento-gold.bento-gold--down .bento-gold-change {
  color: #4ade80;
}

.bento-gold.bento-gold--flat .bento-gold-change {
  color: var(--color-text-muted);
}

.bento-weather {
  grid-column: 3 / 5;
  grid-row: 2 / 3;
}

.bento-weather-main {
  font-size: 1.2rem;
  font-weight: 600;
}

.bento-weather-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.bento-year {
  grid-column: 5 / 7;
  grid-row: 2 / 3;
}

.bento-year-value {
  font-size: 0.9rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.bento-year-bar {
  margin-top: 0.5rem;
  height: 5px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

[data-theme="light"] .bento-year-bar {
  background: rgba(2, 132, 199, 0.12);
}

.bento-year-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.bento-identity {
  grid-column: 3 / 5;
  grid-row: 3 / 4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.75rem 1rem;
}

.bento-id-line {
  width: 100%;
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-bottom: -0.15rem;
}

.bento-id-line .prompt {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
  color: var(--color-accent-2);
}

.bento-id-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0;
}

.bento-id-title .glow {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.5));
}

.bento-id-sub {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 12rem;
}

.bento-id-sub .accent {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
}

.bento-id-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.25rem;
}

.btn-bento {
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
}

.bento-terminal-wrap {
  grid-column: 1 / 4;
  grid-row: 4 / 6;
  padding: 0;
}

.bento-terminal-wrap::before {
  display: none;
}

.bento-terminal-wrap .terminal-bento {
  border: none;
  border-radius: 5px;
  box-shadow: none;
  height: 100%;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
}

.bento-terminal-wrap .terminal-body {
  flex: 1;
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
}

.bento-quick {
  grid-column: 4 / 7;
  grid-row: 4 / 6;
  padding: 0.65rem 0.75rem;
}

.bento-quick-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}

.bento-quick-nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 0.35rem 0.4rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.bento-quick-nav a:hover {
  color: var(--color-accent);
  border-color: var(--color-border);
  background: rgba(56, 189, 248, 0.04);
}

[data-theme="light"] .bento-quick-nav a:hover {
  background: rgba(2, 132, 199, 0.06);
}

.bento-q-num {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--color-accent-2);
  opacity: 0.9;
  min-width: 1.25rem;
}

.bento-tagline-strip {
  grid-column: 1 / 7;
  grid-row: 6 / 7;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
}

.bento-tagline-prefix {
  font-size: 0.85rem;
  color: var(--color-accent-2);
  flex-shrink: 0;
}

.bento-tagline-text {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  color: #060b14;
  border: none;
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35), 0 2px 8px rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
  filter: brightness(1.08);
}

[data-theme="light"] .btn-primary {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border-hover);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--color-accent);
  box-shadow: var(--color-glow-sm);
  transform: translateY(-2px);
}

[data-theme="light"] .btn-outline:hover {
  background: rgba(2, 132, 199, 0.07);
}

/* ===== 终端样式 ===== */
.terminal {
  font-family: var(--font-mono);
  background: rgba(6, 10, 20, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(56, 189, 248, 0.06);
}

[data-theme="light"] .terminal {
  background: rgba(15, 24, 40, 0.92);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27ca40; }

.terminal-title {
  margin-left: 1rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.terminal-body {
  padding: 1.5rem;
}

.code-line {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.code-keyword { color: #c678dd; }
.code-var { color: #e06c75; }
.code-string { color: #98c379; }
.code-fn { color: var(--color-accent); }

.cursor-blink {
  color: var(--color-accent);
  animation: blink 1s step-end infinite;
}

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

/* ===== 通用区块 ===== */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--color-border);
}

.page-header {
  min-height: calc(100vh - 200px);
}

.page-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: var(--color-text);
  letter-spacing: 0.08em;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: 1px;
}

.section-num {
  color: var(--color-accent);
  font-size: 1rem;
  margin-right: 0.35rem;
  opacity: 0.85;
}

/* ===== 关于 ===== */
.about-content {
  max-width: 640px;
}

.about-content:has(.about-intro) {
  max-width: none;
}

.about-content,
.about-block {
  font-family: var(--font-mono);
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.about-text .about-intro {
  white-space: nowrap;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 4px;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

/* ===== 项目 ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-grid--empty {
  place-items: center;
  min-height: 12rem;
}

.project-empty {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0;
}

.project-card {
  padding: 1.75rem 2rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  transition-property: border-color, box-shadow, transform, background;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2), var(--color-accent-3));
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.1), 0 2px 8px rgba(0, 0, 0, 0.2), var(--color-glow-sm);
  transform: translateY(-3px);
  background: rgba(14, 22, 42, 0.92);
}

[data-theme="light"] .project-card:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 32px rgba(2, 132, 199, 0.1), 0 2px 12px rgba(0, 0, 0, 0.06);
}

.project-card:hover::before {
  opacity: 1;
}

.project-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.icon-code {
  font-family: var(--font-mono);
  font-weight: 600;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.project-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-link {
  font-size: 0.85rem;
  color: var(--color-accent);
}

.project-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== 博客 ===== */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.blog-search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: var(--transition);
}

.blog-search-input::placeholder {
  color: var(--color-text-muted);
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.blog-sort-select {
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.blog-sort-select:hover,
.blog-sort-select:focus {
  border-color: var(--color-accent);
  outline: none;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-card {
  padding: 1.5rem 1.75rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  transition-property: border-color, box-shadow, transform, background;
  position: relative;
  overflow: hidden;
  /* 避免与半透明背景叠加时，部分浏览器正文绘制异常 */
}

.blog-card::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-accent-2));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 3px 3px 0;
}

.blog-card > * {
  position: relative;
  z-index: 1;
}

.blog-card:hover {
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 6px 28px rgba(56, 189, 248, 0.1), 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateX(3px);
}

.blog-card:hover::before {
  transform: scaleY(1);
}

[data-theme="light"] .blog-card:hover {
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
}

.blog-card-meta .blog-reading-time {
  margin-left: 0;
}

.blog-card time,
.blog-card .blog-reading-time {
  display: inline;
  font-size: 0.75rem;
}

.blog-card time {
  font-size: 0.75rem;
  color: var(--color-accent);
}

.blog-card .blog-reading-time {
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}

.blog-card h3 {
  /* 列表标题用正文字体栈，避免部分环境下衬线字体回退异常导致“看不见” */
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
  line-height: 1.45;
  min-height: 1.35em;
}

.blog-card h3 a {
  color: var(--color-text);
  -webkit-text-fill-color: currentColor;
}

.blog-card h3 a:hover {
  color: var(--color-accent);
  -webkit-text-fill-color: currentColor;
}

.blog-card p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-family: var(--font-body);
  line-height: 1.6;
  margin: 0;
  -webkit-text-fill-color: currentColor;
}

.blog-loading {
  color: var(--color-text-muted);
  padding: 2rem;
}

/* ===== 阅读进度条 ===== */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2), var(--color-accent-3));
  z-index: 101;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* ===== 文章详情页 ===== */
.article-page {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0 3rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 48px rgba(56, 189, 248, 0.07), 0 2px 16px rgba(0,0,0,0.35), 0 0 1px rgba(56, 189, 248, 0.12);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.article-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2), var(--color-accent-3));
  z-index: 2;
}

[data-theme="light"] .article-page {
  box-shadow: 0 8px 40px rgba(2, 132, 199, 0.08), 0 2px 12px rgba(0,0,0,0.06);
}

.article-header {
  margin-bottom: 0;
  padding: 2.5rem 2.5rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="light"] .article-header {
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.04) 0%, transparent 100%);
}

.article-title {
  font-family: var(--font-article);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--color-text);
  -webkit-text-fill-color: currentColor;
}

[data-theme="light"] .article-title {
  color: var(--color-text);
  -webkit-text-fill-color: currentColor;
}

.article-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.article-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--color-accent);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .article-date {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
}

.article-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: rgba(148, 163, 184, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.article-body {
  line-height: 1.9;
  font-size: 0.95rem;
  padding: 2rem 2.5rem;
  font-family: var(--font-article);
}

.article-body h2 {
  font-family: var(--font-article);
  font-size: 1.2rem;
  margin: 2.5rem 0 1rem;
  padding: 0.6rem 1rem 0.6rem 1.25rem;
  border-left: 3px solid var(--color-accent);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.05), transparent);
  border-radius: 0 6px 6px 0;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

[data-theme="light"] .article-body h2 {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.06), transparent);
}

.article-body h2::before {
  content: '## ';
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.85em;
  opacity: 0.7;
}

.article-body h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--color-text);
  font-weight: 600;
}

.article-body h3::before {
  content: '### ';
  color: var(--color-accent-2);
  font-family: var(--font-mono);
  font-size: 0.8em;
  opacity: 0.6;
}

.article-body p {
  margin-bottom: 1.1rem;
  color: var(--color-text);
  opacity: 0.88;
}

[data-theme="light"] .article-body p {
  opacity: 1;
}

.article-body a {
  color: var(--color-accent);
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.3);
}

[data-theme="light"] .article-body a {
  text-decoration-color: rgba(2, 132, 199, 0.3);
}

.article-body a:hover {
  text-decoration-color: var(--color-accent);
}

.article-body pre,
.article-body .code-block {
  position: relative;
  background: rgba(4, 8, 18, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .article-body pre,
[data-theme="light"] .article-body .code-block {
  background: #f8fafc;
}

/* 亮色模式：代码块背景与高亮灰色文字对比度优化 */
[data-theme="light"] .article-body pre,
[data-theme="light"] .article-body .code-block {
  background: #ffffff;
}

[data-theme="light"] .article-body .hljs {
  color: #1e293b;
  background: transparent !important;
}

[data-theme="light"] .article-body .hljs-comment,
[data-theme="light"] .article-body .hljs-code,
[data-theme="light"] .article-body .hljs-formula {
  color: #475569;
}

[data-theme="light"] .article-body .hljs-doctag,
[data-theme="light"] .article-body .hljs-keyword,
[data-theme="light"] .article-body .hljs-meta .hljs-keyword,
[data-theme="light"] .article-body .hljs-template-tag,
[data-theme="light"] .article-body .hljs-template-variable,
[data-theme="light"] .article-body .hljs-type,
[data-theme="light"] .article-body .hljs-variable.language_ {
  color: #dc2626;
}

[data-theme="light"] .article-body .hljs-title,
[data-theme="light"] .article-body .hljs-title.class_,
[data-theme="light"] .article-body .hljs-title.function_ {
  color: #7c3aed;
}

[data-theme="light"] .article-body .hljs-attr,
[data-theme="light"] .article-body .hljs-attribute,
[data-theme="light"] .article-body .hljs-literal,
[data-theme="light"] .article-body .hljs-meta,
[data-theme="light"] .article-body .hljs-number,
[data-theme="light"] .article-body .hljs-operator,
[data-theme="light"] .article-body .hljs-selector-attr,
[data-theme="light"] .article-body .hljs-selector-class,
[data-theme="light"] .article-body .hljs-selector-id,
[data-theme="light"] .article-body .hljs-variable {
  color: #0284c7;
}

[data-theme="light"] .article-body .hljs-string,
[data-theme="light"] .article-body .hljs-meta .hljs-string,
[data-theme="light"] .article-body .hljs-regexp {
  color: #0369a1;
}

[data-theme="light"] .article-body .hljs-built_in,
[data-theme="light"] .article-body .hljs-symbol {
  color: #ea580c;
}

[data-theme="light"] .article-body .hljs-name,
[data-theme="light"] .article-body .hljs-quote,
[data-theme="light"] .article-body .hljs-selector-pseudo,
[data-theme="light"] .article-body .hljs-selector-tag {
  color: #16a34a;
}

.article-body .code-block code {
  line-height: 1.5;
}

.code-block-wrapper {
  position: relative;
  margin: 1rem 0;
}

.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--color-accent);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}

.code-copy-btn svg {
  flex-shrink: 0;
}

.code-copy-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--color-accent);
}

.code-copy-btn.copied {
  color: #27ca40;
  border-color: #27ca40;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-variant-ligatures: none; /* 禁用连字，避免减号等操作符显示异常 */
}

.article-body pre code {
  background: none;
  padding: 0;
}

.article-body p code {
  padding: 0.15em 0.45em;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--color-accent);
}

[data-theme="light"] .article-body p code {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.15);
}

.article-body ul, .article-body ol {
  margin: 1rem 0;
  padding-left: 1.75rem;
  color: var(--color-text);
  opacity: 0.88;
}

[data-theme="light"] .article-body ul,
[data-theme="light"] .article-body ol {
  opacity: 1;
}

.article-body li {
  margin-bottom: 0.35rem;
}

.article-body blockquote {
  position: relative;
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.05), transparent);
  border-radius: 0 8px 8px 0;
  color: var(--color-text-muted);
  font-style: italic;
}

[data-theme="light"] .article-body blockquote {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.05), transparent);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  display: block;
  margin: 1.5rem auto;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.article-body table th {
  background: rgba(56, 189, 248, 0.08);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

[data-theme="light"] .article-body table th {
  background: rgba(2, 132, 199, 0.08);
}

.article-body table td {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.article-body table tr:hover td {
  background: rgba(56, 189, 248, 0.03);
}

[data-theme="light"] .article-body table tr:hover td {
  background: rgba(2, 132, 199, 0.03);
}

.article-body .fold-block {
  margin: 1.25rem 0;
  padding: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.article-body .fold-block summary {
  cursor: pointer;
  color: var(--color-accent);
  font-weight: 500;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  user-select: none;
  background: rgba(56, 189, 248, 0.04);
}

.article-body .fold-block summary:hover {
  background: rgba(56, 189, 248, 0.08);
}

.article-body .fold-block > *:not(summary) {
  padding: 0.75rem 1rem;
}

.article-body .katex {
  font-size: 1.05em;
}

.article-footer {
  margin-top: 0;
  padding: 1.75rem 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.article-nav-prev,
.article-nav-next {
  font-size: 0.9rem;
  color: var(--color-accent);
  max-width: 45%;
}

.article-nav-prev:hover,
.article-nav-next:hover {
  text-decoration: underline;
}

.article-back-list {
  display: inline-block;
}

/* ===== 联系 ===== */
.contact-content p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  transition-property: border-color, box-shadow, transform, background;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
  color: var(--color-accent);
}

.contact-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.contact-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.12), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

[data-theme="light"] .contact-item:hover {
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ===== 首页小游戏预览 ===== */
.game-preview-content p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.game-preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.game-preview-card {
  padding: 1.5rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: var(--transition);
  transition-property: border-color, box-shadow, transform, background;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.game-preview-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.game-preview-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.game-preview-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.game-preview-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ===== 404 页 ===== */
.page-404-main {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.page-404 {
  text-align: center;
  max-width: 480px;
}

.page-404-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

.page-404-sep {
  color: var(--color-accent);
  margin: 0 0.5rem;
}

.page-404-terminal {
  margin-bottom: 2rem;
  text-align: left;
}

.page-404-terminal .code-prompt {
  color: var(--color-accent);
  margin-right: 0.5rem;
}

.page-404-terminal .code-output {
  color: var(--color-text-muted);
}

.page-404-btn {
  margin-top: 0.5rem;
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  background: linear-gradient(0deg, rgba(56, 189, 248, 0.03) 0%, transparent 100%);
  letter-spacing: 0.02em;
}

[data-theme="light"] .footer {
  background: linear-gradient(0deg, rgba(2, 132, 199, 0.03) 0%, transparent 100%);
}

.footer-code {
  color: var(--color-accent);
  opacity: 0.8;
}

/* ===== 响应式：平板及以下 ===== */
@media (max-width: 768px) {
  .grid-bg {
    background-size: 30px 30px;
  }

  .navbar {
    padding: 0.75rem 1rem;
  }

  .nav-brand {
    font-size: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(16px);
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    gap: 0;
    max-height: 70vh;
    overflow-y: auto;
  }

  [data-theme="light"] .nav-links {
    background: rgba(241, 245, 249, 0.98);
  }

  .nav-links li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a,
  .nav-links .theme-toggle,
  .nav-links .lang-toggle {
    display: block;
    padding: 0.75rem 1rem;
  }

  .nav-links .theme-toggle,
  .nav-links .lang-toggle {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links.active {
    display: flex;
  }

  /* 菜单展开时禁止背景滚动 */
  body.nav-open {
    overflow: hidden;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle span {
    background: var(--color-accent);
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 0;
    gap: 2rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-visual {
    width: 100%;
  }

  .terminal {
    font-size: 0.8rem;
  }

  .terminal-body {
    padding: 1rem;
  }

  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.page-home .fullpage-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  body.page-home .fullpage-section {
    padding-top: calc(70px + 1.5rem);
  }

  body.page-home .fullpage-section.hero {
    flex-direction: column;
    padding-top: calc(70px + 2rem);
    padding-bottom: 2rem;
  }

  #home.home-dashboard {
    min-height: 0;
    padding-top: calc(70px + 1rem);
    padding-bottom: 1.5rem;
  }

  .home-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .home-bento > .bento-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .bento-clock-time {
    font-size: clamp(1.85rem, 10vw, 2.4rem);
  }

  .bento-terminal-wrap .terminal-bento {
    min-height: 9rem;
  }

  .bento-quick-nav {
    grid-template-columns: 1fr;
  }

  body.page-home .fullpage-section#blog .blog-list-preview {
    max-height: 40vh;
  }

  /* 博客工具栏：搜索与排序垂直堆叠 */
  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-search-input {
    min-width: 0;
  }

  .blog-card {
    padding: 1.25rem 1.25rem;
  }

  body.page-home .fullpage-section#blog .blog-card {
    padding: 0.5rem 1.25rem 4.95rem;
  }

  /* 项目卡片 */
  .project-card {
    padding: 1.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  /* 联系链接 */
  .contact-links {
    flex-direction: column;
  }

  .contact-item {
    justify-content: flex-start;
  }

  /* 页脚 */
  .footer {
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }

  .footer p {
    word-break: break-word;
  }

  /* 回到顶部：移动端位置调整 */
  .back-to-top {
    bottom: 1.25rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  /* 文章页 */
  .article-page {
    padding: 0 0 2rem;
    border-radius: 8px;
  }

  .article-header {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .article-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
  }

  .article-body {
    padding: 1.5rem 1.25rem;
    font-size: 0.92rem;
  }

  .article-footer {
    padding: 1.5rem 1.25rem 0;
  }

  .article-body pre,
  .article-body .code-block {
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-size: 0.82rem;
  }

  .article-body pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-nav {
    flex-direction: column;
  }

  .article-nav-prev,
  .article-nav-next {
    max-width: 100%;
  }

  /* 游戏页 */
  .game-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .game-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .game-tab {
    flex: 1;
    min-width: 80px;
  }

  .game-ui {
    flex-direction: column;
    align-items: stretch;
  }

  .game-duration-select {
    flex-wrap: wrap;
  }

  .game-stats {
    flex-wrap: wrap;
  }

  .game-canvas-wrap {
    min-height: 250px;
  }

  .game-canvas-wrap::before {
    padding-top: 56.25%; /* 16:9 比例，更适合移动端 */
  }

  .game-overlay-content {
    padding: 1.5rem;
  }

  .game-overlay-content p {
    font-size: 1rem;
  }

  /* 2048 游戏 */
  .game2048-wrap {
    padding: 0.75rem;
  }

  .game2048-tile {
    font-size: clamp(0.85rem, 5vw, 1.25rem);
  }

  /* 反应速度测试 */
  .reaction-area {
    min-height: 220px;
  }

  .reaction-levels {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .reaction-levels-table th,
  .reaction-levels-table td {
    padding: 0.35rem 0.5rem;
  }

  /* 404 页 */
  .page-404-main {
    padding: 2rem 1rem;
  }

  .page-404-title {
    font-size: 1.5rem;
  }
}

/* ===== 响应式：小屏手机 ===== */
@media (max-width: 480px) {
  .navbar {
    padding: 0.6rem 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .page-actions {
    flex-direction: column;
  }

  .page-actions .btn {
    width: 100%;
    text-align: center;
  }

  .game-preview-cards {
    grid-template-columns: 1fr;
  }

  .blog-card h3 {
    font-size: 0.95rem;
  }

  .article-body h2 {
    font-size: 1.1rem;
  }

  .article-body h3 {
    font-size: 1rem;
  }

  /* 移动端可选择性禁用首页滚动吸附，减少误触 */
  @media (hover: none) {
    body.page-home {
      scroll-snap-type: none;
    }

    body.page-home .fullpage-section {
      scroll-snap-align: none;
      scroll-snap-stop: normal;
    }
  }
}

/* ===== 文章目录 TOC ===== */
.article-toc {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 1rem 0;
}

.article-toc-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.article-toc-list {
  list-style: none;
}

.article-toc-list a {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  padding-left: 0;
  border-left: 2px solid transparent;
  transition: var(--transition);
}

.article-toc-list a:hover,
.article-toc-list a.active {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
}

.article-toc-list li.toc-h3 a {
  padding-left: 1rem;
  font-size: 0.8rem;
}

/* 有目录时放宽 article-page 宽度，由内部 grid 控制居中 */
main:has(.article-with-toc) .article-page {
  max-width: none;
}

.article-with-toc {
  display: grid;
  grid-template-columns: 1fr 200px minmax(0, 800px) 1fr;
  gap: 2rem;
  align-items: start;
}

.article-with-toc > .article-toc {
  grid-column: 2;
}

.article-with-toc > div:not(.article-toc) {
  grid-column: 3;
  min-width: 0;
}

@media (max-width: 900px) {
  .article-with-toc {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column-reverse;
  }
  .article-with-toc > .article-toc,
  .article-with-toc > div:not(.article-toc) {
    grid-column: auto;
  }
  .article-toc {
    position: static;
    max-height: none;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
  }
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.12);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

/* ===== 语言切换按钮 ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.5rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.78rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
  font-family: var(--font-mono);
}

.lang-toggle .lang-flag {
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
}

.lang-toggle:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.12);
}

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 17, 33, 0.82);
  border: 1.5px solid var(--color-accent-dim);
  border-radius: 50%;
  color: var(--color-accent);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem) scale(0.85);
  transition: opacity var(--transition), visibility var(--transition),
    transform var(--transition), color var(--transition),
    box-shadow var(--transition), border-color var(--transition),
    background var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
}

.back-to-top::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    rgba(56, 189, 248, 0.55) 0deg,
    transparent 120deg
  );
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  color: #fff;
  border-color: var(--color-accent);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.28), 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px) scale(1.07);
}

.back-to-top:hover::before {
  opacity: 1;
}

.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

.back-to-top.scrolling .back-to-top-icon {
  animation: back-to-top-bounce 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes back-to-top-bounce {
  0%   { transform: translateY(0); opacity: 1; }
  35%  { transform: translateY(-6px); opacity: 0.6; }
  65%  { transform: translateY(4px); opacity: 0.9; }
  100% { transform: translateY(0); opacity: 1; }
}

.back-to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.back-to-top-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

[data-theme="light"] .back-to-top {
  background: rgba(248, 251, 255, 0.88);
  border-color: rgba(2, 132, 199, 0.45);
}

[data-theme="light"] .back-to-top::before {
  background: conic-gradient(
    from 180deg,
    rgba(2, 132, 199, 0.45) 0deg,
    transparent 120deg
  );
}

[data-theme="light"] .back-to-top:hover {
  background: rgba(2, 132, 199, 0.1);
  box-shadow: 0 0 18px rgba(2, 132, 199, 0.22), 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ===== 射击小游戏 ===== */
.game-main {
  padding-top: 70px;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 3rem;
}

.game-section {
  margin-top: 2rem;
}

.game-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.game-ui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-duration-select {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.game-duration-select label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.game-duration-select input {
  accent-color: var(--color-accent);
}

.game-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.game-stat strong {
  color: var(--color-accent);
}

.game-buttons {
  display: flex;
  gap: 0.5rem;
}

.game-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 800px;
  min-height: 300px;
  margin: 0 auto;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--color-glow);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cline x1='12' y1='0' x2='12' y2='24' stroke='%2338bdf8' stroke-width='2'/%3E%3Cline x1='0' y1='12' x2='24' y2='12' stroke='%2338bdf8' stroke-width='2'/%3E%3C/svg%3E") 12 12, crosshair;
  touch-action: manipulation; /* 消除移动端 300ms 点击延迟 */
}

.game-canvas-wrap::before {
  content: '';
  display: block;
  padding-top: 62.5%;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.game-crosshair {
  display: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.game-overlay.hidden {
  display: none;
}

.game-overlay-content {
  text-align: center;
  padding: 2rem;
}

.game-overlay-content p {
  color: var(--color-text);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.game-overlay-content .btn {
  margin-top: 0.5rem;
}

/* ===== 游戏标签切换 ===== */
.game-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.game-tab {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.game-tab:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.game-tab.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--color-accent);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.1);
}

.game-section {
  display: none;
}

.game-section.active {
  display: block;
}

/* ===== 2048 游戏 ===== */
.game2048-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--color-glow);
}

.game2048-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--grid-size, 4), 1fr);
  grid-template-rows: repeat(var(--grid-size, 4), 1fr);
  gap: 0.5rem;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 0.5rem;
}

.game2048-cells {
  position: absolute;
  inset: 0.5rem;
  display: grid;
  grid-template-columns: repeat(var(--grid-size, 4), 1fr);
  grid-template-rows: repeat(var(--grid-size, 4), 1fr);
  gap: 0.5rem;
  pointer-events: none;
}

.game2048-cell {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.game2048-tiles {
  position: absolute;
  inset: 0.5rem;
  display: grid;
  grid-template-columns: repeat(var(--grid-size, 4), 1fr);
  grid-template-rows: repeat(var(--grid-size, 4), 1fr);
  gap: 0.5rem;
  pointer-events: none;
}

.game2048-tile {
  grid-column: calc(var(--col) + 1);
  grid-row: calc(var(--row) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: 700;
  border-radius: 4px;
  transition: grid-column 0.15s ease, grid-row 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.game2048-tile-new {
  animation: game2048-pop 0.2s ease;
}

.game2048-tile-merge {
  animation: game2048-merge 0.2s ease;
}

@keyframes game2048-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes game2048-merge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.game2048-wrap .game-overlay {
  border-radius: 8px;
}

/* ===== 反应速度测试 ===== */
.reaction-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.reaction-area {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation; /* 消除移动端 300ms 点击延迟 */
  /* 不使用 transition：变绿需瞬间完成，否则 200ms 渐变会被计入反应时间 */
}

.reaction-area #reaction-hint {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.reaction-area.reaction-waiting {
  background: #dc2626;
  border-color: #b91c1c;
}

.reaction-area.reaction-waiting #reaction-hint {
  color: rgba(255, 255, 255, 0.9);
}

.reaction-area.reaction-ready {
  background: #16a34a;
  border-color: #15803d;
}

.reaction-area.reaction-ready #reaction-hint {
  color: #fff;
  font-weight: 600;
}

[data-theme="light"] .reaction-area.reaction-waiting {
  background: #ef4444;
  border-color: #dc2626;
}

[data-theme="light"] .reaction-area.reaction-ready {
  background: #22c55e;
  border-color: #16a34a;
}

.reaction-levels {
  max-width: 600px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.reaction-levels-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.reaction-levels-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.reaction-levels-table th,
.reaction-levels-table td {
  padding: 0.4rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.reaction-levels-table th {
  font-weight: 600;
  color: var(--color-text);
}

.reaction-levels-table tr:last-child td {
  border-bottom: none;
}

/* ===== 无障碍：跳到主内容 ===== */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-to-content:focus {
  top: 0;
  outline: none;
}

/* ===== 无障碍：减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  .scan-line {
    animation: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 博客标签筛选 ===== */
.blog-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.blog-tag-filter-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-right: 0.25rem;
}

.blog-tag-btn {
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
}

.blog-tag-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.blog-tag-btn.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--color-accent);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.12);
}

[data-theme="light"] .blog-tag-btn.active {
  background: rgba(2, 132, 199, 0.09);
  border-color: rgba(2, 132, 199, 0.4);
}

/* ===== About 页面增强 ===== */
.about-block {
  margin-top: 2.5rem;
}

.about-block-title {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-weight: 400;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.about-block-title .accent {
  color: var(--color-accent);
  margin-right: 0.4rem;
}

.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-group-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 20px;
  color: var(--color-accent-dim);
  transition: var(--transition);
}

.skill-tag:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--color-accent);
}

[data-theme="light"] .skill-tag {
  background: rgba(2, 132, 199, 0.07);
  border-color: rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .skill-tag:hover {
  background: rgba(2, 132, 199, 0.12);
}

/* ===== About 时间轴 ===== */
.about-timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.4rem;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timeline-title {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.timeline-meta a {
  color: var(--color-accent-dim);
}

.timeline-meta a:hover {
  color: var(--color-accent);
}

/* ===== 文章导航（上一篇/下一篇）增强 ===== */
.article-nav-prev,
.article-nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: var(--transition);
  max-width: 280px;
}

.article-nav-prev:hover,
.article-nav-next:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.article-nav-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.article-nav-title {
  font-size: 0.85rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-nav-prev:hover .article-nav-title,
.article-nav-next:hover .article-nav-title {
  color: var(--color-accent);
}
