/* =========================================
   BLOG POST PAGE STYLES
   ========================================= */

/* Inherit brand variables from style.css */
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.7;
}

/* ─── Logo ──────────────────────────────── */
a.logo {
    text-decoration: none;
}

/* ─── Post Navigation ─────────────────── */
.post-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 11, 15, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.post-nav.scrolled {
    background: rgba(11, 11, 15, 0.95);
}

.post-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 5%;
    gap: 20px;
}

.post-nav-logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.post-nav-logo span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-nav-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    justify-content: center;
}

.post-nav-cat {
    color: var(--accent);
    font-weight: 600;
}

.post-nav-sep {
    opacity: 0.4;
}

.post-nav-cta {
    padding: 10px 20px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ─── Reading Progress Bar ────────────────── */
.post-progress-bar {
    position: fixed !important;
    top: var(--header-h, 70px) !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    width: 0%;
    background: var(--gradient-accent) !important;
    z-index: 998 !important;
    transition: width 0.12s linear;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

/* ─── Post Main ───────────────────────── */
.post-main {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 3%;
    padding-right: 3%;
    padding-bottom: 100px;
}

/* ─── Post Hero ───────────────────────── */
.post-hero {
    padding: 60px 0 48px;
}

.post-hero-inner {
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
}

.post-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    border-left: 3px solid var(--accent);
    padding-left: 18px;
}

.post-byline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-byline .blog-author-avatar {
    width: 44px;
    height: 44px;
    font-size: 0.85rem;
}

.post-byline strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.post-byline span {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.post-hero-img {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.post-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

/* ─── Article Body ────────────────────── */
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
}

.post-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.post-body strong {
    color: var(--text-primary);
}

.post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    transition: border-color 0.2s ease;
}

.post-body a:hover {
    border-color: var(--accent);
}

.post-body ul,
.post-body ol {
    padding-left: 24px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-body li {
    padding-left: 6px;
    color: var(--text-secondary);
}

.post-body ul li::marker {
    color: var(--accent);
}

.post-body ol li::marker {
    color: var(--accent);
    font-weight: 700;
}

/* Blockquote */
.post-body blockquote {
    margin: 2rem 0;
    padding: 24px 28px;
    background: rgba(0, 242, 255, 0.04);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.08rem;
    color: var(--text-primary);
    line-height: 1.65;
}

.post-body blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.82rem;
    font-style: normal;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ─── Author Box ──────────────────────── */
.post-author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 60px 0;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.post-author-avatar {
    width: 56px !important;
    height: 56px !important;
    font-size: 1rem !important;
    flex-shrink: 0;
}

.post-author-info strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.post-author-info>span {
    display: block;
    font-size: 0.82rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.post-author-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ─── Related Posts ───────────────────── */
.post-related {
    margin: 0 0 60px;
}

.post-related h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.post-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.post-related-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-related-card:hover {
    border-color: rgba(0, 242, 255, 0.2);
    transform: translateY(-3px);
}

.post-related-img {
    width: 80px;
    height: 60px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.post-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-related-card .blog-tag {
    margin-bottom: 6px;
    font-size: 0.65rem;
}

.post-related-card p {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* ─── CTA Banner ──────────────────────── */
.post-cta-banner {
    background: var(--bg-card);
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.post-cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(0, 242, 255, 0.06), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(112, 0, 255, 0.06), transparent 60%);
    pointer-events: none;
}

.post-cta-inner {
    position: relative;
    padding: 48px 40px;
    text-align: center;
}

.post-cta-inner h3 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.post-cta-inner p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1rem;
}

/* ─── Responsive ──────────────────────── */
@media (max-width: 640px) {
    .post-nav-meta {
        display: none;
    }

    .post-nav-cta {
        display: none;
    }

    .post-related-grid {
        grid-template-columns: 1fr;
    }

    .post-author-box {
        flex-direction: column;
    }

    .post-cta-inner {
        padding: 32px 24px;
    }

    .post-body h2 {
        font-size: 1.3rem;
    }

    .post-body blockquote {
        padding: 20px;
    }
}