/* Blog — standalone, lightweight styles sharing the main site's tokens.
   Blog pages deliberately skip the 3D/preloader layer: plain, fast HTML
   is what search engines and readers both want here. */

:root {
    --bg: #04070b;
    --bg-2: #070c12;
    --surface: rgba(255, 255, 255, 0.025);
    --surface-2: rgba(255, 255, 255, 0.045);
    --green: #00ffa3;
    --cyan: #22d3ee;
    --violet: #2bb6e0;
    --grad: linear-gradient(120deg, #00ffa3 0%, #22d3ee 52%, #2bb6e0 100%);
    --text: #cdd7df;
    --text-dim: #7c8a97;
    --text-bright: #ffffff;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 255, 163, 0.4);
    --font-display: 'Sora', 'Space Grotesk', system-ui, sans-serif;
    --font-main: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    background: var(--bg); color: var(--text); font-family: var(--font-main);
    font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(900px 500px at 85% -10%, rgba(0, 255, 163, .08), transparent 60%),
        radial-gradient(700px 500px at -10% 30%, rgba(43, 182, 224, .06), transparent 60%);
    background-repeat: no-repeat;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.b-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
.b-narrow { max-width: 760px; }

/* ---- Header ---- */
.b-header {
    position: sticky; top: 0; z-index: 10; background: rgba(4, 7, 11, .78);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.b-header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.b-logo img { height: 34px; width: auto; }
.b-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.b-nav::-webkit-scrollbar { display: none; }
.b-nav a {
    font-family: var(--font-mono); font-size: .82rem; color: var(--text-dim);
    padding: 8px 12px; border-radius: 10px; white-space: nowrap; transition: color .2s, background .2s;
}
.b-nav a:hover, .b-nav a[aria-current="page"] { color: var(--text-bright); background: var(--surface-2); text-decoration: none; }

/* ---- Shared bits ---- */
.b-tag { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em; color: var(--green); text-transform: uppercase; }
.b-cat {
    display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--green); border: 1px solid rgba(0, 255, 163, .3);
    background: rgba(0, 255, 163, .06); padding: 4px 10px; border-radius: 30px;
}
.b-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Blog index ---- */
.b-hero { padding-block: 72px 40px; }
.b-hero h1 {
    font-family: var(--font-display); font-weight: 800; color: var(--text-bright);
    font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin: 14px 0 18px;
}
.b-hero p { max-width: 640px; color: var(--text); font-size: 1.1rem; }

.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; padding-bottom: 80px; }
.b-card {
    border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface);
    transition: border-color .3s, transform .3s var(--ease);
}
.b-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.b-card a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.b-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--border); }
.b-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.b-card h2, .b-card h3 { font-family: var(--font-display); color: var(--text-bright); font-size: 1.18rem; line-height: 1.3; letter-spacing: -.01em; }
.b-card p { color: var(--text-dim); font-size: .95rem; line-height: 1.6; }
.b-card-meta { margin-top: auto; font-family: var(--font-mono); font-size: .74rem; color: var(--text-dim); }

.b-featured { grid-column: 1 / -1; }
@media (min-width: 860px) {
    .b-featured a { flex-direction: row; align-items: center; }
    .b-featured img { width: 56%; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--border); }
    .b-featured .b-card-body { padding: 32px; justify-content: center; }
    .b-featured h2 { font-size: 1.7rem; }
}

/* ---- Post ---- */
.b-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 32px; font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); }
.b-crumbs a { color: var(--text-dim); }
.b-crumbs a:hover { color: var(--green); }
.b-crumbs [aria-current] { color: var(--text); }

.b-post-head { padding-block: 28px 28px; }
.b-post-head h1 {
    font-family: var(--font-display); font-weight: 800; color: var(--text-bright);
    font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -.025em; margin: 16px 0 16px;
}
.b-lede { font-size: 1.15rem; color: var(--text); }
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); }
.b-meta img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.b-meta a { color: var(--text-bright); }

.b-banner { margin-block: 8px 36px; }
.b-banner img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); }

.b-toc { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 18px 22px; margin-bottom: 36px; }
.b-toc strong { display: block; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.b-toc ul { list-style: none; }
.b-toc li { margin: 4px 0; font-size: .95rem; }
.b-toc a { color: var(--text); }
.b-toc a:hover { color: var(--green); }

.b-prose { color: var(--text); }
.b-prose > * + * { margin-top: 1.15em; }
.b-prose h2 {
    font-family: var(--font-display); color: var(--text-bright); font-size: 1.65rem; line-height: 1.25;
    letter-spacing: -.015em; margin-top: 2.2em; scroll-margin-top: 90px;
}
.b-prose h3 { font-family: var(--font-display); color: var(--text-bright); font-size: 1.22rem; margin-top: 1.8em; scroll-margin-top: 90px; }
.b-prose strong { color: var(--text-bright); }
.b-prose ul, .b-prose ol { padding-left: 1.4em; }
.b-prose li + li { margin-top: .45em; }
.b-prose li::marker { color: var(--green); }
.b-prose blockquote {
    border-left: 3px solid var(--green); background: var(--surface); padding: 14px 20px;
    border-radius: 0 12px 12px 0; color: var(--text-bright);
}
.b-prose code {
    font-family: var(--font-mono); font-size: .86em; background: var(--surface-2);
    border: 1px solid var(--border); padding: 2px 6px; border-radius: 6px; color: var(--text-bright);
}

.b-author {
    display: flex; gap: 18px; align-items: flex-start; margin-top: 56px; padding: 24px;
    border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
}
.b-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.b-author h2 { font-family: var(--font-display); font-size: 1.1rem; color: var(--text-bright); }
.b-author p { font-size: .95rem; margin-top: 6px; }
.b-author-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-family: var(--font-mono); font-size: .8rem; }

.b-related { padding-top: 64px; }
.b-related > h2 { font-family: var(--font-display); color: var(--text-bright); font-size: 1.5rem; margin-bottom: 22px; }

/* ---- Footer ---- */
.b-footer { border-top: 1px solid var(--border); padding-block: 28px; }
.b-footer-in { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); }
.b-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.b-footer a { color: var(--text-dim); }
.b-footer a:hover { color: var(--green); }

@media (max-width: 560px) {
    body { font-size: 16px; }
    .b-hero { padding-block: 48px 28px; }
    .b-author { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .b-card, .b-card:hover { transition: none; transform: none; }
}
