/* ============================================
   CORE VARIABLES & SETTINGS
   ============================================ */
   .article-container {
    /* Core Palette - intensified for contrast */
    --primary: #AED2FE;
    --secondary: #8BB9F7;
    --frost: #B8E6FF;
    --frost-glow: rgba(184, 230, 255, 0.6);
    --frost-dim: rgba(184, 230, 255, 0.05);
    
    /* Status Colors */
    --error: #FF5555;
    --warning: #FFCB6B;
    --success: #50FA7B;
    
    /* Backgrounds */
    --bg-deep: #050505;
    --bg-panel: #0F0F0F;
    --bg-glass: rgba(20, 20, 20, 0.7);
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    
    /* Borders */
    --border-glass: rgba(174, 210, 254, 0.15);
    --border-glow: rgba(174, 210, 254, 0.4);

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-deep);
    /* Subtle Cyber Grid Background */
    background-image: 
        linear-gradient(rgba(174, 210, 254, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(174, 210, 254, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.01em;
}

.article-container *:not(script):not(style) {
    box-sizing: border-box;
}

/* ============================================
   LAYOUT & NAVIGATION
   ============================================ */

.article-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Back Button - Tech Pill Style */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    margin-bottom: 2.5rem;
}

.btn-back:hover {
    background: var(--frost-dim);
    border-color: var(--frost);
    color: var(--frost);
    box-shadow: 0 0 15px rgba(184, 230, 255, 0.15);
    transform: translateX(-4px);
}

/* ============================================
   ARTICLE HEADER - The Hero Section
   ============================================ */

.article-header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 3.5rem;
    margin-bottom: 4rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Subtle light leak effect in header */
.article-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(174, 210, 254, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.article-header > * {
    position: relative;
    z-index: 1;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace; /* Tech font */
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(174, 210, 254, 0.1);
    border: 1px solid rgba(174, 210, 254, 0.3);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(174, 210, 254, 0.1);
    margin-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    background: linear-gradient(180deg, #FFFFFF 0%, #AED2FE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(174, 210, 254, 0.15);
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 800px;
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.article-meta i, .article-meta svg {
    color: var(--primary);
}

/* ============================================
   ARTICLE CONTENT - Typography & Elements
   ============================================ */

.article-content {
    max-width: 900px; /* Constrain reading width for better UX */
    margin: 0 auto;
}

/* Headings */
.article-content h2 {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-glass);
    font-weight: 700;
    display: flex;
    align-items: center;
}

/* Tech accent before H2 */
.article-content h2::before {
    content: '//';
    color: var(--primary);
    margin-right: 0.75rem;
    font-family: monospace;
    opacity: 0.7;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #FFFFFF;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h4 {
    font-size: 1.1rem;
    color: var(--frost);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #CCCCCC;
    font-size: 1.05rem;
    leading-trim: both;
    text-edge: cap;
}

.article-content strong {
    color: #FFFFFF;
    font-weight: 700;
}

/* Links - Animated Underline */
.article-content a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: color 0.2s ease;
}

.article-content a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.article-content a:hover {
    color: #FFFFFF;
    text-shadow: 0 0 8px var(--primary);
}

.article-content a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Info Boxes - Glass Cards */
.info-box {
    background: rgba(20, 25, 35, 0.6);
    border: 1px solid rgba(174, 210, 254, 0.2);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.info-box strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Info Box Variants */
.info-box.warning {
    background: rgba(35, 25, 10, 0.6);
    border-color: rgba(255, 184, 108, 0.2);
    border-left-color: var(--warning);
}
.info-box.warning strong { color: var(--warning); }

.info-box.danger {
    background: rgba(35, 10, 10, 0.6);
    border-color: rgba(255, 85, 85, 0.2);
    border-left-color: var(--error);
}
.info-box.danger strong { color: var(--error); }

.info-box.success {
    background: rgba(10, 35, 15, 0.6);
    border-color: rgba(80, 250, 123, 0.2);
    border-left-color: var(--success);
}
.info-box.success strong { color: var(--success); }

/* Lists - Custom Bullets */
.article-content ul, .article-content ol {
    margin: 1.5rem 0;
    padding-left: 1rem;
}

.article-content ul li {
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.article-content ul li::before {
    content: "›";
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
    text-shadow: 0 0 10px var(--primary);
}

/* Code Blocks - Terminal Style */
.article-content code {
    background: #151515;
    color: var(--frost);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.article-content pre {
    background: #0E0E0E;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    margin: 2rem 0;
}

.article-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #d4d4d4;
}

/* ============================================
   RELATED ARTICLES - Interactive Grid
   ============================================ */

.related-articles {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-glass);
    position: relative;
}

/* Section Title */
.related-articles h2 {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
}

.related-articles h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary);
    margin: 1rem auto 0;
    box-shadow: 0 0 10px var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Hover Effects for Card */
.related-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--frost);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.related-card h3 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.related-card:hover h3 {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(174, 210, 254, 0.3);
}

.related-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* Decorative corner accent on card */
.related-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent var(--border-glass) transparent transparent;
    transition: border-color 0.3s ease;
}

.related-card:hover::after {
    border-color: transparent var(--primary) transparent transparent;
}

/* ============================================
   SCROLLBARS & SELECTION
   ============================================ */

.article-container ::-webkit-scrollbar {
    width: 8px;
}

.article-container ::-webkit-scrollbar-track {
    background: #050505;
}

.article-container ::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
    border: 2px solid #050505;
}

.article-container ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

::selection {
    background: rgba(174, 210, 254, 0.3);
    color: #FFF;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .article-header {
        padding: 2rem;
    }

    .article-header h1 {
        font-size: 2.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .info-box {
        padding: 1.25rem;
    }
}