/* ═══════════════════════════════════════════════════════════
   FISCALIA BLOG STYLES
   Long-form content optimized for readability
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   BLOG-SPECIFIC CUSTOM PROPERTIES
   All blog tokens scoped to page wrapper (not global :root)
   ═══════════════════════════════════════════════════════════ */

/* Page-scoped variables (not polluting global :root) */
.blog-page,
.blog-container {
    /* Blog gradients (moved from core/variables.css) */
    --blog-gradient-hero: linear-gradient(135deg, var(--teal-pale) 0%, var(--bg-card) 50%, rgba(74, 128, 124, 0.05) 100%);
    --blog-gradient-card: linear-gradient(180deg, var(--bg-card) 0%, rgba(74, 128, 124, 0.02) 100%);
    --blog-gradient-accent: linear-gradient(90deg, var(--teal-mid) 0%, var(--teal-deep) 100%);

    /* Enhanced shadows for blog cards */
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-featured: 0 12px 40px rgba(74, 128, 124, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);

    /* Animation timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography refinements */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-wide: 0.05em;

    /* Decorative accents */
    --accent-bar-width: 4px;
    --accent-bar-gradient: linear-gradient(180deg, var(--teal-mid) 0%, var(--teal-soft) 100%);
}

[data-theme="dark"] .blog-page,
[data-theme="dark"] .blog-container {
    --blog-gradient-hero: linear-gradient(135deg, rgba(74, 128, 124, 0.15) 0%, var(--bg-card) 50%, rgba(74, 128, 124, 0.08) 100%);
    --blog-gradient-card: linear-gradient(180deg, var(--bg-card) 0%, rgba(74, 128, 124, 0.05) 100%);
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-featured: 0 12px 40px rgba(74, 128, 124, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   BLOG-SPECIFIC ANIMATION
   NOTE: fadeInUp, fadeIn, slideInLeft, shimmer in animations.css
   Only scaleIn is blog-specific
   ═══════════════════════════════════════════════════════════ */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */

/* Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════
   HEADER - Refined Sticky Navigation
   ═══════════════════════════════════════════════════════════ */
.blog-header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

[data-theme="dark"] .blog-header {
    background: rgba(26, 26, 26, 0.85);
}

.blog-header.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.blog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-logo {
    font-family: var(--font-logo);
    font-size: 2rem;
    font-weight: 700;
    color: var(--logo-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.2s var(--ease);
}

.blog-logo:hover {
    opacity: 0.8;
    text-decoration: none;
}

.blog-nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s var(--ease);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--teal-mid);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--teal-mid);
    text-decoration: none;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.theme-toggle {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    padding: 0.625rem;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--teal-mid);
    border-color: var(--teal-soft);
    background: var(--bg-card);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon, :root:not([data-theme]) .moon-icon { display: none; }

/* Main Content */
.blog-main {
    min-height: 60vh;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION - Blog List Page
   ═══════════════════════════════════════════════════════════ */
.blog-hero {
    background: var(--blog-gradient-hero);
    padding: var(--space-3xl) 0 var(--space-2xl);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(74, 128, 124, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.blog-header-section {
    text-align: center;
    margin-bottom: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
}

.blog-header-section h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: var(--letter-spacing-tight);
    line-height: 1.1;
}

.blog-header-section h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--blog-gradient-accent);
    margin: var(--space-md) auto 0;
    border-radius: var(--radius-full);
}

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

/* ═══════════════════════════════════════════════════════════
   FEATURED ARTICLE - Hero Card
   ═══════════════════════════════════════════════════════════ */
.featured-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    box-shadow: var(--shadow-featured);
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.7s var(--ease-out-expo) 0.1s forwards;
    opacity: 0;
}

.featured-article::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--accent-bar-width);
    background: var(--accent-bar-gradient);
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--teal-soft);
}

.featured-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--teal-pale);
    color: var(--teal-text);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    margin-bottom: var(--space-md);
}

.featured-article-badge svg {
    width: 14px;
    height: 14px;
}

.featured-article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.featured-article-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.25;
    letter-spacing: var(--letter-spacing-tight);
}

.featured-article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.featured-article-title a:hover {
    color: var(--teal-mid);
}

.featured-article-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    font-size: 1.0625rem;
}

.featured-article-visual {
    background: var(--blog-gradient-hero);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.featured-article-visual::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, var(--teal-pale) 0%, transparent 40%),
                radial-gradient(circle at 70% 70%, rgba(74, 128, 124, 0.1) 0%, transparent 40%);
    animation: shimmer 8s ease-in-out infinite alternate;
}

.featured-article-visual-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    color: var(--teal-mid);
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY FILTER - Refined Chips
   ═══════════════════════════════════════════════════════════ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: var(--space-xl);
    justify-content: center;
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.2s forwards;
    opacity: 0;
}

.category-chip {
    padding: 0.5rem 1.125rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.25s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.category-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--teal-mid);
    opacity: 0;
    transition: opacity 0.25s var(--ease);
    z-index: -1;
}

.category-chip:hover {
    border-color: var(--teal-mid);
    color: var(--teal-mid);
    transform: translateY(-1px);
    text-decoration: none;
}

.category-chip.active {
    background: var(--teal-mid);
    color: white;
    border-color: var(--teal-mid);
    box-shadow: 0 2px 8px rgba(74, 128, 124, 0.25);
}

.category-chip.active:hover {
    background: var(--teal-deep);
    border-color: var(--teal-deep);
    color: white;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLES GRID - Refined Cards
   ═══════════════════════════════════════════════════════════ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.article-card {
    background: var(--blog-gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all 0.35s var(--ease-out-expo);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
    opacity: 0;
}

/* Staggered animation delays */
.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.15s; }
.article-card:nth-child(3) { animation-delay: 0.2s; }
.article-card:nth-child(4) { animation-delay: 0.25s; }
.article-card:nth-child(5) { animation-delay: 0.3s; }
.article-card:nth-child(6) { animation-delay: 0.35s; }
.article-card:nth-child(n+7) { animation-delay: 0.4s; }

/* Left accent bar appears on hover */
.article-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--accent-bar-width);
    background: var(--accent-bar-gradient);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--teal-soft);
}

.article-card:hover::before {
    opacity: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reading-time::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 50%;
    margin-right: 0;
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: 1.35;
    letter-spacing: var(--letter-spacing-tight);
    flex-grow: 0;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.article-title a:hover {
    color: var(--teal-mid);
}

.article-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.65;
    font-size: 0.9375rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--space-md);
}

.category-tag {
    padding: 0.25rem 0.625rem;
    background: var(--teal-pale);
    color: var(--teal-text);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    transition: all 0.2s var(--ease);
}

.article-card:hover .category-tag {
    background: rgba(74, 128, 124, 0.15);
}

.article-read-more {
    color: var(--teal-mid);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap 0.25s var(--ease-out-expo);
    margin-top: auto;
}

.article-read-more::after {
    content: '\2192';
    transition: transform 0.25s var(--ease-out-expo);
}

.article-read-more:hover {
    text-decoration: none;
    gap: 0.625rem;
}

.article-read-more:hover::after {
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION - Refined Controls
   ═══════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    animation: fadeIn 0.5s var(--ease) 0.3s forwards;
    opacity: 0;
}

.page-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    transition: all 0.25s var(--ease-out-expo);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-link:hover {
    background: var(--teal-mid);
    color: white;
    border-color: var(--teal-mid);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 128, 124, 0.2);
    text-decoration: none;
}

.page-info {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 var(--space-md);
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE LAYOUT - Two Column with Refined Sidebar
   ═══════════════════════════════════════════════════════════ */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 280px;
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

.article-content {
    min-width: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
}

/* Article Header */
.article-header {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--blog-gradient-accent);
    border-radius: var(--radius-full);
}

.article-header .article-categories {
    margin-bottom: var(--space-md);
}

.article-header .category-tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
}

.article-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--space-lg) 0;
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
}

.article-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

.meta-separator {
    color: var(--border-hover);
    user-select: none;
}

.article-meta-bar time {
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE BODY - Premium Typography for Readability
   ═══════════════════════════════════════════════════════════ */
.article-body {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.article-body > *:first-child {
    margin-top: 0;
}

/* Lead paragraph - larger for visual hierarchy */
.article-body > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin: var(--space-2xl) 0 var(--space-md) 0;
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
    line-height: 1.3;
    position: relative;
    padding-left: var(--space-md);
}

.article-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    background: var(--teal-mid);
    border-radius: var(--radius-full);
}

.article-body h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: var(--space-xl) 0 var(--space-sm) 0;
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
    line-height: 1.35;
}

.article-body h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: var(--space-lg) 0 var(--space-sm) 0;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: var(--space-md);
}

.article-body a {
    color: var(--teal-mid);
    font-weight: 500;
    transition: color 0.2s var(--ease);
}

.article-body a:hover {
    color: var(--teal-deep);
    text-decoration-color: var(--teal-mid);
}

.article-body strong {
    font-weight: 600;
    color: var(--text-primary);
}

.article-body ul,
.article-body ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.article-body li {
    margin-bottom: 0.75rem;
    line-height: 1.65;
}

.article-body li::marker {
    color: var(--teal-mid);
}

/* Enhanced blockquotes */
.article-body blockquote {
    border-left: 4px solid var(--teal-mid);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    background: var(--teal-pale);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
}

[data-theme="dark"] .article-body blockquote {
    background: rgba(74, 128, 124, 0.08);
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Enhanced tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.article-body th {
    background: var(--teal-pale);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: var(--teal-text);
    border: none;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

[data-theme="dark"] .article-body th {
    background: rgba(74, 128, 124, 0.15);
    color: var(--teal-mid);
}

.article-body td {
    padding: 0.875rem 1.25rem;
    border: none;
    border-bottom: 1px solid var(--border);
}

.article-body tr:last-child td {
    border-bottom: none;
}

.article-body tr:nth-child(even) {
    background: var(--bg-elevated);
}

/* Enhanced code blocks */
.article-body code {
    background: var(--bg-elevated);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--teal-text);
    border: 1px solid var(--border);
}

[data-theme="dark"] .article-body code {
    color: var(--teal-mid);
}

.article-body pre {
    background: var(--bg-elevated);
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: var(--space-lg) 0;
    border: 1px solid var(--border);
}

.article-body pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

/* Article footer */
.article-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.back-to-blog {
    color: var(--teal-mid);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.25s var(--ease-out-expo);
}

.back-to-blog:hover {
    gap: 0.75rem;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR - Refined Widgets
   ═══════════════════════════════════════════════════════════ */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    animation: slideInLeft 0.6s var(--ease-out-expo) 0.2s forwards;
    opacity: 0;
}

.toc-widget,
.sidebar-newsletter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s var(--ease);
}

.toc-widget:hover,
.sidebar-newsletter:hover {
    box-shadow: var(--shadow-card-hover);
}

.toc-widget h3,
.sidebar-newsletter h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

/* Table of Contents */
.toc-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-widget li {
    margin-bottom: 0;
}

.toc-widget a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.5;
    display: block;
    padding: 0.5rem 0;
    padding-left: var(--space-sm);
    border-left: 2px solid transparent;
    transition: all 0.2s var(--ease);
}

.toc-widget a:hover {
    color: var(--teal-mid);
    border-left-color: var(--teal-mid);
    background: var(--teal-pale);
    text-decoration: none;
}

.toc-widget a.active {
    color: var(--teal-mid);
    border-left-color: var(--teal-mid);
    font-weight: 500;
}

/* Nested TOC items */
.toc-widget ul ul a {
    padding-left: var(--space-lg);
    font-size: 0.8125rem;
}

/* Sidebar Newsletter */
.sidebar-newsletter {
    background: var(--blog-gradient-card);
}

.sidebar-newsletter p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.sidebar-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-newsletter-form input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.sidebar-newsletter-form input:focus {
    outline: none;
    border-color: var(--teal-mid);
    box-shadow: 0 0 0 3px rgba(74, 128, 124, 0.1);
}

.sidebar-newsletter-form button {
    padding: 0.875rem 1rem;
    background: var(--teal-mid);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-out-expo);
}

.sidebar-newsletter-form button:hover {
    background: var(--teal-deep);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 128, 124, 0.25);
}

/* ═══════════════════════════════════════════════════════════
   RELATED ARTICLES - Enhanced Section
   ═══════════════════════════════════════════════════════════ */
.related-articles {
    background: var(--bg-elevated);
    padding: var(--space-3xl) 0;
    margin-top: var(--space-3xl);
    position: relative;
}

.related-articles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.related-articles h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    text-align: center;
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
}

.related-articles h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--blog-gradient-accent);
    margin: var(--space-sm) auto 0;
    border-radius: var(--radius-full);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all 0.35s var(--ease-out-expo);
    box-shadow: var(--shadow-card);
    position: relative;
}

.related-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-bar-gradient);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--teal-soft);
}

.related-card:hover::before {
    opacity: 1;
}

.related-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
    letter-spacing: var(--letter-spacing-tight);
}

.related-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.related-card h3 a:hover {
    color: var(--teal-mid);
}

.related-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-link {
    color: var(--teal-mid);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap 0.25s var(--ease-out-expo);
}

.read-more-link:hover {
    gap: 0.625rem;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER - Refined Newsletter & Links
   ═══════════════════════════════════════════════════════════ */
.blog-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl) 0;
    margin-top: var(--space-3xl);
    position: relative;
}

.footer-newsletter {
    text-align: center;
    max-width: 560px;
    margin: 0 auto var(--space-2xl) auto;
    padding: var(--space-xl);
    background: var(--blog-gradient-hero);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.footer-newsletter h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
}

.footer-newsletter p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 420px;
    margin: 0 auto var(--space-sm) auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--teal-mid);
    box-shadow: 0 0 0 3px rgba(74, 128, 124, 0.1);
}

.newsletter-form button {
    padding: 1rem 1.75rem;
    background: var(--teal-mid);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-out-expo);
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 128, 124, 0.3);
}

.newsletter-message {
    margin-top: var(--space-sm);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    text-align: center;
}

.newsletter-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.newsletter-message.error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
}

/* Footer Links */
.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-xl);
    max-width: 600px;
    margin: 0 auto var(--space-xl) auto;
    text-align: center;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    transition: color 0.2s var(--ease);
}

.footer-col a:hover {
    color: var(--teal-mid);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ═══════════════════════════════════════════════════════════
   BREADCRUMB NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.breadcrumb {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.breadcrumb-item a:hover {
    color: var(--teal-mid);
    text-decoration: none;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    opacity: 0.5;
    stroke-width: 2;
}

.breadcrumb-current {
    color: var(--text-tertiary);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE CTA BOXES
   ═══════════════════════════════════════════════════════════ */
.article-cta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    margin: var(--space-2xl) 0;
    background: var(--teal-pale);
    border-left: 4px solid var(--teal-mid);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.article-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 128, 124, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

[data-theme="dark"] .article-cta {
    background: rgba(74, 128, 124, 0.08);
}

.article-cta:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-card);
}

.article-cta .cta-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    color: var(--teal-mid);
    position: relative;
    z-index: 1;
}

.article-cta .cta-icon svg {
    stroke-width: 2;
}

.article-cta .cta-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.article-cta .cta-content strong {
    display: block;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.article-cta .cta-content p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.article-cta .cta-button {
    flex-shrink: 0;
    padding: 0.875rem 1.5rem;
    background: var(--teal-mid);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease-out-expo);
    position: relative;
    z-index: 1;
}

.article-cta .cta-button:hover {
    background: var(--teal-deep);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 128, 124, 0.3);
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   FAQ ACCORDION SECTION
   ═══════════════════════════════════════════════════════════ */
.faq-section {
    margin: var(--space-3xl) 0;
    padding: var(--space-2xl);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.faq-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
    text-align: center;
    position: relative;
    padding-bottom: var(--space-md);
}

.faq-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--blog-gradient-accent);
    border-radius: var(--radius-full);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease);
}

.faq-item:hover {
    border-color: var(--teal-soft);
}

.faq-item[open] {
    border-color: var(--teal-mid);
    box-shadow: 0 2px 8px rgba(74, 128, 124, 0.12);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--text-primary);
    list-style: none;
    user-select: none;
    transition: color 0.2s var(--ease);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--teal-mid);
}

.faq-item[open] .faq-question {
    color: var(--teal-mid);
    border-bottom: 1px solid var(--border);
}

.faq-chevron {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: transform 0.3s var(--ease-out-expo), color 0.2s var(--ease);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--teal-mid);
}

.faq-answer {
    padding: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    animation: fadeInUp 0.3s var(--ease) forwards;
}

.faq-answer p {
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════ */

/* Content visibility for below-fold elements */
.related-articles,
.blog-footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

.article-body table {
    content-visibility: auto;
    contain-intrinsic-size: 0 200px;
}

.faq-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        padding: var(--space-lg);
    }

    .article-sidebar {
        display: none;
    }

    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-article-visual {
        order: -1;
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    /* Breadcrumb responsive */
    .breadcrumb-current {
        max-width: 150px;
    }

    /* CTA boxes stack vertically on mobile */
    .article-cta {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .article-cta .cta-button {
        width: 100%;
    }

    /* FAQ section responsive */
    .faq-section {
        padding: var(--space-lg);
    }

    .faq-title {
        font-size: 1.375rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: var(--space-md);
    }

    .faq-answer {
        padding: var(--space-md);
    }

    .blog-hero {
        padding: var(--space-xl) 0 var(--space-lg);
    }

    .blog-header-section h1 {
        font-size: 2rem;
    }

    .blog-subtitle {
        font-size: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .article-card {
        padding: var(--space-md);
    }

    .article-title {
        font-size: 1.25rem;
    }

    .featured-article {
        padding: var(--space-md);
    }

    .featured-article-title {
        font-size: 1.375rem;
    }

    .featured-article-description {
        font-size: 1rem;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.375rem;
        padding-left: var(--space-sm);
    }

    .article-body h3 {
        font-size: 1.125rem;
    }

    .article-body > p:first-of-type {
        font-size: 1.0625rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-newsletter {
        padding: var(--space-lg);
    }

    .footer-newsletter h3 {
        font-size: 1.375rem;
    }

    .blog-nav-links .nav-link:not(:last-child) {
        display: none;
    }

    .blog-container {
        padding: 0 var(--space-md);
    }

    .category-filter {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-filter::-webkit-scrollbar {
        display: none;
    }

    .category-chip {
        flex-shrink: 0;
    }

    .pagination {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .page-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-header-section h1 {
        font-size: 1.75rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-body h2 {
        font-size: 1.25rem;
    }
}
