/* 站点自定义样式：在 Butterfly 默认结构上做配色 / 字号 / 圆角微调 */

[data-theme='dark'] {
  --global-bg: #0b0e14;
  /* 卡片略微透出背景特效，但保证文字可读 */
  --card-bg: rgba(18, 22, 31, 0.78);
  --search-bg: #12151d;
  --font-color: rgba(255, 255, 255, 0.82);
  --text-highlight-color: #e9f1f6;
  --toc-link-color: rgba(255, 255, 255, 0.55);
  --blockquote-bg: rgba(34, 211, 238, 0.08);
}

body {
  font-size: 15px;
}

/* ---------- 导航：滚动后变深色玻璃条 ---------- */
[data-theme='dark'] #page-header.nav-fixed > #nav,
[data-theme='dark'] #page-header.not-top-img > #nav {
  background: rgba(11, 14, 20, 0.62) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

[data-theme='dark'] #nav a,
[data-theme='dark'] #nav span.site-page,
[data-theme='dark'] #nav .site-name {
  color: rgba(255, 255, 255, 0.78);
}

[data-theme='dark'] #nav a:hover,
[data-theme='dark'] #nav span.site-page:hover {
  color: #22d3ee;
}

/* ---------- 首屏 ---------- */
#page-header #site-title {
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 0 16px;
  word-break: break-word;
}

#page-header #site-subtitle {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  opacity: 0.88;
  padding: 0 16px;
}

@media (min-width: 768px) {
  #page-header #site-title {
    font-size: 3.6rem;
    padding: 0;
  }

  #page-header #site-subtitle {
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    padding: 0;
  }
}

/* ---------- 卡片 ---------- */
.recent-post-items > .recent-post-item,
.card-widget {
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.1);
  overflow: hidden;
}

.recent-post-items > .recent-post-item:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.card-widget {
  padding: 20px;
}

/* 卡片标题与摘要 */
#recent-posts .recent-post-info .article-title {
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

/* 侧栏小标题 */
.card-widget .item-headline {
  font-size: 1rem;
}

.card-widget .item-headline i {
  color: #22d3ee;
}

/* ---------- 文章 ---------- */
#post-info .post-title {
  font-size: 2.4rem;
  letter-spacing: 0.02em;
}

#article-container {
  font-size: 16px;
  line-height: 1.9;
}

#article-container h2 {
  font-size: 1.5rem;
  padding-bottom: 0.3em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#article-container h3 {
  font-size: 1.2rem;
}

#article-container pre {
  border-radius: 12px;
}

/* 首屏向下引导箭头弱化一点 */
#page-header #scroll-down {
  opacity: 0.65;
}

/* ---------- 相册 ---------- */
.photo-intro p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

@media (min-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

.photo-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.12);
  background: #0f121a;
}

.photo-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 !important;
  transition: transform 0.5s ease;
}

.photo-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.78), transparent 55%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-item:hover::after {
  opacity: 1;
}

.photo-cap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.photo-note {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- 灯箱 ---------- */
html.kb-lb-lock {
  overflow: hidden;
}

.kb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 10, 0.93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.kb-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.kb-lb-figure {
  margin: 0;
  max-width: 90vw;
  text-align: center;
}

.kb-lb-img {
  max-width: 88vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  filter: none !important;
}

.kb-lb-cap {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.kb-lb-count {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.kb-lb-close,
.kb-lb-prev,
.kb-lb-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.kb-lb-close {
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.kb-lb-prev,
.kb-lb-next {
  top: 50%;
  width: 46px;
  height: 66px;
  margin-top: -33px;
  border-radius: 10px;
  font-size: 1.1rem;
}

.kb-lb-prev {
  left: 24px;
}

.kb-lb-next {
  right: 24px;
}

.kb-lb-close:hover,
.kb-lb-prev:hover,
.kb-lb-next:hover {
  background: rgba(34, 211, 238, 0.18);
  color: #22d3ee;
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .kb-lb-prev,
  .kb-lb-next {
    width: 36px;
    height: 56px;
  }

  .kb-lb-prev {
    left: 10px;
  }

  .kb-lb-next {
    right: 10px;
  }
}

/* ---------- 环境音 ---------- */
.kb-ambient {
  position: fixed;
  right: 24px;
  bottom: 196px;
  z-index: 101;
}

.kb-ambient-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 18, 26, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #22d3ee;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.kb-ambient-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.55);
}

.kb-ambient.playing .kb-ambient-btn {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

.kb-ambient-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 224px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(13, 16, 23, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.kb-ambient.open .kb-ambient-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.kb-ambient-title {
  font-size: 0.86rem;
  color: #e9f1f6;
  margin-bottom: 10px;
}

.kb-ambient-title span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 6px;
}

.kb-ambient-play {
  width: 100%;
  padding: 7px 0;
  margin-bottom: 10px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.kb-ambient-play:hover {
  background: rgba(34, 211, 238, 0.2);
}

.kb-ambient-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.76rem;
  white-space: nowrap;
}

.kb-ambient-row input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}

.kb-ambient-row input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.kb-ambient-row input[type='range']::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #22d3ee;
}

.kb-ambient-hint {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.68rem;
  text-align: center;
}

@media (max-width: 768px) {
  .kb-ambient {
    right: 16px;
    bottom: 168px;
  }

  .kb-ambient-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ---------- 说说 ---------- */
.shuoshuo-item .container {
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.1);
  background: var(--card-bg);
  transition: border-color 0.3s ease;
}

.shuoshuo-item .container:hover {
  border-color: rgba(34, 211, 238, 0.28);
}

.shuoshuo-content {
  font-size: 15px;
  line-height: 1.85;
}

.shuoshuo-tag {
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.shuoshuo-avatar img {
  filter: none !important;
}

/* ---------- 全站动态背景（固定层，滚动不动） ---------- */
html {
  background: #05070c;
}

body {
  background: transparent !important;
}

#kb-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #05070c;
}

/* 背景照片：属于固定层，滚动时始终是同一张底图 */
#kb-bg .kb-photo {
  position: absolute;
  inset: -6%;
  background: url('/img/bg-scene.webp') center center / cover no-repeat;
  filter: saturate(0.7) brightness(0.56) contrast(1.06);
  transform: scale(1.04);
  transform-origin: 62% 42%;
  animation: kb-ken-burns 56s ease-in-out infinite alternate;
  will-change: transform;
}

/* 压暗 + 暗角，保证正文与卡片可读 */
#kb-bg .kb-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 92% at 50% 40%, rgba(5, 7, 12, 0.2), rgba(5, 7, 12, 0.58) 76%),
    linear-gradient(
      180deg,
      rgba(5, 7, 12, 0.7) 0%,
      rgba(5, 7, 12, 0.36) 36%,
      rgba(5, 7, 12, 0.58) 72%,
      rgba(5, 7, 12, 0.9) 100%
    );
}

#kb-bg::before,
#kb-bg::after {
  content: '';
  position: absolute;
  width: 68vmax;
  height: 68vmax;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.26;
  will-change: transform;
}

#kb-bg::before {
  left: -22vmax;
  top: -26vmax;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.5), transparent 62%);
  animation: kb-aurora-a 24s ease-in-out infinite alternate;
}

#kb-bg::after {
  right: -24vmax;
  bottom: -30vmax;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.52), transparent 62%);
  animation: kb-aurora-b 30s ease-in-out infinite alternate;
}

#kb-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.82;
}

@keyframes kb-aurora-a {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(9vw, 5vh, 0) scale(1.14);
  }
  100% {
    transform: translate3d(-5vw, 9vh, 0) scale(0.96);
  }
}

@keyframes kb-aurora-b {
  0% {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  50% {
    transform: translate3d(-8vw, -6vh, 0) scale(0.94);
  }
  100% {
    transform: translate3d(5vw, -10vh, 0) scale(1.16);
  }
}

/* 背景照片的极缓推镜（56s 一轮，肉眼几乎察觉不到切换） */
@keyframes kb-ken-burns {
  0% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.11) translate3d(-1.6%, -1.2%, 0);
  }
  100% {
    transform: scale(1.07) translate3d(1.8%, 1%, 0);
  }
}

/* 卡片加一点玻璃质感，让背景在缝隙里透出来 */
[data-theme='dark'] .recent-post-items > .recent-post-item,
[data-theme='dark'] .card-widget,
[data-theme='dark'] #article-container,
[data-theme='dark'] #post {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  /* 移动端换小图，省流量；压得更暗一点，小屏文字更易读 */
  #kb-bg .kb-photo {
    background-image: url('/img/bg-scene-sm.webp');
    filter: saturate(0.68) brightness(0.5) contrast(1.05);
    animation: none;
  }

  #kb-bg::before,
  #kb-bg::after {
    filter: blur(46px);
    opacity: 0.22;
  }

  #kb-bg canvas {
    opacity: 0.62;
  }
}

@media (prefers-reduced-motion: reduce) {
  #kb-bg::before,
  #kb-bg::after,
  #kb-bg .kb-photo {
    animation: none;
  }
}

/* ==========================================================================
   2026 视觉改版 · Neon Glass
   设计令牌 / 背景分层 / 首屏行书 / 卡片 / 文章阅读态 / 相册 / 说说 / 命令面板
   ========================================================================== */

:root {
  --kb-bg: #05070c;
  --kb-panel: rgba(18, 22, 31, 0.72);
  --kb-primary: #22d3ee;
  --kb-accent: #a855f7;
  --kb-ink: #e9f1f6;
  --kb-ink-2: rgba(255, 255, 255, 0.62);
  --kb-ink-3: rgba(255, 255, 255, 0.55);
  --kb-line: rgba(34, 211, 238, 0.14);
  --kb-line-hover: rgba(34, 211, 238, 0.38);
  --kb-radius: 16px;
  --kb-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --bg-photo-blur: 0px;
  --bg-photo-bright: 0.56;
  --bg-photo-opacity: 1;
}

[data-theme='dark'] {
  --global-bg: #05070c;
  --card-bg: rgba(18, 22, 31, 0.72);
  --font-color: rgba(233, 241, 246, 0.86);
  --text-highlight-color: #e9f1f6;
}

/* 内容区背景降档：首屏之后同图模糊压暗 */
html.bg-content {
  --bg-photo-blur: 18px;
  --bg-photo-bright: 0.35;
}

html.kb-reading {
  --bg-photo-blur: 20px;
  --bg-photo-bright: 0.3;
  --bg-photo-opacity: 0.55;
}

#kb-bg .kb-photo {
  filter: blur(var(--bg-photo-blur)) brightness(var(--bg-photo-bright)) saturate(0.62) contrast(1.05);
  opacity: var(--bg-photo-opacity);
  transition: filter 0.55s var(--kb-ease), opacity 0.55s var(--kb-ease);
}

/* ---------- 无障碍：跳转正文 + 焦点 ---------- */
.kb-skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 10000;
  padding: 8px 14px;
  color: #041018;
  background: var(--kb-primary);
  border-radius: 8px;
  font-size: 13px;
  transition: top 0.2s ease;
}

.kb-skip:focus {
  top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.kb-cmd-item:focus-visible {
  outline: 2px solid var(--kb-primary);
  outline-offset: 2px;
}

/* ---------- 顶部阅读进度条 ---------- */
#kb-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--kb-primary), var(--kb-accent));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
  pointer-events: none;
  transition: transform 0.1s linear;
}

/* ---------- 导航：下划线动效 + 玻璃条 ---------- */
#nav .site-page::after,
#nav .site-name::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  margin-top: 2px;
  background: linear-gradient(90deg, var(--kb-primary), var(--kb-accent));
  border-radius: 2px;
  transition: width 0.26s var(--kb-ease);
}

#nav .site-page:hover::after,
#nav .site-name:hover::after {
  width: 100%;
}

#nav .site-page.active::after {
  width: 100%;
}

#nav .menus_items {
  gap: 2px;
}

@media (min-width: 900px) {
  #nav .menus_items .site-page {
    padding: 0 10px;
    letter-spacing: 0.04em;
  }
}

/* ---------- 首屏：行书站名 + 定位 + CTA + 状态条 ---------- */
#page-header #site-title {
  font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', 'STXingkai', 'Xingkai SC', 'Songti SC', 'Noto Serif SC', serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 1.28;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  padding: 0 18px;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #d6f6ff 32%, #8fe8ff 52%, #c9a7ff 78%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.55));
}

/* 站名下方一笔淡墨横线，像书法落款 */
#page-header #site-title::after {
  content: '';
  display: block;
  width: 92px;
  height: 2px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.75), rgba(168, 85, 247, 0.6), transparent);
  border-radius: 2px;
}

#page-header #site-subtitle {
  font-family: 'Songti SC', 'Noto Serif SC', 'STSong', serif;
  font-size: 0.92rem;
  letter-spacing: 0.24em;
  color: rgba(233, 241, 246, 0.82);
}

@media (min-width: 768px) {
  #page-header #site-subtitle {
    font-size: 1.02rem;
  }
}

.kb-hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.kb-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  color: var(--kb-ink);
  background: rgba(11, 16, 23, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.2s var(--kb-ease), border-color 0.2s var(--kb-ease), background 0.2s var(--kb-ease);
}

.kb-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(15, 24, 34, 0.86);
  color: #fff;
}

.kb-btn-primary {
  border-color: transparent;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.22));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.18), inset 0 0 0 1px rgba(34, 211, 238, 0.5);
}

.kb-btn-primary:hover {
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.3), inset 0 0 0 1px rgba(34, 211, 238, 0.85);
}

.kb-hero-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}

.kb-hero-status i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--kb-primary);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.9);
  vertical-align: middle;
}

/* ---------- 首页卡片：玻璃 + 光斑 + featured ---------- */
.recent-post-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .recent-post-items {
    grid-template-columns: minmax(0, 1fr);
  }
}

.recent-post-items > .recent-post-item {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--kb-panel);
  border: 1px solid var(--kb-line);
  border-radius: var(--kb-radius);
  transition: transform 0.26s var(--kb-ease), border-color 0.26s var(--kb-ease), box-shadow 0.26s var(--kb-ease);
}

.recent-post-items > .recent-post-item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.14), transparent 62%);
  opacity: 0;
  transition: opacity 0.26s var(--kb-ease);
  pointer-events: none;
}

.recent-post-items > .recent-post-item:hover {
  transform: translateY(-2px);
  border-color: var(--kb-line-hover);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.recent-post-items > .recent-post-item:hover::after {
  opacity: 1;
}

.recent-post-items > .recent-post-item:first-child {
  grid-column: 1 / -1;
}

.recent-post-items > .recent-post-item:first-child .post_cover,
.recent-post-items > .recent-post-item:first-child > a:first-child {
  max-height: 380px;
}

#recent-posts .recent-post-info {
  padding: 18px 20px 20px;
}

#recent-posts .recent-post-info .article-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: var(--kb-ink);
}

#recent-posts .recent-post-info .article-title:hover {
  color: var(--kb-primary);
}

#recent-posts .recent-post-info .content {
  color: var(--kb-ink-2);
  font-size: 0.86rem;
  line-height: 1.72;
}

#recent-posts .post_cover img,
#recent-posts .article-cover img {
  transition: transform 0.42s var(--kb-ease);
}

.recent-post-items > .recent-post-item:hover .post_cover img,
.recent-post-items > .recent-post-item:hover .article-cover img {
  transform: scale(1.03);
}

/* 分类 / 标签 / 日期等元信息 */
#recent-posts .post-meta-container {
  color: var(--kb-ink-3);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

#recent-posts .post-meta-container i {
  color: var(--kb-primary);
}

/* 首屏滚动提示 */
#page-header #scroll-down {
  opacity: 0.55;
}

/* ---------- 文章页：阅读优先 ---------- */
#post-info .post-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #fff;
}

#article-container {
  font-size: 16px;
  line-height: 1.78;
  color: rgba(233, 241, 246, 0.9);
}

#article-container h2 {
  position: relative;
  padding: 0.1em 0 0.42em 14px;
  border-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}

#article-container h2::before {
  content: '';
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 3px;
  height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--kb-primary), var(--kb-accent));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

#article-container h2::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.22), transparent 70%);
}

#article-container h3 {
  font-size: 1.16rem;
  color: #fff;
}

#article-container pre {
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.1);
}

#article-container img {
  border-radius: 12px;
}

/* 文章 TOC 当前项 */
#toc .toc-link.active,
#toc .is-active-link {
  color: var(--kb-primary);
  font-weight: 600;
}

/* 文末作者卡（由 enhance.js 注入） */
.kb-author-card {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 32px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--kb-line);
  border-radius: var(--kb-radius);
  background: var(--kb-panel);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.kb-author-card img {
  width: 56px;
  height: 56px;
  margin: 0 !important;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.kb-author-card .kb-author-name {
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.04em;
}

.kb-author-card p {
  margin: 4px 0 0 !important;
  font-size: 0.8rem;
  color: var(--kb-ink-2) !important;
}

.kb-author-card a {
  margin-left: auto;
  padding: 7px 14px;
  border: 1px solid var(--kb-line);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--kb-ink-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.kb-author-card a:hover {
  color: var(--kb-primary);
  border-color: var(--kb-line-hover);
}

/* ---------- 侧栏卡片 ---------- */
.card-widget {
  padding: 20px;
  background: var(--kb-panel);
  border: 1px solid var(--kb-line);
  border-radius: var(--kb-radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.card-widget .item-headline i {
  color: var(--kb-primary);
}

#aside-content .card-info .button--animated {
  border-radius: 9px;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.18), rgba(168, 85, 247, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--kb-primary);
}

/* ---------- 页脚：三段式信息 + 渐变底 ---------- */
#footer {
  position: relative;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0) 0%, rgba(5, 7, 12, 0.78) 32%, #05070c 100%) !important;
  border-top: 1px solid rgba(34, 211, 238, 0.08) !important;
}

#footer::before {
  display: none;
}

#footer .footer-inner,
#footer-wrap {
  color: rgba(255, 255, 255, 0.55);
}

.kb-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.kb-footer-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.kb-footer-links a:hover {
  color: var(--kb-primary);
}

.kb-footer-links .kb-footer-admin {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
}

/* ---------- 相册：瀑布流 ---------- */
.photo-grid {
  columns: 3;
  column-gap: 14px;
  display: block;
}

@media (max-width: 900px) {
  .photo-grid {
    columns: 2;
    column-gap: 10px;
  }
}

.photo-item {
  display: block;
  break-inside: avoid;
  margin: 0 0 14px;
}

.photo-item img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.photo-cap {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s var(--kb-ease), transform 0.28s var(--kb-ease);
}

.photo-item:hover .photo-cap,
.photo-item:focus-visible .photo-cap {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  .photo-cap {
    opacity: 1;
    transform: none;
    font-size: 0.75rem;
  }
}

.photo-group {
  margin-bottom: 26px;
}

.photo-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
}

.photo-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.28), transparent);
}

/* ---------- 说说：竖时间轴 ---------- */
#shuoshuo {
  position: relative;
  padding-left: 22px;
}

#shuoshuo::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), rgba(168, 85, 247, 0.25), transparent);
}

.shuoshuo-item {
  position: relative;
  margin-bottom: 18px;
}

.shuoshuo-item::before {
  content: '';
  position: absolute;
  top: 22px;
  left: -21px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #05070c;
  border: 1px solid rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.55);
}

.shuoshuo-item .container {
  border-radius: var(--kb-radius);
  border: 1px solid var(--kb-line);
  background: var(--kb-panel);
}

.shuoshuo-item .shuoshuo-meta,
.shuoshuo-item time {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--kb-ink-3);
}

.kb-ss-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.kb-ss-chip {
  padding: 4px 12px;
  border: 1px solid var(--kb-line);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--kb-ink-2);
  background: rgba(18, 22, 31, 0.6);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kb-ss-chip:hover {
  color: var(--kb-primary);
  border-color: var(--kb-line-hover);
}

.kb-ss-chip.on {
  color: #06121b;
  background: var(--kb-primary);
  border-color: var(--kb-primary);
}

/* ---------- 命令面板 ⌘K ---------- */
html.kb-cmd-open {
  overflow: hidden;
}

.kb-cmd {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(3, 5, 8, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.kb-cmd.open {
  opacity: 1;
  visibility: visible;
}

.kb-cmd-box {
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 16px;
  background: rgba(11, 15, 22, 0.96);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.2s var(--kb-ease);
}

.kb-cmd.open .kb-cmd-box {
  transform: translateY(0) scale(1);
}

.kb-cmd-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.kb-cmd-input i {
  color: var(--kb-primary);
  font-size: 0.9rem;
}

.kb-cmd-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--kb-ink);
  font-size: 0.98rem;
}

.kb-cmd-input input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.kb-cmd-hint {
  padding: 3px 8px;
  border: 1px solid var(--kb-line);
  border-radius: 6px;
  font-size: 0.66rem;
  color: var(--kb-ink-3);
  white-space: nowrap;
}

.kb-cmd-list {
  max-height: 52vh;
  overflow-y: auto;
  padding: 8px;
}

.kb-cmd-group {
  padding: 8px 10px 4px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
}

.kb-cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--kb-ink-2);
  font-size: 0.86rem;
  cursor: pointer;
}

.kb-cmd-item .kb-cmd-kind {
  margin-left: auto;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.35);
}

.kb-cmd-item.active,
.kb-cmd-item:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.kb-cmd-empty {
  padding: 30px 10px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.35);
}

.kb-cmd-foot {
  display: flex;
  gap: 14px;
  padding: 9px 16px;
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- 404 ---------- */
.kb-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  text-align: center;
}

.kb-404-code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  color: transparent;
  background: linear-gradient(120deg, var(--kb-primary), var(--kb-accent));
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 34px rgba(34, 211, 238, 0.35));
}

.kb-404 p {
  margin: 12px 0 26px;
  color: var(--kb-ink-2);
  letter-spacing: 0.1em;
}

/* ---------- 响应式与降级 ---------- */
@media (max-width: 768px) {
  .recent-post-items > .recent-post-item:first-child {
    grid-column: auto;
  }

  .kb-author-card {
    flex-wrap: wrap;
  }

  .kb-author-card a {
    margin-left: 0;
  }

  .kb-cmd {
    padding-top: 8vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kb-hero-cta,
  .kb-btn,
  .recent-post-items > .recent-post-item,
  .photo-item img,
  .photo-cap {
    transition: none !important;
    transform: none !important;
  }
}

/* ---------- 关于页 ---------- */
.kb-about-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--kb-line);
  border-radius: var(--kb-radius);
  background: var(--kb-panel);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.kb-about-avatar {
  width: 96px;
  height: 96px;
  margin: 0 !important;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.2);
}

.kb-about-name {
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.5rem !important;
}

.kb-about-name span {
  margin-left: 8px;
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
}

.kb-about-line {
  margin: 0 !important;
  color: var(--kb-ink-2) !important;
  font-size: 0.88rem !important;
}

.kb-about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
}

.kb-about-tags span {
  padding: 4px 12px;
  border: 1px solid var(--kb-line);
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--kb-ink-2);
  background: rgba(18, 22, 31, 0.6);
}

.kb-about-h {
  margin: 28px 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1rem !important;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.72) !important;
}

.kb-about-h::before {
  display: none !important;
}

.kb-about-now,
.kb-about-time {
  padding-left: 18px !important;
  color: var(--kb-ink-2);
  font-size: 0.9rem;
  line-height: 1.9;
}

.kb-about-time b {
  display: inline-block;
  min-width: 76px;
  color: var(--kb-primary);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 500;
}

.kb-about-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.kb-about-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--kb-line);
  border-radius: 12px;
  background: rgba(18, 22, 31, 0.6);
  transition: border-color 0.24s var(--kb-ease), transform 0.24s var(--kb-ease);
}

a.kb-about-card:hover {
  transform: translateY(-2px);
  border-color: var(--kb-line-hover);
}

.kb-about-card strong {
  font-size: 0.92rem;
  color: #fff;
}

.kb-about-card span {
  font-size: 0.79rem;
  line-height: 1.7;
  color: var(--kb-ink-2);
}

.kb-about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  .kb-about-head {
    flex-direction: column;
    text-align: center;
  }
}

