/* ── Blog — Design Tokens ── */
:root {
    --bg: #050508;
    --surface: #0d0d12;
    --surface-2: #131318;
    --border: #1a1a22;
    --text: #e8e8ed;
    --text-dim: #6b6b78;
    --text-muted: #44444f;
    --accent: #4ade80;
    --accent-dim: rgba(74, 222, 128, 0.12);
    --mono: 'JetBrains Mono', 'SF Mono', monospace;
    --sans: 'Inter', -apple-system, sans-serif;

    /* glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shine: rgba(255, 255, 255, 0.08);
    --glass-blur: 24px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Subtle grid ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(74, 222, 128, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 222, 128, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ── Ambient orbs ── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    animation: orb-drift 20s ease-in-out infinite alternate;
}
.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08), transparent 70%);
    top: -150px; left: -100px;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 70%);
    bottom: -100px; right: -100px;
    animation-delay: -10s;
}
.orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05), transparent 70%);
    top: 50%; left: 60%;
    animation-delay: -5s;
}
@keyframes orb-drift {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}

/* ── Scanline ── */
.scanline {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
    animation: scan 5s linear infinite;
    pointer-events: none;
    z-index: 999;
}
@keyframes scan {
    0%   { top: 0; opacity: 0; }
    5%   { opacity: 0.3; }
    95%  { opacity: 0.3; }
    100% { top: 100vh; opacity: 0; }
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(30px) saturate(1.8);
    -webkit-backdrop-filter: blur(30px) saturate(1.8);
    border-bottom: 1px solid var(--glass-border);
}
.nav-logo {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.nav-logo .green { color: var(--accent); }
.nav-logo .cursor {
    display: inline-block;
    width: 2px; height: 18px;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active-link { color: var(--accent); }
.nav-cta {
    padding: 8px 20px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.2s !important;
}
.nav-cta:hover {
    background: var(--accent) !important;
    color: var(--bg) !important;
}
.nav-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim) !important;
    font-family: var(--mono);
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}
.nav-lang:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background: var(--accent-dim);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    transition: 0.3s;
}

/* ── Feed wrapper ── */
.feed-wrapper {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Header ── */
.blog-header {
    padding: 100px 0 40px;
    text-align: center;
}
.blog-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}
.blog-header-badge .dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity:1; box-shadow:0 0 0 0 rgba(74,222,128,0.4); }
    50%     { opacity:0.7; box-shadow:0 0 0 6px rgba(74,222,128,0); }
}
.blog-header h1 {
    font-family: var(--mono);
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.blog-header p {
    font-size: 15px;
    color: var(--text-dim);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Timeline spine ── */
.timeline {
    position: relative;
    padding: 8px 0 60px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--glass-border) 5%,
        rgba(74, 222, 128, 0.12) 50%,
        var(--glass-border) 95%,
        transparent 100%
    );
    transform: translateX(-50%);
}

/* ── Glass post card ── */
.post {
    position: relative;
    margin-bottom: 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
    opacity: 0;
    transform: translateY(20px);
}
.post.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Silver shine edge — top highlight */
.post::before {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.12) 30%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.12) 70%,
        transparent
    );
    border-radius: 20px 20px 0 0;
}

/* Inner refraction glow */
.post::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(
        ellipse at 30% 0%,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.post:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* ── Post header row ── */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.post-avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(74,222,128,0.15), rgba(59,130,246,0.1));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}
.post-meta {
    flex: 1;
    min-width: 0;
}
.post-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.post-handle {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
}
.post-date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Tag ── */
.post-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
}
.post-tag.announcement {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.15);
}
.post-tag.feature {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.15);
}
.post-tag.update {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.15);
}
.post-tag.dev {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.15);
}
.post-tag.insight {
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.15);
}
.post-tag.milestone {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.15);
}
.post-tag.faq {
    background: rgba(255, 255, 255, 0.05);
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.post-tag.deep-dive {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.15);
}

/* ── Post content ── */
.post-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}
.post-body {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    word-wrap: break-word;
}
.post-body b {
    color: var(--text);
    font-weight: 600;
}

/* ── Post image ── */
.post-image {
    margin: 16px auto 0;
    width: 80%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    background: var(--surface);
}
.post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-image:hover img {
    transform: scale(1.02);
}

/* ── Post footer ── */
.post-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
}
.post-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.2s;
}
.post-stat svg {
    width: 16px; height: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.post-stat:hover { color: var(--text-dim); }
.post-stat:hover svg { opacity: 0.8; }

.post-link {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}
.post-link:hover {
    color: var(--accent);
    border-color: rgba(74, 222, 128, 0.3);
    background: var(--accent-dim);
}

/* ── Footer ── */
.blog-footer {
    text-align: center;
    padding: 20px 0 40px;
    border-top: 1px solid var(--glass-border);
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
}

/* ── Silver liquid loading shimmer ── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.post-skeleton {
    margin-bottom: 24px;
    border-radius: 20px;
    height: 200px;
    background: linear-gradient(
        90deg,
        var(--glass-bg) 0%,
        rgba(255, 255, 255, 0.06) 40%,
        rgba(255, 255, 255, 0.03) 60%,
        var(--glass-bg) 100%
    );
    background-size: 800px 200px;
    animation: shimmer 2s ease-in-out infinite;
    border: 1px solid var(--glass-border);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .navbar { padding: 0 20px; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: rgba(5, 5, 8, 0.95);
        backdrop-filter: blur(30px);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-toggle { display: flex; }
    .blog-header h1 { font-size: 28px; }
    .feed-wrapper { padding: 0 12px; }
    .post { padding: 20px; border-radius: 16px; }
    .post-title { font-size: 15px; }
    .post-body { font-size: 13px; }
    .timeline::before { display: none; }
}
