/* ============================================================
   BLOG-POST.CSS — Neon Academy Article
   Matches home.css design system: Fredoka + Outfit + JetBrains Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --neon-purple: #7f5af0;
    --neon-blue:   #00d4ff;
    --neon-pink:   #ff0077;
    --neon-green:  #00ff88;
    --neon-gold:   #ffd700;
    --bg-card:     rgba(17, 17, 40, 0.85);
    --font-display: 'Fredoka', sans-serif;
    --font-body:    'Outfit', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

/* Adjust for fixed header */
.blog-layout {
    padding-top: 78px;
}

@media (max-width: 768px) {
    .blog-layout {
        padding-top: 68px;
    }
}

/* ── Article Container ───────────────────────────────────── */
.article-placeholder {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px;
    color: rgba(255,255,255,0.85);
    font-family: var(--font-body);
}

.article-placeholder h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    margin-bottom: 16px;
}

.article-placeholder p {
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 28px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
}

.breadcrumb a {
    color: var(--neon-blue);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.breadcrumb span {
    color: rgba(255,255,255,0.2);
}

/* ── Post Article Wrapper ────────────────────────────────── */
.post-article {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    font-family: var(--font-body);
}

.post-header {
    margin-bottom: 36px;
}

.post-tags-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.post-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    color: #fff;
    line-height: 1.25;
    margin: 0 0 16px;
    font-weight: 700;
}

.post-lead {
    font-size: 1.08rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.75;
    margin-bottom: 20px;
    border-left: 3px solid var(--neon-purple);
    padding-left: 16px;
}

/* ── Table of Contents ───────────────────────────────────── */
.toc {
    display: block;
    background: rgba(17, 17, 40, 0.7);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-left: 3px solid var(--neon-blue);
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 44px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.07);
}

.toc h2 {
    font-family: var(--font-mono);
    color: var(--neon-blue);
    font-size: 0.78rem;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.toc ol {
    margin: 0;
    padding-left: 20px;
    counter-reset: toc;
}

.toc li {
    padding: 3px 0;
}

.toc a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--neon-blue);
}

/* ── Article Body ────────────────────────────────────────── */
.post-body {
    color: rgba(255,255,255,0.82);
    line-height: 1.85;
    font-size: 1rem;
}

.post-body h2 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    color: #fff;
    margin: 52px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(127, 90, 240, 0.2);
    position: relative;
}

.post-body h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
    border-radius: 2px;
}

.post-body h3 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    color: rgba(255,255,255,0.92);
    margin: 32px 0 12px;
}

.post-body p {
    margin: 0 0 20px;
}

.post-body ul,
.post-body ol {
    padding-left: 26px;
    margin-bottom: 20px;
}

.post-body li {
    padding: 5px 0;
}

.post-body a {
    color: var(--neon-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.2s;
}

.post-body a:hover {
    color: var(--neon-purple);
    border-color: var(--neon-purple);
    text-decoration: none;
}

.post-body code {
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon-blue);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: var(--font-mono);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ── Code Blocks ─────────────────────────────────────────── */
.code-block {
    background: #060614;
    border: 1px solid rgba(127, 90, 240, 0.2);
    border-radius: 14px;
    overflow: hidden;
    margin: 28px 0;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.code-header {
    background: rgba(17, 17, 40, 0.9);
    padding: 9px 18px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    border-bottom: 1px solid rgba(127, 90, 240, 0.15);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-header::before {
    content: '● ● ●';
    color: rgba(255,255,255,0.2);
    letter-spacing: 4px;
    font-size: 0.6rem;
}

.code-block pre {
    margin: 0;
    padding: 22px 20px;
    overflow-x: auto;
}

.code-block code {
    background: transparent;
    color: #9ae6ff;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.65;
    font-family: var(--font-mono);
    border: none;
}

/* ── Info Boxes ──────────────────────────────────────────── */
.info-box {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-left: 3px solid var(--neon-blue);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 26px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.93rem;
    line-height: 1.7;
}

.info-box.success {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.2);
    border-left-color: var(--neon-green);
}

.info-box strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
}

/* ── Project Cards ───────────────────────────────────────── */
.project-card {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(127, 90, 240, 0.18);
    border-radius: 14px;
    padding: 22px 20px;
    margin: 14px 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.project-card:hover {
    border-color: rgba(127, 90, 240, 0.4);
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(127, 90, 240, 0.1);
}

.project-number {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(127, 90, 240, 0.4);
    min-width: 44px;
    line-height: 1;
}

.project-content h3 {
    font-family: var(--font-display);
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.05rem;
}

.project-content p {
    margin: 0 0 10px;
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    line-height: 1.6;
}

.project-difficulty {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    font-family: var(--font-mono);
}

/* ── Info Table ──────────────────────────────────────────── */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 0.9rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(127, 90, 240, 0.15);
}

.info-table th {
    background: rgba(127, 90, 240, 0.15);
    color: var(--neon-blue);
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(127, 90, 240, 0.2);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.info-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover td {
    background: rgba(127, 90, 240, 0.05);
}

/* ── FAQ List ────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(127, 90, 240, 0.18);
    border-radius: 12px;
    padding: 20px 22px;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: rgba(127, 90, 240, 0.35);
}

.faq-item h3 {
    font-family: var(--font-display);
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin: 0 0 10px;
}

.faq-item p {
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

/* ── Post CTA ────────────────────────────────────────────── */
.post-cta {
    position: relative;
    background: linear-gradient(135deg, #0f0824 0%, #0a1528 100%);
    border: 1px solid rgba(127, 90, 240, 0.35);
    border-radius: 20px;
    padding: 44px 36px;
    text-align: center;
    margin: 52px 0 36px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(127, 90, 240, 0.1);
}

.post-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-purple), var(--neon-blue), transparent);
}

.post-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(127, 90, 240, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.post-cta h2 {
    font-family: var(--font-display);
    color: #fff !important;
    font-size: 1.65rem !important;
    margin: 0 0 14px !important;
    border: none !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
}

.post-cta h2::after {
    display: none;
}

.post-cta p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.97rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(127, 90, 240, 0.5);
    z-index: 1;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(127, 90, 240, 0.7);
    text-decoration: none;
}

.cta-button:hover::after {
    left: 100%;
}

.cta-note {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
    margin-top: 14px;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* ── Post Navigation ─────────────────────────────────────── */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-top: 1px solid rgba(127, 90, 240, 0.15);
    gap: 16px;
    flex-wrap: wrap;
    background: var(--bg-card, rgba(17, 17, 40, 0.85));
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    margin-top: 48px;
}

.nav-prev,
.nav-next {
    color: var(--neon-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-prev:hover,
.nav-next:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(127, 90, 240, 0.4);
    text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .post-article {
        max-width: 100%;
    }

    .post-header h1 {
        font-size: 1.55rem;
    }

    .project-card {
        flex-direction: column;
        gap: 10px;
    }

    .project-number {
        font-size: 1.3rem;
    }

    .post-cta {
        padding: 30px 20px;
    }

    .post-navigation {
        flex-direction: column;
        text-align: center;
    }

    .code-block pre {
        padding: 16px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
