/* ==========================================================================
   Waves — 个人主页样式
   布局参考: Firefly (Navbar + Banner大标题 + 波浪 + 内容卡片)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS 变量
   -------------------------------------------------------------------------- */
:root {
  --page-bg: oklch(0.16 0.014 var(--hue));
  --card-bg: oklch(0.23 0.015 var(--hue));
  --card-bg-hover: oklch(0.26 0.018 var(--hue));
  --primary: oklch(0.75 0.14 var(--hue));
  --primary-muted: oklch(0.55 0.08 var(--hue));
  --btn-regular-bg: oklch(0.33 0.035 var(--hue));
  --btn-regular-bg-hover: oklch(0.38 0.04 var(--hue));
  --btn-regular-bg-active: oklch(0.43 0.045 var(--hue));
  --btn-content: oklch(0.75 0.1 var(--hue));
  --text-primary: oklch(0.95 0.01 var(--hue));
  --text-secondary: oklch(0.75 0.02 var(--hue));
  --text-muted: oklch(0.6 0.02 var(--hue));
  --card-border: rgba(255, 255, 255, 0.06);
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --content-max-w: 640px;
  --navbar-h: 56px;
}

/* --------------------------------------------------------------------------
   2. 亮色主题
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --page-bg: oklch(0.95 0.01 var(--hue));
  --card-bg: oklch(1 0.005 var(--hue));
  --card-bg-hover: oklch(0.96 0.01 var(--hue));
  --primary: oklch(0.6 0.16 var(--hue));
  --primary-muted: oklch(0.68 0.1 var(--hue));
  --btn-regular-bg: oklch(0.95 0.025 var(--hue));
  --btn-regular-bg-hover: oklch(0.9 0.05 var(--hue));
  --btn-regular-bg-active: oklch(0.85 0.08 var(--hue));
  --btn-content: oklch(0.55 0.12 var(--hue));
  --text-primary: oklch(0.18 0.02 var(--hue));
  --text-secondary: oklch(0.35 0.03 var(--hue));
  --text-muted: oklch(0.5 0.03 var(--hue));
  --card-border: rgba(0, 0, 0, 0.08);
}

/* 主题切换过渡 */
body, #navbar, .content-card, .link-card, .floating-btn, .site-footer {
  transition: background-color 0.35s var(--ease-standard),
              color 0.35s var(--ease-standard),
              border-color 0.35s var(--ease-standard),
              box-shadow 0.35s var(--ease-standard);
}

/* --------------------------------------------------------------------------
   3. 基础重置
   -------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    system-ui, -apple-system, sans-serif;
  background: var(--page-bg) url('/img/bg.jpg') center/cover no-repeat fixed;
  color: var(--text-primary);
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   4. 顶部导航栏 (参考 Firefly Navbar — 玻璃拟态)
   ========================================================================== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--navbar-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease-standard),
              border-color 0.3s var(--ease-standard),
              box-shadow 0.3s var(--ease-standard);
}

#navbar.scrolled {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--card-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] #navbar.scrolled {
  background: oklch(1 0.005 var(--hue) / 0.85);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  max-width: 960px; margin: 0 auto;
  height: 100%; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}

/* --------------------------------------------------------------------------
   4a. 品牌
   -------------------------------------------------------------------------- */
.nav-brand {
  font-size: 18px; font-weight: 700; color: #fff;
  text-decoration: none; letter-spacing: 0.04em;
  transition: color 0.3s ease;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  flex-shrink: 0; margin-right: 32px;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo { flex-shrink: 0; }
#navbar.scrolled .nav-brand { text-shadow: none; }
[data-theme="light"] #navbar.scrolled .nav-brand { color: var(--text-primary); }
.nav-brand:hover { color: var(--primary); }

/* --------------------------------------------------------------------------
   4b. 导航链接
   -------------------------------------------------------------------------- */
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.75);
  text-decoration: none; letter-spacing: 0.03em;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
#navbar.scrolled .nav-link { text-shadow: none; }
[data-theme="light"] #navbar.scrolled .nav-link { color: var(--text-secondary); }
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active { color: var(--primary); }
[data-theme="light"] .nav-link.active { color: var(--primary); }

/* --------------------------------------------------------------------------
   4c. 右侧操作区
   -------------------------------------------------------------------------- */
.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.nav-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: transparent; color: rgba(255,255,255,0.7);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
#navbar.scrolled .nav-icon-btn { color: var(--text-secondary); }
.nav-icon-btn:hover { color: var(--primary); background: rgba(255,255,255,0.06); }

/* --------------------------------------------------------------------------
   4d. 搜索框
   -------------------------------------------------------------------------- */
.search-box {
  position: relative; display: flex; align-items: center;
}
.search-input {
  position: absolute; right: 38px; top: 50%; transform: translateY(-50%);
  width: 0; height: 34px; padding: 0; border: none; border-radius: 100px;
  background: var(--card-bg); color: var(--text-primary);
  font-size: 14px; outline: none;
  transition: width 0.3s var(--ease-standard), padding 0.3s var(--ease-standard),
              border 0.3s var(--ease-standard);
  border: 1px solid transparent;
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }

.search-box.open .search-input {
  width: 180px; padding: 0 14px; border-color: var(--card-border);
}

@media (max-width: 480px) {
  .search-box.open .search-input { width: 130px; }
}

/* --------------------------------------------------------------------------
   4e. 主题色选择器
   -------------------------------------------------------------------------- */
.hue-picker { position: relative; }
.hue-dot {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: oklch(0.70 0.16 var(--hue));
  transition: background 0.3s ease;
}
.hue-toggle-btn:hover .hue-dot { border-color: #fff; }

.hue-dropdown {
  position: absolute; top: 44px; right: -8px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 10px; border-radius: var(--radius-xl);
  background: var(--card-bg); border: 1px solid var(--card-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.hue-dropdown.open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}

.hue-option {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent;
  background: var(--c); cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hue-option:hover { border-color: #fff; transform: scale(1.15); }
.hue-option:active { transform: scale(0.95); }

/* ==========================================================================
   5. Hero Banner
   ========================================================================== */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}

.banner-content {
  position: relative; z-index: 10; text-align: center;
  padding: 80px 24px 32px;  /* 顶部 padding 给 navbar 留空间 */
  animation: bannerIn 0.8s var(--ease-standard) both;
}
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 大标题 */
.banner-title {
  font-size: min(4rem, 12vw); font-weight: 700; color: #fff;
  letter-spacing: 0.06em; text-shadow: 0 4px 32px rgba(0,0,0,0.5);
  line-height: 1.15; margin-bottom: 8px;
}
.banner-subtitle {
  font-size: min(1.25rem, 4.5vw); color: rgba(255,255,255,0.75);
  letter-spacing: 0.05em; text-shadow: 0 2px 16px rgba(0,0,0,0.5); line-height: 1.6;
}
.banner-divider { height: 3px; width: 28px; margin: 16px auto 18px; border-radius: 100px; background: var(--primary); }

/* ==========================================================================
   6. 波浪
   ========================================================================== */
#header-waves {
  position: absolute; bottom: -1px; left: 0; width: 100%;
  height: 15vh; min-height: 50px; max-height: 150px;
  z-index: 5; pointer-events: none; isolation: isolate; contain: layout style;
  transform: translate3d(0,0,0); backface-visibility: hidden;
}
.waves { width: 100%; height: 100%; display: block; transform: translateZ(0); backface-visibility: hidden; }
.wave-layer { fill: var(--page-bg); }
.wave-layer-1 { opacity: 0.25; } .wave-layer-2 { opacity: 0.45; }
.wave-layer-3 { opacity: 0.60; } .wave-layer-4 { opacity: 0.75; }

.parallax > use {
  animation: wave 25s cubic-bezier(0.5,0.5,0.45,0.5) infinite;
  will-change: transform; transform: translateZ(0); backface-visibility: hidden;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes wave {
  0%   { transform: translate3d(-90px,0,0); }
  100% { transform: translate3d(85px,0,0); }
}

.scroll-hint {
  position: absolute; bottom: calc(15vh + 16px); left: 50%;
  transform: translateX(-50%); z-index: 10;
  animation: bounce 2s ease-in-out infinite; transition: opacity 0.3s ease;
}
.scroll-chevron { width: 28px; height: 28px; color: oklch(0.7 0.08 var(--hue)); }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(8px); }
}

/* ==========================================================================
   7. 内容区域
   ========================================================================== */
#content-wrapper {
  position: relative; z-index: 10; background: var(--page-bg); padding-top: 8px;
}

/* 三栏布局 */
.content-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 16px 48px;
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr minmax(200px, 240px);
  gap: 24px;
  align-items: start;
}

/* 中间主内容 */
.main-content { min-width: 0; }
.main-content .content-container { padding: 0; display: flex; flex-direction: column; gap: 20px; }

/* ====== 侧边栏通用 ====== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

.side-card {
  background: var(--card-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border); border-radius: var(--radius-2xl);
  padding: 16px 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.25s var(--ease-standard), box-shadow 0.25s var(--ease-standard);
}
.side-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.side-card-title {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}

/* ====== 个人信息卡片 ====== */
.profile-card { text-align: center; padding: 20px 16px; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 0 auto 12px; overflow: hidden; position: relative;
  background: var(--btn-regular-bg); color: var(--btn-content);
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar svg { width: 100%; height: 100%; opacity: 0.6; }
.profile-avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; z-index: 5;
}
.profile-name { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.profile-bio { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }
.profile-socials { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.social-btn {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--btn-regular-bg); color: var(--btn-content);
  font-size: 15px; text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social-btn:hover { background: var(--btn-regular-bg-hover); color: var(--text-primary); transform: translateY(-1px); }

/* ====== 音乐播放器 ====== */
.music-cover {
  width: 80px; height: 80px; border-radius: 50%;
  margin: 0 auto 12px; overflow: hidden;
  background: var(--btn-regular-bg); color: var(--btn-content);
  display: flex; align-items: center; justify-content: center;
  animation: spin 8s linear infinite paused;
}
.music-cover.playing { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-cover svg { width: 100%; height: 100%; }
.music-info { text-align: center; margin-bottom: 10px; }
.music-title { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.music-progress {
  height: 4px; border-radius: 2px; background: var(--btn-regular-bg);
  margin-bottom: 4px; cursor: pointer;
}
.music-progress-bar {
  height: 100%; border-radius: 2px; background: var(--primary);
  transition: width 0.3s linear;
}
.music-time { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.music-controls { display: flex; justify-content: center; align-items: center; gap: 8px; }
.music-btn {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--btn-regular-bg); color: var(--btn-content);
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.music-btn:hover { background: var(--btn-regular-bg-hover); color: var(--text-primary); }
.music-btn-play {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 15px;
}
.music-btn-play:hover { background: var(--primary-hover); color: #fff; }

/* ====== 站点统计 ====== */
.stats-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stats-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-secondary); padding: 6px 8px;
  border-radius: var(--radius); transition: background 0.15s ease;
}
.stats-item:hover { background: var(--btn-regular-bg); }
.stats-icon { width: 22px; font-size: 14px; color: var(--primary); text-align: center; }
.stats-label { flex: 1; }
.stats-value { font-weight: 600; color: var(--text-primary); }

/* ====== 日历 ====== */
.calendar-card .side-card-title { display: inline-flex; margin-bottom: 0; }
.calendar-nav { float: right; display: flex; gap: 2px; margin-bottom: 10px; }
.calendar-nav-btn {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: background 0.15s ease, color 0.15s ease;
}
.calendar-nav-btn:hover { background: var(--btn-regular-bg); color: var(--text-primary); }
.calendar-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; clear: both; }
.calendar-table th {
  color: var(--text-muted); font-weight: 500; padding: 6px 0;
  font-size: 12px;
}
.calendar-table th:first-child,
.calendar-table th:last-child { color: var(--text-muted); }
.calendar-table td {
  padding: 6px 0; color: var(--text-muted); border-radius: 50%;
  cursor: default; transition: background 0.15s ease, color 0.15s ease;
}
.calendar-table td:hover { background: var(--btn-regular-bg); }
.calendar-table .cal-today {
  background: var(--primary); color: #fff; font-weight: 600; border-radius: 50%;
}
.calendar-table .cal-weekend { opacity: 0.6; }

.content-card {
  background: var(--card-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border); border-radius: var(--radius-2xl);
  padding: 24px 28px; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Profile 卡片 */
.profile-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-card-avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.avatar-placeholder-sm {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 300; color: var(--primary);
  background: linear-gradient(135deg, oklch(0.25 0.03 var(--hue)), oklch(0.18 0.02 var(--hue)));
}
.profile-card-name { font-size: 18px; font-weight: 700; }
.profile-card-bio { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.profile-card-body { color: var(--text-secondary); font-size: 14px; line-height: 1.8; }

/* Widget 标题 */
.widget-title {
  font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.widget-title-bar { display: block; width: 4px; height: 18px; border-radius: 100px; background: var(--primary); flex-shrink: 0; }
.widget-body { color: var(--text-secondary); font-size: 14px; line-height: 1.8; letter-spacing: 0.02em; }
.widget-body p + p { margin-top: 8px; }
.widget-empty { color: var(--text-muted); font-style: italic; }

/* 链接网格 */
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.link-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-lg);
  background: var(--btn-regular-bg); color: var(--btn-content);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease;
}
.link-card:hover { background: var(--btn-regular-bg-hover); color: var(--text-primary); transform: translateY(-1px); }
.link-card:active { background: var(--btn-regular-bg-active); transform: scale(0.97); }
.link-card-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* 滚动入场 */
.onload-animation {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s var(--ease-standard), transform 0.5s var(--ease-standard);
}
.onload-animation.visible { opacity: 1; transform: translateY(0); }

/* 文章卡片 */
.article-card { cursor: pointer; transition: box-shadow 0.25s var(--ease-standard); }
.article-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
.article-card-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.article-card-date { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 8px; }
.article-card-summary { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
.article-read-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border: 1px solid var(--card-border); border-radius: 100px;
  background: var(--btn-regular-bg); color: var(--btn-content);
  font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.article-read-btn:hover { background: var(--btn-regular-bg-hover); border-color: rgba(255,255,255,0.12); color: var(--text-primary); }
.article-read-btn:active { transform: scale(0.96); }

/* 文章详情浮层 */
.article-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s var(--ease-standard), visibility 0.3s var(--ease-standard);
}
.article-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.article-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.article-detail {
  position: relative; z-index: 10;
  width: min(700px, 92vw); max-height: 85vh;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-2xl); padding: 32px;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  animation: overlayIn 0.3s var(--ease-standard) both;
}
@keyframes overlayIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.article-close-btn {
  position: sticky; top: 0; z-index: 20; float: right;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--btn-regular-bg); color: var(--text-secondary);
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.article-close-btn:hover { background: var(--btn-regular-bg-hover); color: var(--text-primary); }
.article-detail-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.article-detail-date { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--card-border); }
.article-detail-body { color: var(--text-secondary); font-size: 15px; line-height: 1.9; }
.article-detail-body h1, .article-detail-body h2, .article-detail-body h3 { color: var(--text-primary); margin-top: 1.5em; margin-bottom: 0.5em; }
.article-detail-body h1 { font-size: 1.5em; } .article-detail-body h2 { font-size: 1.25em; } .article-detail-body h3 { font-size: 1.1em; }
.article-detail-body p { margin-bottom: 0.8em; }
.article-detail-body code { background: var(--btn-regular-bg); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.article-detail-body pre { background: var(--bg, #0f172a); padding: 16px; border-radius: var(--radius-lg); overflow-x: auto; margin: 12px 0; }
.article-detail-body pre code { background: none; padding: 0; }
.article-detail-body img { max-width: 100%; border-radius: var(--radius-lg); }
.article-detail-body blockquote { border-left: 3px solid var(--primary); margin: 12px 0; padding: 4px 16px; color: var(--text-muted); }
.article-detail-body a { color: var(--primary); }

/* ====== 响应式：侧边栏 ====== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 12px 32px;
  }
  .sidebar-left, .sidebar-right { order: 1; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

@media (max-width: 640px) {
  .sidebar { grid-template-columns: 1fr; }
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { text-align: center; padding: 32px 20px 40px; color: var(--text-muted); font-size: 13px; letter-spacing: 0.03em; }

/* ==========================================================================
   9. 浮动按钮
   ========================================================================== */
.floating-controls { position: fixed; right: 20px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.floating-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--card-border); background: var(--card-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease,
              opacity 0.3s ease, visibility 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.floating-btn:hover { background: var(--card-bg-hover); color: var(--primary); transform: translateY(-1px); }
.floating-btn:active { transform: scale(0.93); }
.floating-btn svg { width: 20px; height: 20px; pointer-events: none; }
[data-theme="dark"] .icon-sun, [data-theme="light"] .icon-moon { display: none; }
#back-to-top { opacity: 0; visibility: hidden; pointer-events: none; }
#back-to-top.visible { opacity: 1; visibility: visible; pointer-events: auto; }

/* ==========================================================================
   10. 响应式
   ========================================================================== */
@media (max-width: 640px) {
  .banner-title { font-size: min(3rem, 11vw); }
  .banner-subtitle { font-size: min(1.1rem, 4vw); }
  .banner-divider { margin: 12px auto 14px; }

  .navbar-inner { padding: 0 14px; }
  .nav-brand { margin-right: 16px; font-size: 16px; }
  .nav-link { padding: 6px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
  .banner-content { padding: 72px 20px 24px; }
  .banner-title { font-size: min(2.5rem, 10vw); text-shadow: 0 3px 20px rgba(0,0,0,0.5); }
  .banner-subtitle { font-size: min(1rem, 3.8vw); }
  .nav-brand { margin-right: 8px; font-size: 15px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }

  .content-container { padding: 24px 16px 36px; gap: 16px; }
  .content-card { padding: 20px 18px; border-radius: var(--radius-xl); }
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

  #header-waves { height: 10vh; min-height: 40px; max-height: 100px; }
  .scroll-hint { bottom: calc(10vh + 12px); }
}

@media (max-width: 380px) {
  .banner-title { font-size: min(2.2rem, 10vw); }
  .links-grid { grid-template-columns: 1fr; }
  .floating-controls { right: 12px; bottom: 16px; gap: 8px; }
  .floating-btn { width: 38px; height: 38px; }
  .floating-btn svg { width: 18px; height: 18px; }
}
