/* PJAX 容器基础优化 */
#pjax-container {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1200px;
}

/* 离开动画（更克制、更高级） */
.pjax-leave {
  animation: pjaxFadeOut 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 进入动画（更柔顺） */
.pjax-enter {
  animation: pjaxFadeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 离开：轻微上移 + 微缩 + 减速 */
@keyframes pjaxFadeOut {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }
  60% {
    opacity: 0.6;
    transform: translate3d(0, -10px, 0) scale(0.995);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -18px, 0) scale(0.985);
    filter: blur(2px); /* 大幅降低 blur 提升性能 */
  }
}

/* 进入：带“惯性”的滑入 */
@keyframes pjaxFadeIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.985);
    filter: blur(4px);
  }
  60% {
    opacity: 0.85;
    transform: translate3d(0, -4px, 0) scale(1.002); /* 微回弹 */
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }
}

/* 背景过渡（防闪） */
body {
  background: var(--bg-color);
  transition: background 0.35s ease;
}

/* 可选：整体轻微柔化（更“玻璃感”） */
.pjax-enter,
.pjax-leave {
  transform-style: preserve-3d;
}

a:active {
  transform: scale(0.97);
  transition: transform 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
  .pjax-enter,
  .pjax-leave {
    animation: none !important;
  }
}
body.pjax-loading{cursor:wait}
@media(max-width:900px){.site-frame{margin-top:70px}.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6{scroll-margin-top:80px}}

body.pjax-loading{cursor:wait}
@media(max-width:900px){.site-frame{margin-top:70px}.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6{scroll-margin-top:80px}}
