
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../../../../resource/font/jbmono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../../../../resource/font/jbmono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-slate: #0f172a;
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-light: #64748b;
    --accent-primary: #3b82f6;
    --accent-hover: #1d4ed8;
    --accent-cyan: #06b6d4;
    --border-color: rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    background: var(--bg-white);
    color: var(--text-body);
    font-family: var(--font-main);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; }

.read-progress-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    z-index: 2000; transition: width 0.1s linear; pointer-events: none;
}

.article-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 56px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 140px 40px 120px;
    align-items: start;
}

.article-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.breadcrumbs {
    font-size: 13px; font-weight: 600; color: var(--text-light);
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; line-height: 2;
}
.breadcrumbs a { color: var(--text-body); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--accent-primary); }
.breadcrumbs .sep { opacity: 0.3; }
.breadcrumbs .current { color: var(--text-dark); font-weight: 700; }

.author-meta {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 22px;
    display: flex; flex-direction: column; gap: 12px;
}
.author-avatar {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--bg-slate); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 13px; font-weight: 800;
}
.author-name { font-weight: 800; font-size: 15px; color: var(--text-dark); line-height: 1.3; }
.author-role { font-size: 12px; color: var(--text-light); font-weight: 600; }
.post-date {
    font-size: 12px; font-weight: 700; color: var(--accent-primary);
    background: rgba(59,130,246,0.08); padding: 4px 10px; border-radius: 99px;
    align-self: flex-start;
}
.post-read-time { font-size: 12px; color: var(--text-light); font-weight: 600; font-family: var(--font-mono); }

.toc-box { border-left: 3px solid var(--border-color); padding-left: 16px; }
.toc-title {
    font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 12px;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.toc-list a {
    font-size: 13px; font-weight: 600; color: var(--text-body); text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
    border-left: 2px solid transparent; padding-left: 10px; margin-left: -13px;
    display: block; line-height: 1.55;
}
.toc-list a:hover { color: var(--accent-primary); }
.toc-list a.active { color: var(--accent-primary); border-left-color: var(--accent-primary); }

.article-main { max-width: 860px; }

.article-title {
    font-size: clamp(28px, 4vw, 48px); font-weight: 900; color: var(--text-dark);
    letter-spacing: -2px; line-height: 1.1;
    margin-bottom: 48px; padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.article-content { font-size: 17px; color: var(--text-body); line-height: 1.85; }
.article-content p { margin-bottom: 24px; }

.article-intro {
    padding-bottom: 44px;
    border-bottom: 1px solid var(--border-color);
}

.article-section {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin: 20px 0 0;
    background: var(--bg-white);
    box-shadow: 0 4px 20px rgba(15,23,42,0.09), 0 1px 4px rgba(15,23,42,0.06);
    transition: box-shadow 0.25s;
}
.article-section:hover {
    box-shadow: 0 10px 36px rgba(15,23,42,0.13), 0 2px 8px rgba(15,23,42,0.07);
}
.article-section > h2:first-child {
    margin: 0;
    padding: 22px 32px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-size: clamp(16px, 2vw, 20px);
}
.section-body {
    padding: 32px 32px 36px;
}
.article-content strong { font-weight: 700; color: var(--text-dark); }
.article-content a {
    color: var(--accent-primary); text-decoration: none;
    border-bottom: 1px solid rgba(59,130,246,0.3); transition: border-color 0.2s;
}
.article-content a:hover { border-bottom-color: var(--accent-primary); }

.article-content h2 {
    margin: 0;
    font-size: clamp(16px, 2vw, 20px); font-weight: 800;
    color: var(--text-dark); letter-spacing: -0.3px; line-height: 1.3;
    display: flex; align-items: center; gap: 12px;
}
.section-num {
    flex-shrink: 0; width: 34px; height: 34px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.18);
    color: var(--accent-primary); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 12px; font-weight: 900;
}

.article-content h3 { font-size: 20px; font-weight: 800; color: var(--text-dark); margin: 40px 0 16px; }

.article-content blockquote {
    margin: 40px 0; padding: 28px 32px;
    background: var(--bg-light); border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary); border-radius: 0 16px 16px 0;
    font-size: 18px; font-weight: 600; color: var(--text-dark);
    line-height: 1.65; font-style: italic;
}
.article-content blockquote p { margin-bottom: 0; color: inherit; }

.article-content ul,
.article-content ol { margin-bottom: 24px; padding-left: 24px; }
.article-content ul { list-style: none; }
.article-content ul li { position: relative; padding-left: 4px; margin-bottom: 10px; line-height: 1.75; }
.article-content ul li::before { content: '—'; position: absolute; left: -18px; color: var(--accent-primary); font-weight: 800; }
.article-content ol li { margin-bottom: 12px; line-height: 1.75; }
.article-content ul li strong,
.article-content ol li strong { color: var(--text-dark); }

.article-content code {
    font-family: var(--font-mono); font-size: 0.875em; font-weight: 700;
    background: rgba(59,130,246,0.06); color: var(--accent-primary);
    padding: 2px 7px; border-radius: 6px;
    border: 1px solid rgba(59,130,246,0.15);
}

.article-table-wrap {
    margin: 0 0 28px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color); border-radius: 16px;
    overflow: hidden; box-shadow: var(--shadow-sm);
}
.article-content table.article-matrix {
    width: 100%; min-width: 520px; border-collapse: collapse;
    font-size: 14px; font-weight: 500;
}
.article-matrix-caption {
    caption-side: top; text-align: left;
    font-family: var(--font-mono); font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light);
    padding: 12px 16px 10px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}
.article-content table.article-matrix th,
.article-content table.article-matrix td {
    border: 1px solid var(--border-color); padding: 12px 16px;
    vertical-align: top; line-height: 1.6; text-align: left;
}
.article-content table.article-matrix thead th {
    background: var(--bg-slate); color: rgba(255,255,255,0.9);
    font-weight: 700; font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.04em; border-color: rgba(255,255,255,0.08);
}
.article-content table.article-matrix tbody th[scope="row"] {
    background: var(--bg-light); color: var(--text-dark);
    font-weight: 700; white-space: nowrap; font-size: 13px;
}
.article-content table.article-matrix tbody tr:nth-child(even) td {
    background: rgba(248,250,252,0.8);
}

.terminal-block {
    margin: 40px 0; border-radius: 16px; overflow: hidden; background: #000;
    box-shadow: 0 24px 48px rgba(15,23,42,0.15), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.terminal-block .term-header {
    background: #111; padding: 12px 18px;
    font-family: var(--font-mono); font-size: 12px; font-weight: 800; color: #555;
    border-bottom: 1px solid #222; text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
}
.term-dot { width: 10px; height: 10px; background: #333; border-radius: 50%; flex-shrink: 0; }
.term-filename { margin-left: auto; color: #444; font-size: 11px; }
.terminal-block pre {
    margin: 0; padding: 24px 28px;
    overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;
    font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: #e2e8f0;
}
.terminal-block pre code { background: transparent; padding: 0; border: none; color: inherit; font-size: inherit; display: block; }
.hl  { color: #60a5fa; font-weight: 700; }
.ok  { color: #34d399; font-weight: 700; }
.err { color: #f87171; font-weight: 700; }
.dim { color: #4b5563; }

.article-cta {
    margin: 64px 0;
    padding: clamp(48px,6vw,88px) clamp(28px,4vw,56px);
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
    border-radius: 32px; text-align: center; position: relative; overflow: hidden;
    box-shadow: 0 32px 64px -16px rgba(15,23,42,0.4);
}
.article-cta::before {
    content: ''; position: absolute; inset: -30% -10% auto auto; width: 60%; height: 120%;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 60%);
    pointer-events: none;
}
.article-cta-inner { position: relative; z-index: 2; }
.article-cta h3 {
    font-size: clamp(22px,3.5vw,36px); font-weight: 900; color: #fff;
    letter-spacing: -1px; margin-bottom: 14px; line-height: 1.2;
}
.article-cta p { font-size: 16px; color: rgba(226,232,240,0.85); max-width: 480px; margin: 0 auto; line-height: 1.65; }
.article-cta .btn {
    display: inline-block; margin-top: 28px; padding: 16px 44px;
    background: var(--accent-primary); color: #fff; font-size: 15px; font-weight: 800;
    text-decoration: none; border-radius: 99px;
    transition: 0.3s var(--ease-apple); position: relative; z-index: 2;
}
.article-cta .btn:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(59,130,246,0.4); }

.floating-cta {
    position: fixed; right: 28px; bottom: 32px; z-index: 900; width: 232px;
    background: linear-gradient(155deg, #090e1a 0%, #0f1d30 55%, #0b1524 100%);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 20px; padding: 18px;
    box-shadow: 0 28px 56px rgba(9,14,26,0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
    display: flex; flex-direction: column; gap: 10px;
    transition: transform 0.4s var(--ease-apple), opacity 0.3s;
    transform: translateY(calc(100% + 48px)); opacity: 0; pointer-events: none;
}
.floating-cta.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.floating-cta:hover { transform: translateY(-4px) !important; box-shadow: 0 36px 64px rgba(9,14,26,0.6), 0 0 0 1px rgba(59,130,246,0.2) inset !important; }
.fc-header { display: flex; align-items: center; gap: 8px; }
.fc-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,0.8);
    flex-shrink: 0; animation: fc-pulse 2.2s ease-in-out infinite;
}
@keyframes fc-pulse {
    0%,100% { opacity: 1; box-shadow: 0 0 8px rgba(52,211,153,0.8); }
    50% { opacity: 0.55; box-shadow: 0 0 3px rgba(52,211,153,0.3); }
}
.fc-label { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.88); }
.fc-sep { width: 100%; height: 1px; background: rgba(255,255,255,0.06); }
.fc-desc { font-size: 12px; font-weight: 600; line-height: 1.6; color: rgba(255,255,255,0.45); }
.fc-btn {
    display: block; background: var(--accent-primary); color: #fff; padding: 12px;
    text-align: center; font-size: 12px; font-weight: 800; text-decoration: none;
    border-radius: 12px; transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.fc-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(59,130,246,0.4); }

.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-apple), transform 0.6s var(--ease-apple); }
.reveal-up.revealed { opacity: 1; transform: none; }

@media (max-width: 1100px) { .floating-cta { display: none; } }

@media (max-width: 960px) {
    .article-layout { grid-template-columns: 1fr; gap: 32px; padding-top: 110px; }
    .article-sidebar { position: relative; top: 0; flex-direction: row; flex-wrap: wrap; }
    .toc-box { display: none; }
}

@media (max-width: 640px) {
    .article-layout { padding: 100px 20px 80px; }
    .article-title { font-size: clamp(24px, 7vw, 32px); letter-spacing: -1px; margin-bottom: 32px; }
    .article-content { font-size: 16px; }
    .article-content h2 { margin: 0; gap: 10px; }
    .section-body { padding: 24px 20px 28px; }
    .article-section { border-radius: 16px; }
    .section-num { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
    .article-cta { padding: 40px 24px; border-radius: 24px; }
    .terminal-block pre { padding: 18px 20px; font-size: 12px; }
}

.blog-list-page-header {
    padding: clamp(140px, 22vw, 200px) 0 56px;
    text-align: left; position: relative; overflow: hidden;
    background: var(--bg-white);
}

.blog-article-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 16px rgba(15,23,42,0.05);
}
.bah-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1280px; margin: 0 auto; padding: 0 40px; height: 62px;
}
.bah-logo {
    font-size: 15px; font-weight: 800; color: var(--text-dark);
    text-decoration: none; display: flex; align-items: center; gap: 8px;
    letter-spacing: -0.3px;
}
.bah-logo-img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.bah-back {
    font-size: 13px; font-weight: 700; color: var(--text-body);
    text-decoration: none; padding: 7px 16px;
    border-radius: 99px; border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.6); transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.bah-back:hover { color: var(--accent-primary); border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.04); }
@media (max-width: 640px) {
    .bah-inner { padding: 0 20px; height: 54px; }
    .bah-back { font-size: 12px; padding: 5px 12px; }
    .bah-logo { font-size: 14px; }
}
