/* ==========================================================================
   HBlog — Stylesheet v2.5 · Cyber Aurora Edition
   ========================================================================== */

/* ---------- 1. Tokens (v2.2 — 紧凑缩放 + 性能优化) ---------- */
:root {
    --c-bg-0:       #05050d;
    --c-bg-1:       #0a0a1a;
    --c-bg-2:       #12122a;
    --c-surface:    rgba(18, 18, 38, 0.55);
    --c-surface-2:  rgba(28, 28, 58, 0.45);
    --c-border:     rgba(120, 130, 255, 0.14);
    --c-border-lit: rgba(0, 217, 255, 0.45);

    --c-text:       #e8eaf4;
    --c-text-dim:   #a6acc4;
    --c-text-faint: #5a5f7c;

    --c-cyan:       #00d9ff;
    --c-purple:     #b537f2;
    --c-pink:       #ff2e9a;
    --c-green:      #00ff88;
    --c-yellow:     #ffcb3d;

    --grad-main:    linear-gradient(120deg, #00d9ff 0%, #b537f2 55%, #ff2e9a 100%);
    --grad-soft:    linear-gradient(120deg, rgba(0,217,255,.18), rgba(181,55,242,.18), rgba(255,46,154,.18));

    --shadow-lg:    0 30px 80px rgba(0, 0, 0, 0.55);
    --shadow-neon:  0 0 40px rgba(0, 217, 255, 0.35);

    --ease-out:     ease-out;
    --ease-back:    ease-out;
    --ease-power:   ease-out;

    --nav-h:        52px;
    --radius:       14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    overflow: hidden; /* SPA Hub：禁止整页滚动，由 JS 控制 */
}

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    background: var(--c-bg-0);
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    position: relative;
}

/* 非主页（blog list / post detail）允许滚动 */
body[data-page="blogs"],
body[data-page="post"] {
    overflow-y: auto;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; color: inherit; }
ul, ol { list-style: none; }

::selection { background: rgba(0, 217, 255, 0.3); color: #fff; }

/* ---------- 2. Background Layers (v2.2 性能优化版) ---------- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(181, 55, 242, 0.18), transparent 60%),
        radial-gradient(ellipse 100% 80% at 100% 100%, rgba(0, 217, 255, 0.12), transparent 60%),
        radial-gradient(ellipse 80% 80% at 0% 100%, rgba(255, 46, 154, 0.10), transparent 60%),
        var(--c-bg-0);
}

/* ---- 纯CSS星空（GPU合成，零JS，60fps） ---- */
.css-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.css-stars::before,
.css-stars::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}
/* 小星星层 */
.css-stars::before {
    background:
        radial-gradient(1px 1px at 10% 8%,   rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 22% 15%,  rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 35% 25%,  rgba(200,220,255,.8), transparent),
        radial-gradient(1px 1px at 48% 5%,   rgba(255,255,255,.6), transparent),
        radial-gradient(1px 1px at 55% 40%,  rgba(200,240,255,.9), transparent),
        radial-gradient(1px 1px at 68% 12%,  rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 75% 35%,  rgba(180,220,255,.8), transparent),
        radial-gradient(1px 1px at 85% 8%,   rgba(255,255,255,.6), transparent),
        radial-gradient(1px 1px at 92% 28%,  rgba(200,220,255,.9), transparent),
        radial-gradient(1px 1px at 15% 55%,  rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 30% 48%,  rgba(200,240,255,.7), transparent),
        radial-gradient(1px 1px at 42% 62%,  rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 58% 55%,  rgba(180,220,255,.6), transparent),
        radial-gradient(1px 1px at 72% 70%,  rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 88% 58%,  rgba(200,240,255,.5), transparent),
        radial-gradient(1px 1px at 5%  78%,  rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 20% 85%,  rgba(200,220,255,.6), transparent),
        radial-gradient(1px 1px at 38% 75%,  rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 52% 88%,  rgba(180,220,255,.5), transparent),
        radial-gradient(1px 1px at 65% 80%,  rgba(255,255,255,.6), transparent),
        radial-gradient(1px 1px at 80% 90%,  rgba(200,240,255,.7), transparent),
        radial-gradient(1px 1px at 95% 72%,  rgba(255,255,255,.5), transparent);
    background-size: 200% 200%;
    animation: starDrift 60s linear infinite;
    opacity: 0.7;
}
/* 中星星层 */
.css-stars::after {
    background:
        radial-gradient(2px 2px at 8%  20%,  rgba(200,240,255,.9), transparent),
        radial-gradient(2px 2px at 28% 32%,  rgba(255,255,255,1), transparent),
        radial-gradient(2px 2px at 44% 10%,  rgba(180,220,255,.8), transparent),
        radial-gradient(2px 2px at 62% 45%,  rgba(255,255,255,.9), transparent),
        radial-gradient(2px 2px at 78% 18%,  rgba(200,240,255,.7), transparent),
        radial-gradient(2px 2px at 18% 65%,  rgba(255,255,255,.8), transparent),
        radial-gradient(2px 2px at 35% 52%,  rgba(200,220,255,.9), transparent),
        radial-gradient(2px 2px at 55% 72%,  rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 70% 60%,  rgba(180,240,255,.8), transparent),
        radial-gradient(2px 2px at 90% 50%,  rgba(255,255,255,.6), transparent),
        radial-gradient(2px 2px at 12% 42%,  rgba(200,240,255,.7), transparent),
        radial-gradient(2px 2px at 50% 80%,  rgba(255,255,255,.8), transparent);
    background-size: 300% 300%;
    animation: starDrift 90s linear infinite reverse;
    opacity: 0.5;
}
@keyframes starDrift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-3%, -2%); }
}

/* 三色极光（性能优化：模糊从60px→30px）*/
.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.45;
    will-change: transform;
    pointer-events: none;
}
.aurora-1 {
    width: 420px; height: 420px;
    top: -10%; left: -10%;
    background: radial-gradient(circle, #00d9ff 0%, transparent 65%);
    animation: floatA 28s ease-in-out infinite;
}
.aurora-2 {
    width: 460px; height: 460px;
    bottom: -15%; right: -12%;
    background: radial-gradient(circle, #b537f2 0%, transparent 65%);
    animation: floatB 34s ease-in-out infinite;
}
.aurora-3 {
    width: 360px; height: 360px;
    top: 40%; left: 40%;
    background: radial-gradient(circle, #ff2e9a 0%, transparent 65%);
    animation: floatC 40s ease-in-out infinite;
    opacity: 0.3;
}
@keyframes floatA {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    50%     { transform: translate3d(80px, 50px, 0) scale(1.1); }
}
@keyframes floatB {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    50%     { transform: translate3d(-90px, -40px, 0) scale(1.08); }
}
@keyframes floatC {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    33%     { transform: translate3d(-60px, 40px, 0) scale(1.15); }
    66%     { transform: translate3d(50px, -60px, 0) scale(.92); }
}

/* 赛博网格 */
.cyber-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 40%, transparent 85%);
    animation: gridShift 24s linear infinite;
    opacity: 0.7;
}
@keyframes gridShift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 60px 60px, 60px 60px; }
}

/* 顶部扫描光带已移除以提升性能 */

.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

/* ---------- 3. Scroll Progress Bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: var(--grad-main);
    z-index: 1000;
    box-shadow: 0 0 10px currentColor;
    transition: width .1s linear;
}

/* ---------- 4. Navbar (Smart Mode) ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background .4s, backdrop-filter .4s, border-color .4s;
    border-bottom: 1px solid transparent;
}
.nav-inner {
    max-width: 1300px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

/* 主页：完全透明，只保留 logo 和极简菜单 */
.navbar[data-minimal="true"] {
    background: transparent;
    backdrop-filter: none;
    border-bottom-color: transparent;
}
.navbar[data-minimal="true"] .nav-status { opacity: 0.6; }

/* 其他页面：半透明态（无反光玻璃以保60fps） */
.navbar[data-minimal="false"] {
    background: rgba(10, 10, 26, 0.78);
    border-bottom-color: var(--c-border);
}
.navbar[data-minimal="false"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg,
            transparent 0%,
            rgba(0, 217, 255, 0.04) 20%,
            rgba(181, 55, 242, 0.06) 50%,
            rgba(255, 46, 154, 0.04) 80%,
            transparent 100%);
    pointer-events: none;
}

/* 滚动后加深 */
.navbar.scrolled {
    background: rgba(5, 5, 13, 0.85) !important;
    border-bottom-color: rgba(0, 217, 255, 0.2) !important;
}

/* 底部流光线 */
.nav-glow {
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-cyan) 30%, var(--c-purple) 50%, var(--c-pink) 70%, transparent);
    opacity: 0;
    transition: opacity .4s;
}
.navbar[data-minimal="false"] .nav-glow { opacity: 0.5; }

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 16px;
}
.logo-mark {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid var(--c-border-lit);
    border-radius: 8px;
    box-shadow: inset 0 0 16px rgba(0, 217, 255, 0.12);
    transition: transform .4s ease-out, box-shadow .4s;
}
.logo:hover .logo-mark {
    transform: rotate(-15deg) scale(1.1);
    box-shadow: inset 0 0 24px rgba(0, 217, 255, 0.4), 0 0 20px rgba(0, 217, 255, 0.35);
}
.logo-text { color: var(--c-text); }
.logo-text em {
    font-style: normal;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    padding: 4px;
}
.navbar[data-minimal="true"] .nav-links {
    background: rgba(255, 255, 255, 0.04);
}
.nav-link {
    position: relative;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--c-text-dim);
    border-radius: 99px;
    transition: color .3s;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}
.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: var(--grad-main);
    opacity: 0;
    transition: opacity .35s;
    z-index: -1;
}
.nav-link:hover { color: #fff; }
.nav-link.active {
    color: #fff;
}
.nav-link.active::before { opacity: 1; }

/* Status */
.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--c-green);
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 10px var(--c-green);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

.main-content {
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   5. Hub Stage — 四向导航舞台（v2.2 性能优化：无 blur 过渡）
   ========================================================================== */
.hub-stage {
    position: fixed;
    inset: 0;
    overflow: hidden;
    perspective: 1400px;
    transform-style: preserve-3d;
}

.panel {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--nav-h) 24px 16px;
    transition:
        transform 0.4s ease-out,
        opacity 0.3s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    pointer-events: none;
}

/* ---- 初始位置 ---- */
.panel-center  { transform: translate3d(0, 0, 0); opacity: 1; pointer-events: auto; }

.panel-top     {
    transform: translate3d(0, -105%, 0);
    opacity: 0;
}
.panel-bottom  {
    transform: translate3d(0, 105%, 0);
    opacity: 0;
}

/* 左：Links 抽屉 */
.panel-left    {
    width: min(380px, 85vw);
    left: 0;
    right: auto;
    transform: translate3d(-110%, 0, 0);
    opacity: 1;
    z-index: 5;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 14px) 20px 16px;
    background:
        linear-gradient(135deg, rgba(10, 10, 26, 0.92), rgba(20, 10, 40, 0.88));
    border-right: 1px solid var(--c-border-lit);
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(0, 217, 255, 0.15);
}

/* ---- 激活态 ---- */

/* Terminal 切入：center 下移消失，top 滑入 */
.hub-stage[data-active="terminal"] .panel-center {
    transform: translate3d(0, 105%, -150px) scale(0.9);
    opacity: 0;
}
.hub-stage[data-active="terminal"] .panel-top {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
}

/* About 切入：center 上移消失，bottom 滑入 */
.hub-stage[data-active="about"] .panel-center {
    transform: translate3d(0, -105%, -150px) scale(0.9);
    opacity: 0;
}
.hub-stage[data-active="about"] .panel-bottom {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
}

/* Links 切入：抽屉滑入，中央不变暗（美学需求） */
.hub-stage[data-active="links"] .panel-center {
    transform: translate3d(140px, 0, 0);
    /* 不暗化、不缩放——保留主页原貌 */
}
.hub-stage[data-active="links"] .panel-left {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

/* Blogs 飞出：center 缩小成卡片向右翻转飞出 */
.hub-stage[data-active="blogs"] .panel-center {
    transform-origin: center center;
    transform: perspective(800px) rotateY(-60deg) rotateZ(5deg) scale(0.55) translateX(90vw);
    opacity: 0;
    transition:
        transform 0.5s cubic-bezier(0.55, 0, 0.45, 1),
        opacity 0.35s ease-out;
}

/* ---- 翻页闪光（简化为快速淡出光带，不占用GPU） ---- */
.page-flip {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
}
.page-flip.active {
    opacity: 1;
    visibility: visible;
}
.flip-inner {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse 120% 100% at left center, rgba(0,217,255,0.25), transparent 70%);
    animation: flipFlash 0.5s ease-out;
}
@keyframes flipFlash {
    0%   { opacity: 0; transform: scaleX(0.3); }
    40%  { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1.5); }
}
.flip-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.2em;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: flipTextPulse 0.5s ease-out;
}
@keyframes flipTextPulse {
    0%   { transform: scale(0.5); opacity: 0; }
    40%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 0.6; }
}

/* ==========================================================================
   6. Hero 中央面板内容（v2.2 紧凑版）
   ========================================================================== */
.hero-wrap {
    position: relative;
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 12px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}
.orb-1 {
    width: 240px; height: 240px;
    top: -30px; left: -60px;
    background: radial-gradient(circle, rgba(0,217,255,.4), transparent 70%);
    animation: floatA 18s ease-in-out infinite;
}
.orb-2 {
    width: 280px; height: 280px;
    bottom: -40px; right: -40px;
    background: radial-gradient(circle, rgba(255,46,154,.35), transparent 70%);
    animation: floatB 22s ease-in-out infinite;
}

/* 徽章 */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--c-cyan);
    background: rgba(0, 217, 255, 0.06);
    border: 1px solid var(--c-border-lit);
    border-radius: 99px;
    margin-bottom: 24px;
    animation: fadeDown .8s ease-out both;
}
.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 8px var(--c-cyan);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 主标题 — 缩小版 */
.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(38px, 7.5vw, 90px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}
.hello-line, .name-line {
    display: block;
}
.hello-line {
    color: #fff;
    margin-bottom: 4px;
}
.hello-line .char {
    display: inline-block;
    opacity: 0;
    animation: charDrop .5s ease-out both;
    animation-delay: calc(0.06s * var(--i));
}
.hello-line .comma {
    color: var(--c-cyan);
    text-shadow: 0 0 16px rgba(0,217,255,.6);
}
@keyframes charDrop {
    from { opacity: 0; transform: translateY(-30px) rotate(-8deg); }
    to   { opacity: 1; transform: translateY(0) rotate(0); }
}

.name-line {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.2em;
    animation: fadeUp .8s .5s ease-out both;
}
.name-line .grad {
    background: var(--grad-main);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradShift 5s ease-in-out infinite;
    filter: drop-shadow(0 0 24px rgba(181, 55, 242, 0.35));
}
.name-line .name {
    position: relative;
}
.name-line .name::after {
    content: attr(data-text);
    position: absolute;
    left: 2px; top: 0;
    color: var(--c-pink);
    opacity: .55;
    mix-blend-mode: screen;
    animation: glitchShift 3.5s infinite steps(1);
    pointer-events: none;
}
@keyframes gradShift {
    0%,100% { background-position: 0% 50%; }
    50%     { background-position: 100% 50%; }
}
@keyframes glitchShift {
    0%,90%,100% { transform: translate(0,0); opacity:0; }
    92%        { transform: translate(-3px, 1px); opacity: .7; }
    94%        { transform: translate(3px, -1px); opacity: .5; }
    96%        { transform: translate(-1px, 2px); opacity: .6; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cursor-blink {
    color: var(--c-cyan);
    animation: blink 1s steps(2) infinite;
    margin-left: 0.15em;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* 打字机副标题 */
.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(12px, 1.3vw, 15px);
    color: var(--c-text-dim);
    margin: 16px auto 28px;
    min-height: 1.6em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: fadeUp .8s 1s ease-out both;
}
.prompt { color: var(--c-green); font-weight: 700; }
.type-cursor {
    color: var(--c-cyan);
    animation: blink 1s steps(2) infinite;
}

/* Meta 统计 */
.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 10px 22px;
    background: rgba(10, 10, 26, 0.55);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    margin-bottom: 36px;
    animation: fadeUp .8s 1.3s ease-out both;
}
.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.meta-num {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 17px;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.meta-num.pulse-text {
    color: var(--c-green);
    background: none;
    -webkit-text-fill-color: var(--c-green);
    animation: pulse 1.2s ease-in-out infinite;
}
.meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--c-text-faint);
}
.meta-sep {
    width: 1px; height: 22px;
    background: var(--c-border);
}

/* ==========================================================================
   7. Compass 四向导航罗盘（v2.2 紧凑版）
   ========================================================================== */
.compass {
    position: relative;
    width: min(420px, 85vw);
    height: 200px;
    margin: 0 auto 32px;
    animation: fadeUp .8s 1.6s ease-out both;
}

.compass-btn {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    color: var(--c-text-dim);
    transition: all .3s ease-out;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}
.compass-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-soft);
    opacity: 0;
    transition: opacity .3s;
}
.compass-btn > * { position: relative; z-index: 1; }

.compass-btn:hover {
    color: #fff;
    border-color: var(--c-border-lit);
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(0, 217, 255, 0.22);
}
.compass-btn:hover::before { opacity: 1; }
.compass-btn:hover .compass-icon {
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.4);
}

.compass-icon {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: rgba(0, 217, 255, 0.1);
    color: var(--c-cyan);
    border-radius: 8px;
    transition: all .3s;
    flex-shrink: 0;
}
.compass-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.compass-label {
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 11px;
}
.compass-hint {
    font-size: 8px;
    color: var(--c-text-faint);
    letter-spacing: 0.12em;
    margin-top: 1px;
}

/* 定位 */
.compass-up    { top: 0;    left: 50%; transform: translateX(-50%); }
.compass-down  { bottom: 0; left: 50%; transform: translateX(-50%); }
.compass-left  { left: 0;   top: 50%;  transform: translateY(-50%); }
.compass-right { right: 0;  top: 50%;  transform: translateY(-50%); }

.compass-up:hover    { transform: translateX(-50%) translateY(-4px) scale(1.06); }
.compass-down:hover  { transform: translateX(-50%) translateY(4px)  scale(1.06); }
.compass-left:hover  { transform: translateY(-50%) translateX(-4px) scale(1.06); }
.compass-right:hover { transform: translateY(-50%) translateX(4px)  scale(1.06); }

/* 中心核 */
.compass-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    display: grid;
    place-items: center;
}
.core-ring {
    position: absolute;
    inset: 0;
    border: 1px dashed var(--c-border-lit);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}
.core-ring.r2 {
    inset: 10px;
    border-style: solid;
    border-color: transparent;
    border-top-color: var(--c-cyan);
    border-right-color: var(--c-purple);
    animation: spin 8s linear infinite reverse;
    opacity: 0.5;
}
.core-dot {
    width: 8px; height: 8px;
    background: var(--grad-main);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.8);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 键位提示 */
.key-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--c-text-faint);
    letter-spacing: 0.08em;
    animation: fadeUp .8s 1.9s ease-out both;
}
.key-hint kbd {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--c-border);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-size: 10px;
    color: var(--c-text-dim);
}
.key-hint span { margin: 0 6px; }

/* ==========================================================================
   8. Holographic Terminal Panel（v2.2 紧凑 + 无 backdrop-filter）
   ========================================================================== */
.panel-top {
    align-items: center;
    padding-top: var(--nav-h);
}
.terminal-shell {
    position: relative;
    width: min(820px, 94vw);
    height: min(480px, 60vh);
    background:
        linear-gradient(135deg, rgba(0, 30, 40, 0.88), rgba(10, 5, 30, 0.88));
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 14px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 217, 255, 0.18),
        inset 0 0 30px rgba(0, 255, 200, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
/* 全息边框光流（简化为静态渐变）*/
.terminal-shell::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg,
        rgba(0, 217, 255, 0.4),
        transparent 40%,
        transparent 60%,
        rgba(0, 255, 200, 0.3));
    border-radius: 15px;
    opacity: 0.4;
    z-index: -1;
}

.terminal-chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(0, 255, 200, 0.2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}
.term-dots { display: flex; gap: 6px; }
.td {
    width: 10px; height: 10px;
    border-radius: 50%;
    box-shadow: inset 0 0 3px rgba(0,0,0,.4);
}
.td-r { background: #ff5f56; }
.td-y { background: #ffbd2e; }
.td-g { background: #27c93f; }
.term-title {
    flex: 1;
    text-align: center;
    color: rgba(0, 255, 200, 0.5);
    letter-spacing: 0.08em;
}
.term-signal {
    color: var(--c-green);
    font-size: 9px;
    letter-spacing: 0.15em;
}

.terminal-body {
    flex: 1;
    padding: 18px 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(200, 255, 240, 0.85);
    overflow-y: auto;
    text-shadow: 0 0 3px rgba(0, 255, 180, 0.25);
}
.term-line { margin-bottom: 4px; }
.t-prompt { color: #00ff88; font-weight: 700; }
.t-colon  { color: rgba(255,255,255,.5); }
.t-path   { color: #00d9ff; }
.t-dollar { color: var(--c-pink); margin-right: 6px; }
.t-cmd    { color: #fff; }
.t-cmd.t-muted { color: rgba(255,255,255,.6); }
.t-g      { color: #00ff88; }
.t-k      { color: #00d9ff; font-weight: 700; }
.term-output { margin: 8px 0 18px; color: rgba(200,255,240,.75); }
.term-output.t-dim { color: rgba(200,255,240,.55); font-style: italic; }
.term-art {
    color: transparent;
    background: linear-gradient(135deg, #00d9ff 0%, #00ff88 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 11px;
    line-height: 1.1;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 6px rgba(0, 217, 255, 0.5));
}

/* 终端交互输入 */
.term-input-line {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 0;
    border-top: 1px solid rgba(0,255,200,.1);
    padding-top: 10px;
}
.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    caret-color: #00ff88;
    margin-left: 4px;
}
.term-input::placeholder { color: rgba(0,255,200,.25); }
.term-cmd-echo {
    color: rgba(200,255,240,.7);
}
.term-info > div { color: rgba(200,255,240,.8); }
.t-cursor-term {
    color: #00ff88;
    animation: blink 1s steps(2) infinite;
}

/* 全息扫描线 & CRT 闪烁已移除以提升性能 */

.panel-back {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
}
.back-btn {
    padding: 10px 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--c-text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    transition: all .3s;
}
.back-btn:hover {
    color: #fff;
    border-color: var(--c-border-lit);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    transform: scale(1.05);
}
.back-btn span {
    display: inline-block;
    margin-right: 8px;
    color: var(--c-cyan);
    font-size: 14px;
}

/* ==========================================================================
   9. About Panel（v2.2 紧凑版）
   ========================================================================== */
.panel-bottom {
    align-items: flex-start;
    padding-top: calc(var(--nav-h) + 10px);
    overflow-y: auto;
}
.about-wrap {
    width: min(950px, 95%);
    margin: 0 auto;
    padding-bottom: 16px;
}
.about-grid {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 28px;
    align-items: start;
}

/* 头像卡 */
.about-avatar-card {
    text-align: center;
    padding: 24px 18px;
    background:
        linear-gradient(180deg, rgba(18, 18, 38, 0.7), rgba(18, 18, 38, 0.4));
    border: 1px solid var(--c-border);
    border-radius: 18px;
    overflow: hidden;
}
.about-avatar-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-soft);
    opacity: 0.4;
    pointer-events: none;
}
.avatar-frame {
    position: relative;
    width: 110px; height: 110px;
    margin: 0 auto 10px;
}
.avatar-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 2px solid rgba(0, 217, 255, 0.3);
    box-shadow:
        0 0 30px rgba(0, 217, 255, 0.35),
        0 0 60px rgba(181, 55, 242, 0.18);
}
.avatar-ring, .avatar-ring.r2 {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 217, 255, 0.4);
    animation: spin 18s linear infinite;
    z-index: 1;
}
.avatar-ring.r2 {
    inset: -18px;
    border-style: solid;
    border-color: transparent;
    border-top-color: var(--c-purple);
    border-bottom-color: var(--c-pink);
    animation: spin 10s linear infinite reverse;
    opacity: 0.5;
}
.avatar-scan {
    position: absolute;
    top: 0; left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--c-cyan), transparent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--c-cyan);
    animation: avatarScan 3s ease-in-out infinite;
    z-index: 3;
}
@keyframes avatarScan {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50%      { transform: translateY(138px); opacity: 1; }
}

.avatar-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 3px;
    position: relative;
    z-index: 2;
}
.avatar-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--c-text-dim);
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}
.avatar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.atag {
    padding: 3px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--c-cyan);
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.25);
    border-radius: 4px;
    letter-spacing: 0.04em;
}

/* 右侧内容 */
.about-content .grad {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.about-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-cyan);
    letter-spacing: 0.18em;
    margin-bottom: 12px;
}
.about-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.about-para {
    color: var(--c-text-dim);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 18px;
    max-width: 580px;
}
.about-para strong {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(120deg, transparent 0%, transparent 50%, rgba(0, 217, 255, 0.18) 50%);
    background-size: 200% 100%;
    padding: 0 4px;
}

/* 技能条 */
.about-skills {
    display: grid;
    gap: 14px;
    margin-bottom: 36px;
    max-width: 620px;
}
.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}
.skill-name { color: var(--c-text); }
.skill-lvl  {
    color: var(--c-cyan);
    font-size: 10px;
    letter-spacing: 0.15em;
    padding: 2px 8px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 4px;
}
.skill-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.skill-fill {
    height: 100%;
    width: var(--w);
    background: var(--grad-main);
    background-size: 200% 100%;
    border-radius: 4px;
    position: relative;
    animation: skillShift 4s linear infinite;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
}
.skill-fill::after {
    content: '';
    position: absolute;
    top: -2px; right: -3px;
    width: 6px; height: 8px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 8px var(--c-cyan);
}
@keyframes skillShift {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

/* Now */
.about-now {
    padding: 20px 24px;
    background: rgba(0, 217, 255, 0.04);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 14px;
    margin-bottom: 32px;
    max-width: 620px;
}
.now-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--c-green);
    margin-bottom: 10px;
}
.now-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 10px var(--c-green);
    animation: pulse 1.2s ease-in-out infinite;
}
.now-list li {
    color: var(--c-text-dim);
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 14px;
}
.now-list li::before {
    content: '›';
    position: absolute;
    left: 4px;
    color: var(--c-cyan);
    font-weight: 700;
}

/* CTA */
.about-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.cta-primary, .cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    border-radius: 99px;
    transition: all .3s;
    font-weight: 600;
}
.cta-primary {
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 10px 30px rgba(181, 55, 242, 0.3);
}
.cta-primary:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 40px rgba(181, 55, 242, 0.5);
}
.cta-primary span { transition: transform .3s; }
.cta-primary:hover span { transform: translateX(4px); }

.cta-ghost {
    color: var(--c-text-dim);
    border: 1px solid var(--c-border);
    background: transparent;
}
.cta-ghost:hover {
    color: #fff;
    border-color: var(--c-border-lit);
    background: rgba(0, 217, 255, 0.05);
}

/* ===== About scroll-area：面板整体上移露出底部版权 ===== */
.panel-bottom {
    overflow: hidden !important; /* 彻底禁用原生滚动，防止与弹簧冲突 */
}
.about-scroll-area {
    width: 100%;
    min-height: 100%;           /* 允许内容超出面板高度 */
    transform: translate3d(0, 0, 0);
    /* 丝滑弹簧曲线 */
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.panel-bottom.pushed-up .about-scroll-area {
    transform: translate3d(0, -210px, 0);  /* 上移足够多，露出底部版权 */
}

/* ===== About Footer（在 about-scroll-area 内部，上移后自然可见） ===== */
.about-footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 0 60px;
    text-align: center;
}
.footer-divider {
    width: 80px;
    height: 2px;
    margin: 0 auto 28px;
    background: var(--grad-main);
    border-radius: 2px;
    opacity: 0.6;
}
.footer-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--c-text-faint);
    letter-spacing: 0.06em;
    line-height: 2.2;
}
.footer-line .grad {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}
.footer-uptime {
    font-size: 11px;
    color: var(--c-text-dim);
}
.footer-uptime span {
    color: var(--c-cyan);
    font-weight: 700;
}
.footer-thanks {
    margin-top: 16px;
    font-size: 11px;
    opacity: 0.5;
}

/* ==========================================================================
   10. Links Drawer
   ========================================================================== */
.drawer-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}
.drawer-head { margin-bottom: 36px; }
.drawer-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-cyan);
    letter-spacing: 0.22em;
    margin-bottom: 14px;
}
.drawer-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}
.drawer-title .grad {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    transition: all .35s var(--ease-out);
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideIn .5s var(--ease-out) forwards;
    animation-delay: calc(0.08s * var(--d) + 0.3s);
}
.hub-stage[data-active="links"] .link-card {
    /* 当抽屉激活时才执行入场 */
}

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

.link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform .6s;
}
.link-card:hover {
    border-color: var(--c-border-lit);
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(6px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.15);
}
.link-card:hover::before { transform: translateX(100%); }

.link-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 10px;
    flex-shrink: 0;
    transition: transform .35s var(--ease-back);
}
.link-icon.github  { background: rgba(255,255,255,.06); color: #fff; }
.link-icon.twitter { background: rgba(255,255,255,.06); color: #fff; }
.link-icon.mail    { background: rgba(0, 217, 255, .1); color: var(--c-cyan); }
.link-icon.rss     { background: rgba(255, 175, 0, .1); color: #ffaf00; }

.link-card:hover .link-icon { transform: rotate(-8deg) scale(1.1); }

.link-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.link-name {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    margin-bottom: 2px;
}
.link-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-text-faint);
}
.link-arrow {
    font-size: 18px;
    color: var(--c-text-faint);
    transition: all .3s;
}
.link-card:hover .link-arrow {
    color: var(--c-cyan);
    transform: translateX(4px);
}

.drawer-foot {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   11. Blog List Page
   ========================================================================== */

/* 从左边"揭开"的入场遮罩 */
.blog-reveal {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: linear-gradient(135deg, #0a0a1a, #1a0a2e);
    transform-origin: left center;
    animation: revealOpen 0.9s var(--ease-power) forwards;
    pointer-events: none;
}
@keyframes revealOpen {
    0%   { transform: perspective(1400px) rotateY(0deg); opacity: 1; }
    100% { transform: perspective(1400px) rotateY(-100deg); opacity: 0; }
}

.blog-hero {
    padding: calc(var(--nav-h) + 40px) 32px 28px;
    max-width: 1100px;
    margin: 0 auto;
}
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.eyebrow-line {
    width: 60px;
    height: 1px;
    background: var(--c-cyan);
}
.eyebrow-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--c-cyan);
    letter-spacing: 0.22em;
}
.blog-hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 5vw, 60px);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.blog-hero-title .grad {
    background: var(--grad-main);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradShift 5s ease-in-out infinite;
}
.blog-hero-sub {
    color: var(--c-text-dim);
    font-size: 15px;
    margin-bottom: 22px;
}

/* ---- 搜索栏 ---- */
.search-bar-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto 24px;
}
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(18, 18, 42, 0.7);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 2px;
    transition: border-color .3s, box-shadow .3s;
}
.search-bar:focus-within {
    border-color: var(--c-cyan);
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.18), inset 0 0 14px rgba(0, 217, 255, 0.04);
}
.search-icon {
    margin: 0 6px 0 12px;
    color: var(--c-text-faint);
    flex-shrink: 0;
    transition: color .3s;
}
.search-bar:focus-within .search-icon { color: var(--c-cyan); }
.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #fff;
    caret-color: var(--c-cyan);
}
.search-input::placeholder { color: var(--c-text-faint); }
.search-shortcut {
    margin-right: 12px;
    padding: 4px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--c-text-faint);
    background: rgba(255,255,255,.05);
    border: 1px solid var(--c-border);
    border-radius: 5px;
    letter-spacing: .06em;
    flex-shrink: 0;
}
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(12, 12, 32, 0.96);
    border: 1px solid var(--c-border-lit);
    border-radius: 12px;
    max-height: 360px;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 30px rgba(0,217,255,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .25s ease-out;
}
.search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.search-result-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--c-border);
    transition: background .2s;
    cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(0,217,255,.06); }
.search-result-title {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    margin-bottom: 3px;
}
.search-result-title em {
    font-style: normal;
    background: rgba(0,217,255,.3);
    border-radius: 2px;
    padding: 0 2px;
}
.search-result-snippet {
    font-size: 12px;
    color: var(--c-text-dim);
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-snippet em {
    font-style: normal;
    background: rgba(0,255,136,.2);
    border-radius: 2px;
    padding: 0 2px;
}
.search-result-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--c-text-faint);
    display: flex;
    gap: 10px;
    align-items: center;
}
.srm-cat {
    padding: 2px 6px;
    border: 1px solid var(--c-border-lit);
    border-radius: 3px;
    color: var(--c-cyan);
    font-size: 9px;
}
.search-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--c-text-faint);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

/* 分类 Chips */
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--c-text-dim);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    transition: all .3s;
    text-transform: uppercase;
}
.cat-chip:hover {
    color: #fff;
    border-color: var(--c-border-lit);
    transform: translateY(-2px);
}
.cat-chip.active {
    color: #fff;
    background: var(--grad-main);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(181, 55, 242, 0.3);
}
.chip-count {
    padding: 1px 7px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 99px;
    font-size: 10px;
}
.cat-chip.active .chip-count { background: rgba(255,255,255,.2); }

/* 卡片网格 */
.posts-grid-wrap {
    padding: 16px 32px 60px;
    max-width: 1300px;
    margin: 0 auto;
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(18, 18, 38, 0.55);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: transform .5s var(--ease-out), border-color .4s, box-shadow .5s;
    opacity: 0;
    transform: translateY(30px);
    animation: cardIn .7s var(--ease-out) forwards;
    animation-delay: var(--delay);
}
@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}
.post-card:hover {
    transform: translateY(-10px);
    border-color: var(--c-border-lit);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 217, 255, 0.2);
}
.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.85) brightness(0.85);
    transition: transform .9s var(--ease-out), filter .5s;
}
.post-card:hover .card-cover img {
    transform: scale(1.08) rotate(1deg);
    filter: saturate(1.2) brightness(1);
}
.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 26, 0.9));
    z-index: 1;
}
.cover-cat {
    position: absolute;
    top: 14px; left: 14px;
    padding: 5px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: #fff;
    background: rgba(10, 10, 26, 0.7);
    border: 1px solid var(--c-border-lit);
    border-radius: 5px;
    backdrop-filter: blur(8px);
    z-index: 2;
    text-transform: uppercase;
}

.card-body {
    padding: 22px 22px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-meta {
    display: flex;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-text-faint);
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.card-sep { opacity: 0.5; }
.card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 10px;
    transition: background .4s;
}
.post-card:hover .card-title {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.card-summary {
    color: var(--c-text-dim);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--c-border);
}
.tag-pill {
    padding: 3px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--c-text-dim);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.card-go {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-cyan);
    letter-spacing: 0.12em;
    transition: transform .3s;
}
.post-card:hover .card-go { transform: translateX(4px); }

.card-border-glow {
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, var(--c-cyan), var(--c-purple), var(--c-pink));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s;
    pointer-events: none;
}
.post-card:hover .card-border-glow { opacity: 1; }

.empty-box {
    text-align: center;
    padding: 100px 20px;
    color: var(--c-text-faint);
}
.empty-code {
    font-family: 'Orbitron', sans-serif;
    font-size: 96px;
    font-weight: 900;
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.5;
}
.empty-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    margin-top: 10px;
}

/* ==========================================================================
   12. Post Detail Page
   ========================================================================== */
.post-article {
    width: 100%;
}
.post-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--nav-h) + 60px) 40px 70px;
    overflow: hidden;
}
.post-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(0.9) brightness(0.7);
    transform: scale(1.08);
    animation: slowZoom 18s ease-in-out infinite alternate;
}
@keyframes slowZoom {
    to { transform: scale(1.18); }
}
.post-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 5, 13, 0.55) 0%, rgba(5, 5, 13, 0.9) 75%, var(--c-bg-0) 100%),
        radial-gradient(ellipse at center, transparent, rgba(0, 0, 0, 0.5));
}
.post-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    animation: fadeUp 1s var(--ease-out);
}
.post-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--c-cyan);
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid var(--c-border-lit);
    border-radius: 99px;
    margin-bottom: 24px;
    transition: all .3s;
}
.post-category-badge:hover {
    background: rgba(0, 217, 255, 0.15);
    transform: translateX(-3px);
}
.post-title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #fff, #a6acc4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 24px;
}
.post-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-text-dim);
    background: rgba(10, 10, 26, 0.65);
    border: 1px solid var(--c-border);
    border-radius: 6px;
}
.scroll-indicator {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}
.mouse {
    width: 24px; height: 38px;
    border: 2px solid var(--c-text-faint);
    border-radius: 12px;
    display: grid;
    place-items: start center;
    padding-top: 6px;
}
.wheel {
    width: 3px; height: 8px;
    background: var(--c-cyan);
    border-radius: 3px;
    animation: wheelDrop 2s ease-in-out infinite;
}
@keyframes wheelDrop {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%      { transform: translateY(8px); opacity: 0; }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-8px); }
}

.post-body-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 70px 40px 100px;
}
.post-body {
    color: var(--c-text);
    font-size: 17px;
    line-height: 1.85;
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2.4em 0 0.8em;
    color: #fff;
    position: relative;
}
.post-body h1 { font-size: 32px; }
.post-body h2 {
    font-size: 26px;
    padding-left: 16px;
}
.post-body h2::before {
    content: '';
    position: absolute;
    left: 0; top: 0.3em;
    width: 4px; height: 0.7em;
    background: var(--grad-main);
    border-radius: 2px;
}
.post-body h3 { font-size: 20px; }
.post-body p { margin-bottom: 1.2em; color: var(--c-text-dim); }
.post-body strong { color: #fff; font-weight: 600; }
.post-body em { color: var(--c-cyan); font-style: normal; }
.post-body a {
    color: var(--c-cyan);
    border-bottom: 1px dashed rgba(0, 217, 255, 0.4);
    transition: all .2s;
}
.post-body a:hover {
    color: var(--c-pink);
    border-bottom-color: var(--c-pink);
}

.post-body ul, .post-body ol {
    margin: 1.2em 0;
    padding-left: 1.5em;
}
.post-body ul li, .post-body ol li {
    color: var(--c-text-dim);
    margin-bottom: 0.5em;
    list-style: disc;
}
.post-body blockquote {
    margin: 2em 0;
    padding: 18px 24px;
    border-left: 3px solid var(--c-cyan);
    background: rgba(0, 217, 255, 0.04);
    border-radius: 8px;
    color: var(--c-text);
    font-style: italic;
    position: relative;
}
.post-body blockquote::before {
    content: '"';
    position: absolute;
    top: -6px; left: 12px;
    font-size: 40px;
    color: var(--c-cyan);
    opacity: 0.4;
    font-family: Georgia, serif;
}

/* ============================================
   代码块：霓虹终端（精准修复版）
   ============================================ */

/* 1. 统一容器样式 */
.post-body .codehilite,
.post-body .highlight,
.post-body pre {
    position: relative;
    background: #0a0a1a !important;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    margin: 2em 0;
    /* 重点：padding 留出顶部圆点空间 */
    padding: 45px 20px 20px !important;
    overflow-x: auto;
}

/* 2. 核心：禁止所有可能的伪元素（彻底杀掉 9 个点） */
.post-body .codehilite::before, .post-body .codehilite::after,
.post-body .highlight::before, .post-body .highlight::after,
.post-body pre::before, .post-body pre::after,
.post-body code::before, .post-body code::after {
    content: none !important;
    display: none !important;
}

/* 3. 核心：只允许在【最外层】容器上重新开启一组圆点 */
/* 如果 HTML 有 .codehilite，就在它上面画；如果没有，就在 pre 上画 */
.post-body .codehilite:first-child,
.post-body .highlight:first-child,
.post-body > pre {
    display: block !important;
}

/* 重新画出那三个点，这次用一个背景图技巧，保证绝对只有一组 */
.post-body .codehilite:not(pre .codehilite),
.post-body .highlight:not(pre .highlight),
.post-body > pre:not(.codehilite pre) {
    background-image: 
        radial-gradient(circle, #ff5f56 5px, transparent 5px),
        radial-gradient(circle, #ffbd2e 5px, transparent 5px),
        radial-gradient(circle, #27c93f 5px, transparent 5px) !important;
    background-size: 10px 10px, 10px 10px, 10px 10px !important;
    background-repeat: no-repeat !important;
    background-position: 18px 18px, 40px 18px, 62px 18px !important;
}

/* 4. 彻底清理嵌套内部的样式，防止重复边框或背景 */
.post-body pre pre,
.post-body .codehilite pre,
.post-body .highlight pre {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 5. 恢复代码文字显示 */
.post-body code {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13px !important;
    line-height: 1.7;
    color: #c8d3f0;
    background: none !important;
}

/* 6. 语法高亮（保持 Pygments 标签可见） */
.codehilite .k, .highlight .k { color: #ff2e9a; } /* 关键字 */
.codehilite .s, .highlight .s { color: #00ff88; } /* 字符串 */
.codehilite .c1, .highlight .c1 { color: #5a5f7c; font-style: italic; } /* 注释 */


.post-body img { border-radius: 10px; margin: 1.5em auto; }
.post-body hr { border: none; height: 1px; background: var(--c-border); margin: 3em 0; }

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: rgba(18, 18, 38, 0.4);
    border-radius: 10px;
    overflow: hidden;
}
.post-body th, .post-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}
.post-body th {
    background: rgba(0, 217, 255, 0.08);
    color: var(--c-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: center;
}
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    background: var(--grad-main);
    border-radius: 99px;
    color: #fff;
    transition: all .3s var(--ease-out);
    box-shadow: 0 10px 30px rgba(181, 55, 242, 0.3);
}
.back-button:hover {
    transform: translateX(-6px) scale(1.03);
    box-shadow: 0 14px 40px rgba(181, 55, 242, 0.5);
}
.back-arrow {
    display: grid;
    place-items: center;
    transition: transform .3s;
}
.back-button:hover .back-arrow { transform: translateX(-4px); }
.back-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}
.back-label { font-weight: 600; font-size: 14px; }
.back-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    opacity: 0.7;
}

/* ==========================================================================
   13. Responsive & Misc
   ========================================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--c-cyan), var(--c-purple));
    border-radius: 10px;
    border: 2px solid var(--c-bg-0);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--c-purple), var(--c-pink));
}

@media (max-width: 960px) {
    .nav-inner { padding: 0 20px; }
    .nav-links { display: none; }
    .nav-status { display: none; }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .about-avatar-card { position: static; }
    .compass { height: 280px; width: 100%; }
    .panel { padding: calc(var(--nav-h) + 12px) 18px 18px; }
    .terminal-shell { height: 80vh; }
    .post-hero { padding: calc(var(--nav-h) + 40px) 20px 50px; }
    .post-body-wrap { padding: 50px 20px 80px; }
    .blog-hero { padding: calc(var(--nav-h) + 30px) 20px 30px; }
    .posts-grid-wrap { padding: 20px 20px 60px; }
}

@media (max-width: 560px) {
    .hero-meta { gap: 12px; padding: 10px 16px; }
    .meta-num { font-size: 16px; }
    .meta-label { font-size: 8px; }
    .compass-label { font-size: 10px; }
    .compass-hint { display: none; }
    .key-hint { font-size: 9px; flex-wrap: wrap; justify-content: center; }
    .panel-left { width: 100vw; }
    .posts-grid { grid-template-columns: 1fr; }
    body { cursor: auto; }
    button { cursor: pointer; }
    a { cursor: pointer; }
    .cursor-dot { display: none; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 强调动画入场 for hub panels (入场时才显示一些子元素动画) */
.hub-stage[data-active="about"]    .about-avatar-card,
.hub-stage[data-active="about"]    .about-content > * {
    animation: fadeUp .8s var(--ease-out) both;
}
.hub-stage[data-active="about"] .about-content > *:nth-child(1) { animation-delay: .15s; }
.hub-stage[data-active="about"] .about-content > *:nth-child(2) { animation-delay: .25s; }
.hub-stage[data-active="about"] .about-content > *:nth-child(3) { animation-delay: .35s; }
.hub-stage[data-active="about"] .about-content > *:nth-child(4) { animation-delay: .45s; }
.hub-stage[data-active="about"] .about-content > *:nth-child(5) { animation-delay: .55s; }
.hub-stage[data-active="about"] .about-content > *:nth-child(6) { animation-delay: .65s; }

/* ====== 小工具：.grad 通用渐变文字 ====== */
.grad {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
