/* Public blog pages. Builds on style.css (colours, fonts, footer). */
body.public-page { padding-top: 76px; }
.public-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.85rem 1.5rem; background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color);
}
.public-brand {
    font-size: 1.5rem; font-weight: 800; text-decoration: none; white-space: nowrap;
    background: linear-gradient(to right, #6c5ce7, #a29bfe);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.public-nav-links { display: flex; align-items: center; gap: 1.1rem; }
.public-nav-link { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.public-nav-link.active, .public-nav-link:hover { color: var(--accent); }
.public-nav-cta {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff; text-decoration: none;
    font-weight: 600; padding: 0.55rem 1.1rem; border-radius: 999px;
    box-shadow: 0 6px 14px rgba(108, 92, 231, 0.25);
}

.blog-wrap { width: 92%; max-width: 1040px; margin: 2.5rem auto 0; }
.blog-hero { text-align: center; margin-bottom: 2.5rem; }
.blog-hero h1, .post-header h1 {
    font-weight: 800; line-height: 1.15;
    background: linear-gradient(135deg, #6c5ce7, #00cec9);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.blog-hero h1 { font-size: 2.8rem; margin-bottom: 0.75rem; }
.blog-hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto; line-height: 1.6; }
.blog-empty { text-align: center; color: var(--text-secondary); }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.post-card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px;
    padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(108, 92, 231, 0.12); }
.post-card h2, .post-card h3 { font-size: 1.2rem; line-height: 1.3; }
.post-card h2 a, .post-card h3 a { color: var(--text-primary); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--text-secondary); line-height: 1.55; font-size: 0.97rem; }
.post-card-meta { color: var(--text-secondary); font-size: 0.85rem; display: flex; gap: 0.4rem; }
.post-card-link { margin-top: auto; color: var(--accent); font-weight: 600; text-decoration: none; }
.post-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.post-tags li { font-size: 0.75rem; font-weight: 600; color: var(--accent); background: rgba(108, 92, 231, 0.08); padding: 0.2rem 0.6rem; border-radius: 999px; }

.breadcrumbs { font-size: 0.88rem; color: var(--text-secondary); margin: 0 auto 1rem; max-width: 760px; }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.post {
    max-width: 760px; margin: 0 auto; background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 24px; padding: 2.5rem 2.5rem 2rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}
.post-header h1 { font-size: 2.3rem; margin-bottom: 0.75rem; }
.post-lede { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.6; }
.post-meta { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.45rem; color: var(--text-secondary); font-size: 0.9rem; }
.post-toc { margin: 1.75rem 0 0.5rem; padding: 1rem 1.25rem; border-radius: 14px; background: rgba(108, 92, 231, 0.05); border: 1px solid rgba(108, 92, 231, 0.12); }
.post-toc ol { margin: 0.5rem 0 0 1.2rem; line-height: 1.8; }
.post-toc a { color: var(--accent); text-decoration: none; }

.post-body { margin-top: 1.5rem; font-size: 1.06rem; line-height: 1.75; color: var(--text-primary); }
.post-body h2 { font-size: 1.5rem; margin: 2.1rem 0 0.7rem; line-height: 1.3; scroll-margin-top: 90px; }
.post-body h3 { font-size: 1.2rem; margin: 1.6rem 0 0.5rem; scroll-margin-top: 90px; }
.post-body p, .post-body ul, .post-body ol, .post-body blockquote, .post-body .post-table { margin: 0 0 1.1rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.35rem; }
.post-body a { color: var(--accent); text-underline-offset: 2px; }
.post-body code { background: #f1f2f6; padding: 0.1rem 0.35rem; border-radius: 6px; font-size: 0.92em; }
.post-body blockquote {
    border-left: 4px solid var(--accent); background: rgba(108, 92, 231, 0.05);
    padding: 0.8rem 1rem; border-radius: 0 12px 12px 0; color: var(--text-secondary);
}
.post-body blockquote p { margin: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--border-color); margin: 2rem 0; }
.post-table { overflow-x: auto; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.post-body th, .post-body td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-color); }
.post-body th { background: rgba(108, 92, 231, 0.06); font-weight: 600; }

.post-cta {
    margin-top: 2.25rem; padding: 1.6rem; border-radius: 18px; text-align: center;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 206, 201, 0.08));
    border: 1px solid rgba(108, 92, 231, 0.18);
}
.post-cta h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.post-cta p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.1rem; }
.post-cta .cta-button {
    display: inline-block; background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
    font-weight: 600; padding: 0.9rem 2rem; border-radius: 999px; text-decoration: none;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}
.related { max-width: 760px; margin: 2.5rem auto 0; }
.related h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.post-grid--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 640px) {
    body.public-page { padding-top: 64px; }
    .public-nav { padding: 0.7rem 1rem; }
    .public-brand { font-size: 1.2rem; }
    .public-nav-links { gap: 0.75rem; font-size: 0.95rem; }
    .public-nav-cta { display: none; }
    .blog-wrap { width: 94%; margin-top: 1.5rem; }
    .blog-hero h1 { font-size: 2rem; }
    .post { padding: 1.5rem 1.15rem 1.25rem; border-radius: 18px; }
    .post-header h1 { font-size: 1.75rem; }
    .post-body { font-size: 1.02rem; }
    .post-body h2 { font-size: 1.3rem; }
}
