/* ============================================================
   流浪者 · 风之旅人  (Wanderer Theme for Typecho)  v2.0
   深色主题 / 亮色主题，白色文字，设计稿色调
   ============================================================ */

@font-face {
    font-family: 'Bruno Ace';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/bruno-ace.ttf') format('truetype');
}

/* =====================  主题变量  ===================== */
:root {
    --c-primary: #3a7bd5;
    --c-primary-deep: #2b5ea7;
    --c-primary-soft: rgba(58, 123, 213, .15);
    --c-gold: #f0c040;
    --c-gold-soft: rgba(240, 192, 64, .15);
    --c-bg: #0a0e17;
    --c-bg-alt: #0d1321;
    --c-card: #121826;
    --c-ink: #e8ecf1;
    --c-muted: #8892a4;
    --c-line: #1e2940;
    --c-glass: rgba(10, 14, 23, .92);
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
    --shadow-hover: 0 14px 34px rgba(0, 0, 0, .55);
    --shadow-glow: 0 0 30px rgba(58, 123, 213, .25);
    --trans: .3s cubic-bezier(.4, 0, .2, 1);
    --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    --font-title: "Bruno Ace", Georgia, "Noto Serif SC", serif;
}

[data-theme="light"] {
    --c-primary: #2563eb;
    --c-primary-deep: #1d4ed8;
    --c-primary-soft: rgba(37, 99, 235, .12);
    --c-gold: #d97706;
    --c-gold-soft: rgba(217, 119, 6, .12);
    --c-bg: #f5f7fa;
    --c-bg-alt: #eef1f6;
    --c-card: #ffffff;
    --c-ink: #1a202c;
    --c-muted: #64748b;
    --c-line: #e2e8f0;
    --c-glass: rgba(255, 255, 255, .92);
    --shadow: 0 6px 24px rgba(0, 0, 0, .08);
    --shadow-hover: 0 14px 34px rgba(0, 0, 0, .12);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, .15);
}

/* =====================  重置  ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.75;
    font-size: 16px;
    opacity: 0;
    transition: opacity .4s ease;
}
body.page-loaded { opacity: 1; }

a { color: var(--c-primary); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--c-gold); }

img { max-width: 100%; height: auto; }

::selection { background: var(--c-primary-soft); color: var(--c-primary); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }

.container { max-width: 880px; margin: 0 auto; padding: 0 20px; position: relative; }
.container.narrow { max-width: 760px; }

/* =====================  阅读进度条  ===================== */
.reading-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 100;
    background: transparent;
}
.reading-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--c-primary), var(--c-gold));
    transition: width .1s linear;
    box-shadow: 0 0 8px var(--c-primary);
}

/* =====================  头部  ===================== */
.site-head {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--c-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-line);
    transition: box-shadow var(--trans), border-color var(--trans);
}
.site-head.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    border-bottom-color: transparent;
}

.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--c-ink);
    position: relative;
}
.brand:hover { color: var(--c-ink); }
.brand-name {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all var(--trans);
}
.brand:hover .brand-name {
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.35));
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}
.nav a {
    color: var(--c-muted);
    font-size: 15px;
    position: relative;
    padding: 4px 0;
    transition: color var(--trans);
}
.nav a:hover { color: var(--c-ink); }
.nav a.active { color: var(--c-ink); font-weight: 600; }
.nav a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-gold));
    animation: nav-slide .3s ease;
}
@keyframes nav-slide {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); }
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
}

.search-toggle, .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    transition: all var(--trans);
}
.search-toggle:hover, .theme-toggle:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    transform: scale(1.1);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
}
.nav-toggle span {
    width: 22px; height: 2px;
    border-radius: 2px;
    background: var(--c-ink);
    transition: transform var(--trans), opacity var(--trans);
}

/* =====================  搜索浮层  ===================== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--trans), visibility var(--trans);
}
.search-overlay.open { opacity: 1; visibility: visible; }

.search-box {
    position: relative;
    width: 90%;
    max-width: 640px;
    transform: translateY(-20px);
    transition: transform var(--trans);
}
.search-overlay.open .search-box { transform: translateY(0); }

.search-form {
    display: flex;
    gap: 10px;
}
.search-input {
    flex: 1;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-card);
    color: var(--c-ink);
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color var(--trans), box-shadow var(--trans);
}
.search-input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.search-submit {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-deep));
    color: #fff;
    padding: 0 24px;
    font-size: 15px;
    cursor: pointer;
    transition: filter var(--trans);
}
.search-submit:hover { filter: brightness(1.15); }

.search-close {
    position: absolute;
    top: -48px; right: 0;
    width: 36px; height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--trans);
}
.search-close:hover { background: rgba(255, 255, 255, .3); }

/* =====================  Hero 横幅  ===================== */
.hero {
    position: relative;
    text-align: center;
    padding: 0;
    overflow: hidden;
    height: 720px;
}

.hero-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -2;
    animation: hero-zoom 20s ease-out infinite alternate;
}
@keyframes hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.hero-float {
    position: absolute;
    left: 50%; bottom: -12px;
    transform: translateX(-50%);
    width: 158%; max-width: 1200px;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    z-index: -1;
    animation: hero-float 6s ease-in-out infinite;
}
@keyframes hero-float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-12px); }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 14, 23, .3) 0%, rgba(10, 14, 23, .7) 100%);
}
[data-theme="light"] .hero::after {
    background: linear-gradient(180deg, rgba(245, 247, 250, .3) 0%, rgba(245, 247, 250, .7) 100%);
}

/* Hero 粒子 */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.hero-particles span {
    position: absolute;
    bottom: -10px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-gold);
    opacity: 0;
    animation: particle-rise 8s linear infinite;
}
@keyframes particle-rise {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: .6; }
    90% { opacity: .4; }
    100% { transform: translateY(-560px) translateX(40px); opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 40px 20px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, .65);
    font-size: 15px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    opacity: 0;
    animation: fade-up .8s ease .2s forwards;
}
[data-theme="light"] .hero-subtitle { color: rgba(26, 32, 44, .6); }

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(64px, 12vw, 140px);
    font-weight: 700;
    letter-spacing: 14px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 30px rgba(0, 0, 0, .3);
    margin-bottom: 20px;
    opacity: 0;
    animation: fade-up .8s ease .4s forwards;
}
[data-theme="light"] .hero-title { text-shadow: 0 4px 30px rgba(0, 0, 0, .15); }

.hero-desc {
    color: rgba(255, 255, 255, .8);
    font-size: 18px;
    max-width: 600px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
    opacity: 0;
    animation: fade-up .8s ease .6s forwards;
}
[data-theme="light"] .hero-desc { color: rgba(26, 32, 44, .7); }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero 滚动提示 */
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation: fade-up .8s ease 1s forwards;
}
.mouse {
    display: block;
    width: 26px; height: 42px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 13px;
    position: relative;
}
[data-theme="light"] .mouse { border-color: rgba(26, 32, 44, .4); }
.wheel {
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .7);
    animation: wheel-scroll 1.5s ease-in-out infinite;
}
[data-theme="light"] .wheel { background: rgba(26, 32, 44, .5); }
@keyframes wheel-scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 14px); opacity: 0; }
}

/* =====================  内页横幅  ===================== */
.page-banner {
    position: relative;
    text-align: center;
    padding: 80px 20px 50px;
}
.page-title {
    font-family: var(--font-title);
    font-size: clamp(28px, 5vw, 40px);
    letter-spacing: 4px;
    color: var(--c-ink);
    margin-bottom: 12px;
}
.page-count { color: var(--c-muted); font-size: 15px; }

.swirl {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--c-primary-soft) 0%, transparent 70%);
    z-index: -1;
    animation: swirl-rotate 12s linear infinite;
}
@keyframes swirl-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 404 */
.err-banner { padding-top: 60px; }
.err-404 {
    font-family: var(--font-title);
    font-size: clamp(80px, 15vw, 160px);
    color: var(--c-primary);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 0 40px var(--c-primary-soft);
    animation: err-glow 2s ease-in-out infinite alternate;
}
@keyframes err-glow {
    from { text-shadow: 0 0 20px var(--c-primary-soft); }
    to { text-shadow: 0 0 50px var(--c-primary-soft); }
}
.err-text { color: var(--c-muted); font-size: 16px; margin-bottom: 20px; }

/* =====================  文章卡片  ===================== */
.posts { padding: 30px 0 40px; }

.card {
    position: relative;
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 26px 28px 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--trans);
}
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), var(--c-primary-soft), transparent 40%);
    opacity: 0;
    transition: opacity var(--trans);
    pointer-events: none;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: var(--c-primary);
}
.card:hover::before { transform: scaleX(1); }
.card:hover::after { opacity: 1; }

.card-meta {
    color: var(--c-muted);
    font-size: 13px;
    letter-spacing: .5px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.card-meta a { color: var(--c-muted); }
.card-meta a:hover { color: var(--c-primary); }
.card-dot { margin: 0 6px; color: var(--c-gold); }
.card-readtime { color: var(--c-muted); }

.card-title {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.card-title a { color: var(--c-ink); }
.card-title a:hover { color: var(--c-primary); }
.card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
}
.card-meta a, .card-comments, .btn-more { position: relative; z-index: 1; }

.card-excerpt {
    color: var(--c-muted);
    font-size: 15px;
    margin-bottom: 16px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    position: relative;
    z-index: 1;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed var(--c-line);
    padding-top: 14px;
    position: relative;
    z-index: 1;
}
.card-comments { color: var(--c-muted); font-size: 13px; }

.btn-more, .btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-deep));
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: filter var(--trans), transform var(--trans), box-shadow var(--trans);
}
.btn-more:hover, .btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--c-primary-soft);
    color: #fff;
}

.empty { text-align: center; color: var(--c-muted); padding: 60px 0; }

/* =====================  分页  ===================== */
.pager { padding: 12px 0 10px; }
.pager-list { list-style: none; display: flex; justify-content: center; gap: 8px; }
.pager-list li a, .pager-list li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px; height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--c-card);
    border: 1px solid var(--c-line);
    color: var(--c-muted);
    font-size: 14px;
    transition: all var(--trans);
}
.pager-list li a:hover { color: var(--c-primary); border-color: var(--c-primary); transform: translateY(-2px); }
.pager-list li.current span, .pager-list li.current a {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-deep));
    color: #fff;
    border-color: transparent;
}

/* =====================  文章正文  ===================== */
.post-body {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 46px 44px;
    margin: 30px 0 40px;
    position: relative;
    z-index: 1;
}

.post-head { margin-bottom: 28px; }
.post-title {
    font-family: var(--font-title);
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--c-ink);
}
.post-meta {
    color: var(--c-muted);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}
.post-meta a { color: var(--c-muted); }
.post-meta a:hover { color: var(--c-primary); }
.post-dot { margin: 0 8px; color: var(--c-gold); }
.post-readtime, .post-wordcount { color: var(--c-muted); }

.post-content { font-size: 16px; }
.post-content h2, .post-content h3, .post-content h4 {
    font-family: var(--font-title);
    margin: 1.8em 0 .7em;
    color: var(--c-ink);
    line-height: 1.4;
    scroll-margin-top: 80px;
}
.post-content h2 { font-size: 23px; padding-left: 12px; border-left: 3px solid var(--c-primary); }
.post-content h3 { font-size: 20px; }
.post-content p { margin: 0 0 1.1em; }
.post-content ul, .post-content ol { margin: 0 0 1.1em; padding-left: 1.6em; }
.post-content li { margin-bottom: .4em; }
.post-content blockquote {
    margin: 1.4em 0;
    padding: 14px 20px;
    border-left: 3px solid var(--c-gold);
    background: var(--c-bg-alt);
    border-radius: 0 10px 10px 0;
    color: var(--c-muted);
    position: relative;
}
.post-content blockquote::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--c-gold), transparent);
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content a {
    border-bottom: 1px solid var(--c-primary-soft);
    transition: border-color var(--trans);
}
.post-content a:hover { border-bottom-color: var(--c-primary); }
.post-content code {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: .9em;
    font-family: Consolas, Monaco, "Courier New", monospace;
}
.post-content pre {
    background: #0d1321;
    color: #d8f0ed;
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    margin: 1.4em 0;
    line-height: 1.6;
    border: 1px solid var(--c-line);
}
.post-content pre code { background: none; color: inherit; padding: 0; font-size: 14px; }
.post-content img {
    border-radius: 10px;
    margin: 1em 0;
    box-shadow: var(--shadow);
    transition: opacity .3s ease, transform var(--trans);
}
.post-content img.lazy { opacity: 0; }
.post-content img.loaded { opacity: 1; animation: img-fade .4s ease; }
@keyframes img-fade { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 15px;
}
.post-content th, .post-content td {
    border: 1px solid var(--c-line);
    padding: 10px 14px;
    text-align: left;
}
.post-content th { background: var(--c-bg-alt); font-family: var(--font-title); color: var(--c-ink); }
.post-content tr:hover td { background: var(--c-primary-soft); }
.post-content hr { border: 0; border-top: 1px dashed var(--c-line); margin: 2em 0; }

.post-foot { margin-top: 34px; padding-top: 22px; border-top: 1px dashed var(--c-line); }
.post-tags { margin-bottom: 18px; }
.post-tags a {
    display: inline-block;
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border-radius: 999px;
    padding: 4px 14px;
    margin: 0 6px 8px 0;
    font-size: 13px;
    transition: all var(--trans);
}
.post-tags a:hover { background: var(--c-primary); color: #fff; transform: translateY(-2px); }

.post-nav { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.post-nav a { color: var(--c-muted); padding: 8px 0; transition: color var(--trans); }
.post-nav a:hover { color: var(--c-primary); }

/* =====================  面包屑导航  ===================== */
.breadcrumb {
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--c-line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}
.breadcrumb a {
    color: var(--c-muted);
    transition: color var(--trans);
}
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb-sep {
    margin: 0 7px;
    color: var(--c-line);
    font-size: 14px;
}
.breadcrumb-current {
    color: var(--c-ink);
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================  文章页背景装饰  ===================== */
.post-decor {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.post-decor-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .15;
}
.post-decor-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--c-bg) 0%, transparent 30%, transparent 70%, var(--c-bg) 100%);
}
.post-character {
    position: absolute;
    left: 0; bottom: -12px;
    width: 92vw; max-width: 1200px;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    opacity: .8;
    animation: post-char-float 6s ease-in-out infinite;
}
@keyframes post-char-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.post-decor-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .35;
    animation: decor-drift 14s ease-in-out infinite alternate;
}
.glow-1 {
    width: 500px; height: 500px;
    top: 5%; right: -120px;
    background: radial-gradient(circle, var(--c-primary), transparent 70%);
}
.glow-2 {
    width: 420px; height: 420px;
    bottom: 5%; left: -80px;
    background: radial-gradient(circle, var(--c-gold), transparent 70%);
    opacity: .18;
    animation-delay: -7s;
}
.glow-3 {
    width: 300px; height: 300px;
    top: 45%; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--c-primary), transparent 70%);
    opacity: .12;
    animation-delay: -3s;
}
@keyframes decor-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(40px, 30px); }
}

/* =====================  文章目录 (TOC)  ===================== */
.toc {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 220px;
    max-height: calc(100vh - 140px);
    z-index: 40;
    display: none;
}
.toc-inner {
    position: relative;
    padding-left: 16px;
}
.toc-title {
    font-family: var(--font-title);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--c-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
}
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-item {
    display: block;
    color: var(--c-muted);
    font-size: 13px;
    line-height: 1.6;
    padding: 3px 0 3px 12px;
    border-left: 2px solid var(--c-line);
    transition: all var(--trans);
}
.toc-item.toc-h3 { padding-left: 24px; font-size: 12px; }
.toc-item.toc-h4 { padding-left: 36px; font-size: 12px; }
.toc-item:hover { color: var(--c-primary); }
.toc-item.active {
    color: var(--c-primary);
    border-left-color: var(--c-primary);
    font-weight: 600;
}
.toc-progress {
    position: absolute;
    left: 0; top: 30px; bottom: 0;
    width: 2px;
    background: var(--c-line);
    border-radius: 1px;
    overflow: hidden;
}
.toc-progress-bar {
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--c-primary), var(--c-gold));
    transition: height .2s ease;
}

/* =====================  评论  ===================== */
.comments { margin-top: 34px; padding-top: 26px; border-top: 1px dashed var(--c-line); }
.comments-title { font-family: var(--font-title); font-size: 20px; margin-bottom: 22px; color: var(--c-ink); }

.comment-list { list-style: none; }
.comment-list .comment-list { margin-top: 18px; padding-left: 26px; border-left: 1px dashed var(--c-line); }
.comment-body { margin-bottom: 26px; }

.comment-body .comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.comment-body .comment-author img {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid var(--c-line);
}
.comment-body .comment-author cite { font-style: normal; font-weight: 600; font-size: 15px; color: var(--c-ink); }

.comment-meta { color: var(--c-muted); font-size: 13px; margin-bottom: 10px; }
.comment-meta a { color: var(--c-muted); }
.comment-awaiting-moderation {
    display: inline-block;
    margin-left: 8px;
    color: var(--c-gold);
    font-style: normal;
    font-size: 12px;
    background: var(--c-gold-soft);
    border-radius: 999px;
    padding: 1px 10px;
}
.comment-content { background: var(--c-bg-alt); border-radius: 10px; padding: 14px 18px; font-size: 15px; }
.comment-reply { margin-top: 8px; }
.comment-reply a { font-size: 13px; color: var(--c-muted); }
.comment-reply a:hover { color: var(--c-primary); }

.comment-body.comment-by-author .comment-content { border-left: 3px solid var(--c-gold); }
.comment-body.comment-by-user .comment-content { border-left: 3px solid var(--c-primary); }

.comments .page-navigator {
    list-style: none;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 18px 0 8px;
}
.comments .page-navigator a, .comments .page-navigator span {
    display: inline-flex;
    min-width: 32px; height: 32px;
    align-items: center; justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--c-line);
    color: var(--c-muted);
    font-size: 13px;
}
.comments .page-navigator .current a, .comments .page-navigator .current {
    background: var(--c-primary);
    color: #fff;
    border-color: transparent;
}

/* 回复框 */
.respond { margin-top: 34px; }
.respond h3 { font-family: var(--font-title); font-size: 20px; margin-bottom: 18px; color: var(--c-ink); }
.cancel-comment-reply { margin-bottom: 10px; font-size: 13px; }

.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
#comment-form input[type="text"],
#comment-form input[type="email"],
#comment-form input[type="url"],
#comment-form textarea {
    width: 100%;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: var(--c-bg-alt);
    color: var(--c-ink);
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--trans), box-shadow var(--trans);
}
#comment-form input:focus, #comment-form textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}
#comment-form textarea { resize: vertical; margin-bottom: 12px; }
.form-foot { text-align: right; }
.login-tip { color: var(--c-muted); font-size: 14px; margin-bottom: 14px; }
.comments-closed { color: var(--c-muted); font-size: 14px; }

/* =====================  页脚  ===================== */
.site-foot {
    margin-top: 40px;
    border-top: 1px solid var(--c-line);
    background: var(--c-bg-alt);
    position: relative;
    z-index: 1;
}
.foot-cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 26px;
    padding: 40px 0 26px;
}
.foot-col h4 {
    font-family: var(--font-title);
    font-size: 15px;
    letter-spacing: 2px;
    margin-bottom: 14px;
    color: var(--c-primary);
}
.foot-desc { color: var(--c-muted); font-size: 14px; }
.foot-list { list-style: none; font-size: 14px; }
.foot-list li { margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-list a { color: var(--c-muted); transition: color var(--trans), padding-left var(--trans); }
.foot-list a:hover { color: var(--c-primary); padding-left: 4px; }
.foot-copy {
    border-top: 1px dashed var(--c-line);
    padding: 16px 0 20px;
    text-align: center;
    color: var(--c-muted);
    font-size: 13px;
}
.foot-copy a { color: var(--c-muted); }
.foot-copy a:hover { color: var(--c-primary); }

/* =====================  返回顶部  ===================== */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-deep));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(.8);
    transition: opacity var(--trans), visibility var(--trans), transform var(--trans), box-shadow var(--trans);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px var(--c-primary-soft);
}

/* =====================  灯箱  ===================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--trans), visibility var(--trans);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.lightbox-img {
    position: relative;
    z-index: 1;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    transform: scale(.9);
    transition: transform var(--trans);
}
.lightbox.open .lightbox-img { transform: scale(1); }
.lightbox-close {
    position: absolute;
    top: 20px; right: 20px;
    z-index: 2;
    width: 40px; height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--trans), transform var(--trans);
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); transform: rotate(90deg); }

/* =====================  滚动渐入动画  ===================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =====================  响应式  ===================== */
@media (min-width: 1200px) {
    .toc { display: block; }
    .has-toc { margin-right: 250px; }
    .has-toc .post-body { margin-right: 0; }
}

@media (max-width: 860px) {
    .foot-cols { grid-template-columns: 1fr 1fr; }
    .post-character { display: none; }
}

@media (max-width: 768px) {
    .toc { display: none !important; }
    .has-toc { margin-right: 0; }
}

@media (max-width: 640px) {
    body { font-size: 15px; }

    .head-actions { margin-left: 8px; }

    .nav-toggle { display: flex; }
    .nav {
        position: absolute;
        top: 62px; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--c-glass);
        border-bottom: 1px solid var(--c-line);
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .nav.open { max-height: 420px; }
    .nav a { display: block; width: 100%; padding: 12px 0; border-bottom: 1px dashed var(--c-line); }
    .nav a:last-child { border-bottom: 0; }
    .nav a.active::after { display: none; }

    .hero { height: 460px; }
    .hero-title { font-size: 42px; letter-spacing: 6px; }
    .hero-desc { font-size: 15px; }
    .hero-subtitle { font-size: 13px; letter-spacing: 2px; }

    .card { padding: 22px 20px 18px; }
    .post-body { padding: 26px 22px 30px; }
    .form-row { grid-template-columns: 1fr; }
    .foot-cols { grid-template-columns: 1fr; }
    .post-nav { flex-direction: column; gap: 8px; }

    .back-to-top { bottom: 20px; right: 20px; }

    .search-form { flex-direction: column; }
    .search-submit { padding: 12px 24px; }
}
