/* ==========================================================================
   THE ALPHA KNIGHT - BLOG EDITORIAL STYLES
   ========================================================================== */

:root {
    --bg-base: #030305;
    --text-main: #FFFFFF;
    --text-body: #C4C4CC;
    --text-muted: #80808A;
    
    --accent-orange: #FF5E00;
    --accent-orange-glow: rgba(255, 94, 0, 0.15);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Reset & Smooth Scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-body);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #FF5E00, #ff8c42);
    z-index: 9999;
    box-shadow: 0 0 12px var(--accent-orange-glow);
    transition: width 0.1s ease;
}

/* Top Navigation */
.blog-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 5%;
    z-index: 100;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-orange);
}

.back-link .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-link:hover .arrow {
    transform: translateX(-5px);
}

/* Hero Section */
.blog-hero {
    padding: 160px 5% 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: radial-gradient(circle at top center, rgba(255,94,0,0.04) 0%, var(--bg-base) 60%);
}

.hero-wrapper {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-orange-glow);
    color: var(--accent-orange);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
}

.blog-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 900;
    letter-spacing: -1px;
}

.highlight {
    color: var(--accent-orange);
}

.blog-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Layout Grid */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 5%;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 80px;
    align-items: start; /* Crucial: Allows items to have natural height so sticky works */
}

/* Sticky TOC Sidebar (Centered Vertically) */
.toc-wrapper {
    position: sticky;
    top: 50vh; /* Pushes to middle of viewport */
    transform: translateY(-50%); /* Perfectly centers it vertically */
    height: max-content; /* Prevents it from stretching */
}

.toc-heading {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

#toc {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 15px;
}

#toc ul {
    list-style: none;
}

#toc li {
    margin-bottom: 15px;
}

#toc a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    transition: all 0.3s ease;
    line-height: 1.4;
    position: relative;
    left: 0;
}

#toc a:hover {
    color: var(--text-main);
    left: 3px; /* Smooth hover indent */
}

#toc a.active {
    color: var(--accent-orange);
    font-weight: 600;
    left: 3px;
}

/* Article Content Formatting */
.blog-content {
    max-width: 800px;
    font-size: 1.15rem; /* Highly readable */
    padding-bottom: 120px; /* Space for Bottom CTA */
}

.blog-content section {
    margin-bottom: 70px;
}

.blog-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.blog-content p {
    margin-bottom: 25px;
}

.lead {
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 300;
    line-height: 1.6;
}

/* Blockquote */
.alpha-quote {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-main);
    border-left: 4px solid var(--accent-orange);
    padding: 15px 0 15px 35px;
    margin: 50px 0;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(255,94,0,0.06) 0%, transparent 100%);
    border-radius: 0 10px 10px 0;
}

/* Custom Alpha Bullet Points */
.alpha-points {
    list-style: none;
    margin: 40px 0;
}

.alpha-points li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.alpha-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    background: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-orange);
}

.alpha-points strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Citations */
.citation a {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    margin-left: 2px;
    padding: 2px 4px;
    background: rgba(255, 94, 0, 0.1);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.citation a:hover {
    background: rgba(255, 94, 0, 0.3);
}

/* Scroll Animation Classes (Fade Up) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }

/* Bottom CTA */
#bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.90);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 94, 0, 0.2);
    padding: 25px 5%;
    z-index: 1000;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-cta-hidden {
    transform: translateY(100%);
}

.bottom-cta-visible {
    transform: translateY(0);
}

.cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-text h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.cta-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--text-main);
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 50px; /* Pill shape */
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 94, 0, 0.3);
}

.btn-primary:hover {
    background: #e65500;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 94, 0, 0.5);
}

/* Invisible Trigger for Intersection Observer */
#cta-trigger {
    height: 1px;
    width: 100%;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .blog-container {
        grid-template-columns: 1fr;
        padding-top: 40px;
    }
    
    .toc-wrapper {
        display: none; /* Hide TOC on mobile for seamless reading */
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}