:root {
    --brand: #0fa89b;
    --brand-dark: #0b7f76;
    --brand-soft: #e9f7f5;
    --accent: #ff8a3d;
    --ink: #0d1b2a;
    --ink-2: #22384b;
    --muted: #5f7387;
    --line: #e4edf3;
    --bg: #f5f8fa;
    --card: #ffffff;
    --radius: 18px;
    --shadow-sm: 0 4px 14px rgba(13, 27, 42, .05);
    --shadow-md: 0 16px 40px rgba(13, 27, 42, .08);
    --shadow-lg: 0 28px 70px rgba(13, 27, 42, .14);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.72;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.2px; }
p { margin: 0; }
input, button, textarea, select { font-family: inherit; }

.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

/* ---------------------------------------------------------- 顶部导航 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(13, 27, 42, .06);
    transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 30px rgba(13, 27, 42, .07);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 168, 155, .28);
    transition: transform .25s ease;
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.04); }
.brand-text strong { display: block; font-size: 17px; letter-spacing: .5px; line-height: 1.2; }
.brand-text em {
    display: block;
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: 3px;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
    position: relative;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 14.5px;
    color: #42566a;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--brand-dark); background: #f0f8f7; }
.nav-link.active {
    color: var(--brand-dark);
    font-weight: 600;
    background: var(--brand-soft);
}
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--brand);
    transform: translateX(-50%);
}

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 210px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f3f7f9;
    border: 1px solid transparent;
    transition: border-color .2s ease, background .2s ease;
}
.search-box:focus-within { background: #fff; border-color: rgba(15, 168, 155, .45); }
.search-box .layui-icon { color: #8ba0b2; font-size: 15px; }
.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: var(--ink);
}
.search-box input::placeholder { color: #9db1c1; }

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 13.5px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-github:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(13, 27, 42, .22); }
.btn-github .layui-icon { font-size: 16px; }

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
}

/* ---------------------------------------------------------- 首页 Hero */
.hero {
    position: relative;
    overflow: hidden;
    background: #081420;
    color: #fff;
    padding: 82px 0 96px;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(38% 40% at 78% 12%, rgba(15, 168, 155, .42), transparent 70%),
        radial-gradient(34% 34% at 12% 82%, rgba(255, 138, 61, .18), transparent 70%),
        radial-gradient(30% 30% at 50% 50%, rgba(47, 111, 237, .12), transparent 70%);
    filter: blur(6px);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 56px;
    align-items: center;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7fe2d6;
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: linear-gradient(90deg, #19c8b6, transparent);
}
.hero h1 {
    margin: 20px 0 20px;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.22;
    letter-spacing: -1.4px;
}
.hero h1 .grad {
    background: linear-gradient(94deg, #4ee6d3 0%, #0fa89b 48%, #ffbc8c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-desc {
    max-width: 540px;
    color: #a7bdcb;
    font-size: 15.5px;
    line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 500;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.btn .layui-icon { font-size: 16px; }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #1ac9b7, #0b8d84);
    box-shadow: 0 14px 30px rgba(15, 168, 155, .32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(15, 168, 155, .42); }
.btn-ghost {
    color: #dcE9ee;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .04);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); transform: translateY(-3px); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    color: #b9cdd9;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}
.meta-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.meta-chip .dot.orange { background: var(--accent); }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 44px;
    margin-top: 46px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}
.stat b {
    display: block;
    font-size: 27px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}
.stat b small { font-size: 13px; font-weight: 500; color: #8ea6b6; margin-left: 3px; }
.stat span { display: block; margin-top: 6px; font-size: 11.5px; letter-spacing: 2px; color: #7d95a6; }

/* 代码卡片 */
.hero-visual { position: relative; }
.code-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(19, 38, 55, .98), rgba(9, 21, 33, .98));
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 34px 70px rgba(0, 0, 0, .42);
    transform: rotate(-1.2deg);
    animation: floatIn .9s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(24px) rotate(-3deg); }
    to { opacity: 1; transform: translateY(0) rotate(-1.2deg); }
}
.code-window-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .03);
}
.window-dot { width: 10px; height: 10px; border-radius: 50%; }
.window-dot.red { background: #ff6b5f; }
.window-dot.yellow { background: #ffc14d; }
.window-dot.green { background: #3ed67f; }
.code-window-title {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #7e96a8;
}
.code-window-body {
    padding: 20px 20px 26px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.95;
    color: #dbe9f2;
}
.code-line { display: flex; gap: 14px; white-space: pre; }
.code-line .ln { width: 18px; flex-shrink: 0; text-align: right; color: #3f566a; user-select: none; }
.tok-key { color: #66d9c8; }
.tok-str { color: #a8df7d; }
.tok-comment { color: #5f7789; font-style: italic; }
.tok-fn { color: #ffb86b; }
.tok-var { color: #e7c07a; }
.tok-num { color: #ffd166; }

.float-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 12.5px;
    background: rgba(255, 255, 255, .97);
    color: var(--ink);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
    animation: badgeFloat 5s ease-in-out infinite;
}
.float-badge .badge-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.float-badge.one { top: -22px; right: 6px; animation-delay: .2s; }
.float-badge.two { bottom: -24px; left: -14px; animation-delay: 1.4s; }
@keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------------------------------------------------------- 通用区块 */
.section { padding: 84px 0; }
.section.is-light { background: #fff; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 38px;
}
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brand-dark);
}
.section-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}
.section-title {
    margin-top: 12px;
    font-size: clamp(24px, 2.8vw, 34px);
    line-height: 1.3;
}
.section-desc { margin-top: 10px; max-width: 560px; color: var(--muted); font-size: 14.5px; }
.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--brand-dark);
    white-space: nowrap;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.section-more:hover { border-color: var(--brand); }
.section-more .layui-icon { font-size: 12px; }

/* ---------------------------------------------------------- 技术栈卡片 */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stack-card {
    position: relative;
    overflow: hidden;
    padding: 28px 26px 26px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.stack-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}
.stack-card::after {
    content: attr(data-index);
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: rgba(13, 27, 42, .05);
    letter-spacing: -2px;
}
.stack-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.5px;
    box-shadow: 0 12px 24px rgba(13, 27, 42, .16);
}
.stack-card h3 { margin-top: 20px; font-size: 19px; }
.stack-version {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--brand-dark);
    background: var(--brand-soft);
}
.stack-desc {
    margin-top: 14px;
    min-height: 48px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.75;
}
.stack-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}
.stack-foot .count { font-size: 12.5px; color: var(--muted); }
.stack-foot .count b { color: var(--ink); font-size: 15px; margin-right: 2px; }
.stack-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-dark);
}
.stack-link .layui-icon { font-size: 12px; transition: transform .2s ease; }
.stack-card:hover .stack-link .layui-icon { transform: translateX(4px); }

/* ---------------------------------------------------------- 精选文章卡片 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
    transition: transform .28s ease, box-shadow .28s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-cover {
    position: relative;
    height: 148px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: linear-gradient(135deg, var(--c, #0fa89b) 0%, rgba(9, 30, 40, .92) 100%);
}
.post-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 14px 14px;
    opacity: .55;
}
.post-cover .glyph {
    position: absolute;
    right: 14px;
    top: 4px;
    font-size: 58px;
    font-weight: 800;
    letter-spacing: -2px;
    color: rgba(255, 255, 255, .16);
}
.post-cover .cover-label {
    position: relative;
    z-index: 1;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}
.post-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 20px; }
.post-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--c, var(--brand));
}
.post-cat .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.post-title {
    margin-top: 12px;
    font-size: 17.5px;
    line-height: 1.55;
    transition: color .2s ease;
}
.post-card:hover .post-title { color: var(--brand-dark); }
.post-summary {
    margin-top: 10px;
    flex: 1;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f0f4f7;
    font-size: 12px;
    color: #93a6b6;
}
.post-meta .meta-left { display: flex; align-items: center; gap: 6px; }
.post-meta .layui-icon { font-size: 13px; }

/* ---------------------------------------------------------- 文章列表行 */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 24px;
    padding: 24px 26px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.article-row:hover {
    transform: translateX(4px);
    border-color: rgba(15, 168, 155, .35);
    box-shadow: var(--shadow-sm);
}
.article-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-right: 20px;
    border-right: 1px dashed var(--line);
}
.article-date b {
    font-size: 27px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.article-date span { margin-top: 6px; font-size: 11.5px; letter-spacing: 1px; color: #93a6b6; }
.article-row .row-content { min-width: 0; }
.row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c, var(--brand));
    background: color-mix(in srgb, var(--c, #0fa89b) 10%, #fff);
}
.cat-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.top-flag {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: #b45309;
    background: #fff3e4;
}
.row-title {
    display: block;
    margin-top: 10px;
    font-size: 18.5px;
    line-height: 1.5;
    transition: color .2s ease;
}
.article-row:hover .row-title { color: var(--brand-dark); }
.row-summary {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 12px;
    color: #93a6b6;
}
.row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.row-meta .layui-icon { font-size: 13px; }

/* ---------------------------------------------------------- 侧栏 */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar.is-sticky { position: sticky; top: 96px; align-self: flex-start; }
.widget {
    padding: 22px 22px 18px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--line);
}
.widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
}
.widget-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand), #7ee0d4);
}
.widget-more { font-size: 12px; color: #9db1c1; }
.widget-more:hover { color: var(--brand-dark); }

.hot-list { display: flex; flex-direction: column; }
.hot-item {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
    transition: color .2s ease;
}
.hot-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.hot-rank {
    flex-shrink: 0;
    width: 22px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #b9c8d5;
    text-align: center;
}
.hot-item:nth-child(1) .hot-rank { color: var(--accent); }
.hot-item:nth-child(2) .hot-rank { color: #0fa89b; }
.hot-item:nth-child(3) .hot-rank { color: #2f6fed; }
.hot-body { min-width: 0; }
.hot-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.55;
    transition: color .2s ease;
}
.hot-item:hover .hot-title { color: var(--brand-dark); }
.hot-meta { margin-top: 4px; font-size: 11px; color: #a3b5c3; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    color: #4f6478;
    background: #f4f8fa;
    border: 1px solid transparent;
    transition: all .2s ease;
}
.tag-pill:hover {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: rgba(15, 168, 155, .3);
}
.tag-pill i { font-style: normal; font-size: 11px; color: #9db1c1; }

.side-about {
    padding: 24px 22px;
    border-radius: 16px;
    color: #eaf4f6;
    background: linear-gradient(150deg, #0c2233, #0a4a4c);
    position: relative;
    overflow: hidden;
}
.side-about::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 61, .35), transparent 70%);
}
.side-about .avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    padding: 6px;
    position: relative;
    z-index: 1;
}
.side-about h4 { margin-top: 14px; font-size: 16px; position: relative; z-index: 1; }
.side-about p { margin-top: 8px; font-size: 12.5px; line-height: 1.8; color: #a7c2cd; position: relative; z-index: 1; }
.side-about .side-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 16px;
    font-size: 12.5px;
    color: #7fe2d6;
}

/* ---------------------------------------------------------- 页面头部带 */
.page-hero {
    padding: 56px 0 36px;
    background:
        radial-gradient(60% 100% at 15% 0%, rgba(15, 168, 155, .10), transparent 70%),
        linear-gradient(180deg, #ffffff, #f5f8fa);
    border-bottom: 1px solid rgba(13, 27, 42, .04);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #93a6b6;
}
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb .sep { color: #c3d1db; }
.page-title {
    margin-top: 18px;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.3;
    letter-spacing: -.8px;
}
.page-sub { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 720px; }

/* ---------------------------------------------------------- 内容布局 */
.layout-with-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 30px;
    align-items: start;
}

/* 工具栏 */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tab {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    color: #5b7084;
    background: #fff;
    border: 1px solid var(--line);
    transition: all .2s ease;
}
.filter-tab:hover { color: var(--brand-dark); border-color: rgba(15, 168, 155, .4); }
.filter-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #17c3b0, #0b8d84);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(15, 168, 155, .24);
}
.sort-switch { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.sort-switch a {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    color: #6b7f92;
}
.sort-switch a.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 600; }

/* 空状态 */
.empty-state {
    padding: 70px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.empty-state .glyph {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 28px;
}
.empty-state h4 { font-size: 16px; }
.empty-state p { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

/* 分页 */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 34px;
}
.pager a, .pager .is-ellipsis {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 13.5px;
    color: #55697c;
    background: #fff;
    border: 1px solid var(--line);
    transition: all .2s ease;
}
.pager a:hover { color: var(--brand-dark); border-color: rgba(15, 168, 155, .45); }
.pager a.active {
    color: #fff;
    background: linear-gradient(135deg, #17c3b0, #0b8d84);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(15, 168, 155, .22);
}
.pager .is-ellipsis { border: 0; background: transparent; color: #a9b9c6; }
.pager .pager-total { margin-left: 8px; font-size: 12.5px; color: #93a6b6; }

/* ---------------------------------------------------------- 文章详情 */
.article-hero { padding: 48px 0 0; }
.article-title {
    margin: 18px 0 16px;
    font-size: clamp(27px, 3.3vw, 40px);
    line-height: 1.38;
    letter-spacing: -1px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
}
.article-meta .meta-dot { width: 4px; height: 4px; border-radius: 50%; background: #c3d1db; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .layui-icon { font-size: 14px; color: #9db1c1; }

.cover-banner {
    position: relative;
    height: 190px;
    margin-top: 30px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(120deg, var(--c, #0fa89b), #0a1e2e 78%);
    display: flex;
    align-items: center;
    padding: 0 44px;
}
.cover-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, .25));
    background-size: 16px 16px, 100% 100%;
    opacity: .6;
}
.cover-banner .cover-glyph {
    position: relative;
    z-index: 1;
    font-size: 92px;
    font-weight: 800;
    letter-spacing: -4px;
    color: rgba(255, 255, 255, .14);
    margin-left: auto;
}
.cover-banner .cover-text { position: relative; z-index: 1; color: #fff; }
.cover-banner .cover-text small { display: block; font-size: 11.5px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.cover-banner .cover-text strong { display: block; margin-top: 8px; font-size: 20px; }

.article-body {
    margin-top: 30px;
    padding: 44px 48px 40px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.prose { color: #26394b; font-size: 15.5px; line-height: 1.95; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
    margin-top: 40px;
    padding-left: 16px;
    position: relative;
    font-size: 21px;
    line-height: 1.5;
    color: var(--ink);
}
.prose h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(180deg, #19c8b6, #0b7f76);
}
.prose h3 { margin-top: 30px; font-size: 17.5px; }
.prose p { color: #33495c; }
.prose a { color: var(--brand-dark); border-bottom: 1px dashed rgba(15, 168, 155, .4); }
.prose ul, .prose ol { padding-left: 22px; list-style: disc; }
.prose li { margin-top: 8px; color: #33495c; }
.prose li strong, .prose p strong { color: var(--ink); font-weight: 600; }
.prose code {
    padding: 2px 7px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: #0b7f76;
    background: #eff8f7;
}
.prose pre {
    position: relative;
    margin-top: 22px;
    padding: 44px 20px 18px;
    border-radius: 12px;
    background: #0f1b2a;
    overflow-x: auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.prose pre code {
    padding: 0;
    background: transparent;
    color: #c9d7e2;
    font-size: 13.2px;
    line-height: 1.8;
    display: block;
    white-space: pre;
}
.code-lang {
    position: absolute;
    left: 18px;
    top: 13px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7b93a5;
}
.copy-code {
    position: absolute;
    right: 12px;
    top: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    color: #9fb4c4;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    cursor: pointer;
    transition: all .2s ease;
}
.copy-code:hover { color: #fff; background: rgba(15, 168, 155, .4); }

/* 代码高亮配色（自研轻量高亮） */
.tok-key { color: #6fd8c8; }
.tok-str { color: #a8df7d; }
.tok-num { color: #ffd166; }
.tok-comment { color: #63798b; font-style: italic; }
.tok-fn { color: #ffb86b; }
.tok-var { color: #e7c07a; }

.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 34px; }
.article-tags .label { font-size: 12px; color: #9db1c1; margin-right: 2px; }

.article-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #f0f4f7;
}
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 1px solid rgba(15, 168, 155, .2);
    cursor: pointer;
    transition: all .2s ease;
}
.like-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(15, 168, 155, .18); }
.like-btn.is-active { color: #fff; background: linear-gradient(135deg, #ffa35f, #ff7a2f); border-color: transparent; }
.share-hint { font-size: 12px; color: #9db1c1; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.pn-item {
    padding: 16px 20px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    transition: all .2s ease;
}
.pn-item:hover { border-color: rgba(15, 168, 155, .35); box-shadow: var(--shadow-sm); }
.pn-item.is-empty { opacity: .55; pointer-events: none; }
.pn-item small { display: block; font-size: 11.5px; color: #9db1c1; letter-spacing: 1px; }
.pn-item span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.pn-item.next { text-align: right; }

.related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.related-card {
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    transition: all .2s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.related-card .rc-cat { font-size: 11.5px; color: var(--c, var(--brand)); font-weight: 600; }
.related-card .rc-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* ---------------------------------------------------------- 关于我 */
.about-hero {
    padding: 64px 0 8px;
}
.about-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    align-items: center;
    padding: 36px;
    border-radius: 22px;
    background: linear-gradient(150deg, #0c2233, #0a3d42);
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-card::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 168, 155, .4), transparent 68%);
}
.about-avatar {
    position: relative;
    z-index: 1;
    width: 180px;
    height: 180px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
}
.about-avatar img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.about-info { position: relative; z-index: 1; }
.about-info .hi { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #7fe2d6; }
.about-info h2 { margin-top: 12px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.35; }
.about-info p { margin-top: 14px; max-width: 620px; color: #b4cbd5; font-size: 14px; line-height: 1.9; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.about-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 12.5px;
    color: #d7e8ee;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    transition: background .2s ease;
}
.about-link:hover { background: rgba(255, 255, 255, .16); }

.timeline { position: relative; margin-top: 8px; padding-left: 26px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, #19c8b6, rgba(15, 168, 155, .08));
}
.timeline-item { position: relative; padding: 0 0 28px 6px; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--brand);
    box-shadow: 0 0 0 4px rgba(15, 168, 155, .12);
}
.timeline-item .t-year {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: 1px;
}
.timeline-item h4 { margin-top: 4px; font-size: 16px; }
.timeline-item p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------- 页脚 */
.site-footer {
    margin-top: 20px;
    background: #081420;
    color: #9fb3c1;
}
.footer-main {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding: 64px 0 48px;
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text em { color: #7d95a6; }
.footer-desc { margin-top: 18px; max-width: 320px; font-size: 13px; line-height: 1.85; color: #8fa6b6; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #b9cdd9;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: all .2s ease;
}
.footer-social a:hover { color: #fff; background: rgba(15, 168, 155, .35); border-color: transparent; }
.footer-social .layui-icon { font-size: 17px; }

.footer-col h4 {
    font-size: 13.5px;
    color: #e6f1f4;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer-col a, .footer-col .footer-text {
    display: block;
    padding: 5px 0;
    font-size: 13px;
    color: #8fa6b6;
    transition: color .2s ease;
}
.footer-col a:hover { color: #5ee0cf; }
.footer-col .footer-text strong { color: #d7e8ee; font-weight: 500; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 20px 0;
}
.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 12px;
    color: #7d95a6;
}
.beian { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.beian a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8fa6b6;
    transition: color .2s ease;
}
.beian a:hover { color: #5ee0cf; }
.beian .layui-icon { font-size: 12px; }
.beian .beian-icon {
    height: 18px;
    width: auto;
    object-fit: contain;
    flex: 0 0 auto;
}
.footer-tech { color: #6f8798; }

/* ---------------------------------------------------------- 返回顶部 */
.to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(13, 27, 42, .82);
    border: 0;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .25s ease;
    z-index: 40;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--brand-dark); }

/* ---------------------------------------------------------- 动效 */
.js-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js-ready .reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 46px; }
    .hero-copy, .hero-visual { min-width: 0; }
    .hero-visual { max-width: 560px; }
    .layout-with-side { grid-template-columns: minmax(0, 1fr); }
    .layout-with-side > * { min-width: 0; }
    .sidebar.is-sticky { position: static; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 860px) {
    .container { width: calc(100% - 36px); }
    .prose { font-size: 15px; }
    .prose pre { max-width: 100%; }
    .header-inner { height: 66px; gap: 14px; }
    .nav {
        display: none;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 18px 18px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 36px rgba(13, 27, 42, .1);
    }
    .nav.is-open { display: flex; }
    .nav-link { padding: 12px 14px; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .search-box { width: 44px; padding: 0; justify-content: center; border-radius: 12px; }
    .search-box input { display: none; }
    .search-box .layui-icon { font-size: 17px; }
    .search-box.is-open {
        position: absolute;
        right: 58px;
        top: 13px;
        width: min(220px, calc(100% - 76px));
        padding: 0 14px;
        justify-content: flex-start;
        background: #fff;
        border-color: rgba(15, 168, 155, .45);
        box-shadow: 0 10px 24px rgba(13, 27, 42, .12);
        z-index: 5;
    }
    .search-box.is-open input { display: block; }
    .btn-github { display: none; }
    .stack-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .article-row { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
    .article-date { flex-direction: row; align-items: center; gap: 8px; padding: 0 0 12px; border-right: 0; border-bottom: 1px dashed var(--line); }
    .article-date b { font-size: 18px; }
    .article-date span { margin-top: 0; }
    .article-body { padding: 26px 22px; }
    .cover-banner { height: 140px; padding: 0 24px; }
    .cover-banner .cover-glyph { font-size: 64px; }
    .prev-next { grid-template-columns: 1fr; }
    .related-list { grid-template-columns: 1fr; }
    .about-card { grid-template-columns: 1fr; text-align: left; padding: 28px; }
    .about-avatar { width: 128px; height: 128px; }
    .about-avatar img { width: 84px; height: 84px; }
    .footer-main { grid-template-columns: 1fr; gap: 30px; padding: 46px 0 34px; }
    .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
    .section { padding: 60px 0; }
    .hero { padding: 56px 0 66px; }
    .hero-inner { gap: 34px; }
    .hero h1 { letter-spacing: -1px; }
    .hero-meta { flex-wrap: wrap; }
    .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
    .hero-visual { width: 100%; max-width: 100%; margin: 0; }
    .code-card { width: 100%; transform: none; }
    .code-card:hover { transform: translateY(-6px); }
    .code-window-body { font-size: 11.5px; padding: 16px 16px 22px; overflow-x: auto; }
    .float-badge.one { right: 0; top: -18px; }
    .float-badge.two { left: 0; bottom: -18px; }
    .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 520px) {
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-desc { font-size: 14.5px; }
    .hero h1 { font-size: 30px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-title { font-size: 26px; }
    .filter-tabs { width: 100%; overflow-x: auto; padding-bottom: 4px; flex-wrap: nowrap; }
    .code-window-body { font-size: 10.5px; }
}

/* 数据加载占位 */
.is-skeleton { min-height: 200px; border-style: dashed; opacity: .55; animation: skeletonPulse 1.4s ease-in-out infinite; }
@keyframes skeletonPulse { 0%,100% { opacity: .45; } 50% { opacity: .8; } }
