/* ==========================================================
   Cross Valid8 Blog — Enhanced Design v2.0
   Refined Technical Editorial Aesthetic
   Fonts: Syne (display) · Source Serif 4 (body) · JetBrains Mono (code)
   ========================================================== */

/* ── Font Loading ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ── CSS Variables (synced with main site style.css) ──────── */
:root {
    /* Primary Colors */
    --color-primary: #ff6b35;
    --color-primary-hover: #ff5722;
    --color-secondary: #4ecdc4;
    --color-primary-transparent: rgba(255, 107, 53, 0.15);

    /* Text Colors */
    --color-text: #ffffff;
    --color-text-secondary: #a8b2d1;

    /* UI Colors */
    --color-background: #0a192f;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-footer: #112240;

    /* Gradients */
    --blog-gradient-1: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --blog-gradient-2: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);

    /* Shadows & Effects */
    --blog-shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.15);
    --blog-shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.25);
    --blog-shadow-hard: 0 12px 60px rgba(0, 0, 0, 0.4);
    --blog-glow-primary: 0 0 40px rgba(255, 107, 53, 0.15);
    --blog-glow-secondary: 0 0 40px rgba(78, 205, 196, 0.15);
}

/* ── Base Styles ───────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ── Header (synced with main site style.css) ─────────────── */
.header-background {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

header {
    padding: 25px 0;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent) 1;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
}

nav ul.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 20px;
}

.nav-item a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    color: var(--color-primary);
    background: linear-gradient(90deg, var(--color-primary-transparent), transparent);
    border-left-color: var(--color-primary);
}

.nav-item a.nav-blog-active {
    color: var(--color-primary);
    background: linear-gradient(90deg, var(--color-primary-transparent), transparent);
    border-left-color: var(--color-primary);
}

.hamburger {
    display: none;
    position: relative;
    top: 0;
    transform: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger:hover {
    background-color: var(--color-primary-transparent);
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background: var(--color-text);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--color-text);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    opacity: 0.9;
}

@media screen and (max-width: 1200px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    nav ul.nav-links {
        position: absolute;
        left: -100%;
        top: 100px;
        gap: 0;
        flex-direction: column;
        background-color: var(--color-background);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        border-top: 4px solid rgba(255, 255, 255, 0.08);
        border-bottom: 4px solid rgba(255, 255, 255, 0.08);
        display: flex;
        z-index: 999;
    }

    .nav-item {
        margin: 16px 0;
    }

    nav ul.nav-links.active {
        left: 0;
    }

    .social-icons {
        display: none;
    }
}

/* ── Footer (synced with main site style.css) ─────────────── */
footer {
    margin-top: 0px;
    background-color: var(--color-footer);
    padding: 60px 0 20px;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 5px;
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 3px 8px;
    border-radius: 5px;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-transparent);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ── Reading Progress Bar ─────────────────────────────────── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    z-index: 9999;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6), 0 0 40px rgba(255, 107, 53, 0.3);
    transition: width 0.08s linear;
    pointer-events: none;
}

/* ── Blog Main Override ────────────────────────────────────── */
.blog-main {
    padding-top: 100px;
    padding-bottom: 0;
}

main.blog-main {
    padding: 0;
    padding-top: 100px;
}

/* ── Enhanced Blog Hero Section (matches main site) ────────── */
.blog-hero-section {
    background:
        linear-gradient(135deg,
            rgba(10, 25, 47, 0.88) 0%,
            rgba(17, 34, 64, 0.92) 50%,
            rgba(10, 25, 47, 0.88) 100%
        ),
        url('/images/background_opt.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
}

/* Animated gradient overlay (matches main site) */
.blog-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(78, 205, 196, 0.06) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    opacity: 0.7;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 20% 50%, 80% 50%;
    }
    50% {
        background-position: 80% 50%, 20% 50%;
    }
}

.blog-hero-section .hero {
    width: 100%;
    min-height: 280px;
    padding: 60px 0 50px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.blog-hero-section .hero-container {
    text-align: center;
}

.blog-hero-section h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--color-text);
    letter-spacing: -1.2px;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.blog-hero-section h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 24px auto 0;
    border-radius: 2px;
    box-shadow: var(--blog-glow-primary);
}

.blog-hero-section p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 auto;
    max-width: 560px;
    line-height: 1.6;
    font-weight: 400;
}

/* ── Enhanced Blog Listing ─────────────────────────────────── */
.blog-listing {
    padding: 80px 0 120px;
    position: relative;
}

.blog-listing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.blog-listing .container {
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Enhanced Post Card with Depth ──────────────────────────── */
.post-card {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 48px 20px 48px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 -20px;
    border-radius: 12px;
    background: transparent;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered entrance animation */
.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Glassmorphic hover effect */
.post-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.03) 0%, rgba(78, 205, 196, 0.03) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.post-card:hover::after {
    opacity: 1;
}

/* Accent line with glow */
.post-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: var(--blog-glow-primary);
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-bottom-color: rgba(255, 107, 53, 0.2);
    box-shadow: var(--blog-shadow-medium);
}

.post-card:hover::before {
    opacity: 1;
    left: -20px;
}

/* Enhanced post number with gradient */
.post-card__number {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.15;
    line-height: 1;
    min-width: 80px;
    padding-top: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    flex-shrink: 0;
    letter-spacing: -2px;
}

.post-card:hover .post-card__number {
    opacity: 0.4;
}

/* Featured image */
.post-card__image {
    flex-shrink: 0;
    width: 240px;
    height: 160px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--blog-shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.post-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(78, 205, 196, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.post-card:hover .post-card__image::after {
    opacity: 1;
}

.post-card__image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

.post-card:hover .post-card__image {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: var(--blog-shadow-medium), var(--blog-glow-primary);
}

.post-card__body {
    flex: 1;
    min-width: 0;
}

/* Enhanced meta with better spacing */
.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.post-card__meta i {
    color: var(--color-primary);
    margin-right: 6px;
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Enhanced title with better typography */
.post-card__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 18px;
    margin-top: 0;
    line-height: 1.25;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.post-card__title::after {
    display: none;
}

.post-card__title a {
    color: var(--color-text);
    text-decoration: none;
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: 0 100%;
    padding-bottom: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline;
}

.post-card__title a:hover {
    color: var(--color-primary);
    background-size: 100% 2px;
}

/* Enhanced excerpt */
.post-card__excerpt {
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    margin-bottom: 22px;
    font-size: 1rem;
    max-width: 680px;
    font-weight: 400;
}

/* Enhanced tags with modern design */
.post-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.tag {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    padding: 6px 14px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08) 0%, rgba(78, 205, 196, 0.05) 100%);
    color: var(--color-secondary);
    border: 1px solid rgba(78, 205, 196, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.tag:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: var(--color-secondary);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.3);
}

/* Enhanced read more link */
.post-card__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'JetBrains Mono', monospace;
}

.post-card__link:hover {
    color: #ff8c55;
}

.post-card__link i {
    font-size: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-card__link i {
    color: #ff8c55;
}

/* Empty state */
.no-posts {
    text-align: center;
    padding: 120px 0;
    color: var(--color-text-secondary);
}

/* ── Article / Single Post ─────────────────────────────────── */
.article-wrapper {
    padding-bottom: 0;
}

/* Enhanced article hero */
.article-hero {
    padding: 64px 0 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.04) 0%, transparent 100%);
    position: relative;
}

.article-hero .container {
    max-width: 840px;
}

.article-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 240px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent);
    box-shadow: var(--blog-glow-primary);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.3px;
}

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

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb__sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.65rem;
}

.breadcrumb__current {
    color: var(--color-primary);
    opacity: 0.95;
}

/* Article tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

/* Enhanced article title */
.article-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 36px;
    margin-top: 0;
    color: var(--color-text);
    letter-spacing: -1.5px;
}

/* Article meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.article-meta__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.article-meta__item i {
    color: var(--color-primary);
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Article hero image */
.article-hero-image {
    margin-top: 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--blog-shadow-hard);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
    object-position: center;
}

/* ── Enhanced Article Content ──────────────────────────────── */
.article-content-wrapper {
    padding: 72px 0 120px;
}

.article-content {
    max-width: 760px;
    margin: 0 auto;
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 1.12rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.88);
}

/* Enhanced headings */
.article-content h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 2rem;
    color: var(--color-primary);
    margin-top: 3.2rem;
    margin-bottom: 1.2rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.5px;
    padding-bottom: 14px;
    position: relative;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent);
    border-radius: 2px;
    box-shadow: var(--blog-glow-primary);
}

.article-content h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 1.4rem;
    color: var(--color-text);
    margin-top: 2.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.article-content h3::after {
    display: none;
}

.article-content h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.article-content h4::after {
    display: none;
}

/* Paragraphs */
.article-content p {
    margin-bottom: 1.7rem;
}

/* Enhanced links */
.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(255, 107, 53, 0.3);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: all 0.3s ease;
}

.article-content a:hover {
    text-decoration-color: var(--color-primary);
    color: #ff8c55;
    text-decoration-thickness: 2px;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 0 0 1.7rem 1.8rem;
    padding: 0;
}

.article-content li {
    margin-bottom: 0.6rem;
    line-height: 1.75;
}

.article-content ul li::marker {
    color: var(--color-primary);
}

.article-content ol li::marker {
    color: var(--color-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

/* Enhanced blockquote */
.article-content blockquote {
    margin: 2.4rem 0;
    padding: 26px 30px 26px 34px;
    border-left: 4px solid var(--color-primary);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.06) 0%, rgba(255, 107, 53, 0.03) 100%);
    border-radius: 0 12px 12px 0;
    box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.12), var(--blog-shadow-soft);
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

.article-content blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08em;
    line-height: 1.7;
}

/* Inline code */
.article-content :not(pre) > code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px 8px;
    border-radius: 5px;
    color: var(--color-secondary);
    white-space: nowrap;
    font-weight: 500;
}

/* Enhanced code blocks */
.article-content .highlight {
    margin: 2.4rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--blog-shadow-medium);
    position: relative;
}

/* macOS-style title bar with glow */
.article-content .highlight::before {
    content: '● ● ●';
    display: block;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    font-size: 10px;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
}

.article-content .highlight pre {
    margin: 0;
    padding: 24px 26px;
    overflow-x: auto;
    background: #1a1f2e !important;
}

.article-content .highlight code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.88rem;
    line-height: 1.7;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: inherit;
    white-space: pre;
}

/* Raw pre/code */
.article-content pre:not(.highlight > pre) {
    margin: 2.4rem 0;
    padding: 24px 26px;
    border-radius: 12px;
    background: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    box-shadow: var(--blog-shadow-medium);
}

.article-content pre:not(.highlight > pre) code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.88rem;
    line-height: 1.7;
    background: transparent;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* Enhanced images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--blog-shadow-hard);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.article-content img:hover {
    box-shadow: var(--blog-shadow-hard), var(--blog-glow-primary);
}

/* Horizontal rule */
.article-content hr {
    border: none;
    margin: 4rem 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
    opacity: 0.3;
}

/* Strong + em */
.article-content strong {
    color: var(--color-text);
    font-weight: 700;
}

.article-content em {
    color: rgba(255, 255, 255, 0.78);
}

/* Enhanced tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.4rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.92rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--blog-shadow-soft);
}

.article-content th {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.12) 0%, rgba(255, 107, 53, 0.08) 100%);
    color: var(--color-primary);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 107, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.article-content td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    vertical-align: top;
}

.article-content tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

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

/* ── Article Footer ────────────────────────────────────────── */
.article-footer {
    max-width: 760px;
    margin: 72px auto 0;
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    text-decoration: none;
}

.article-back-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    color: var(--color-primary);
}

.article-back-btn i {
    transition: transform 0.3s ease;
}

.article-back-btn:hover i {
    color: var(--color-primary);
}

/* ── Nav: Blogg Active State ───────────────────────────────── */
.nav-blog-active {
    color: var(--color-primary) !important;
    background: linear-gradient(90deg, var(--color-primary-transparent), transparent) !important;
    border-left-color: var(--color-primary) !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media screen and (max-width: 1200px) {
    .post-card {
        margin: 0;
        padding-left: 20px;
        padding-right: 20px;
    }

    .post-card:hover::before {
        left: 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo, .footer-links, .footer-social {
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 768px) {
    .blog-hero-section {
        min-height: 240px;
    }

    .blog-hero-section .hero {
        min-height: 240px;
        padding: 50px 0 40px;
    }

    .blog-hero-section h1 {
        font-size: 2.4rem;
        letter-spacing: -0.8px;
    }

    .blog-hero-section p {
        font-size: 1.05rem;
    }

    .post-card {
        flex-direction: column;
        gap: 12px;
        padding: 36px 16px 36px 16px;
    }

    .post-card__number {
        font-size: 2.4rem;
        padding-top: 0;
        min-width: auto;
    }

    .post-card__title {
        font-size: 1.6rem;
        letter-spacing: -0.3px;
    }

    .post-card__meta {
        gap: 16px;
    }

    .post-card__image {
        width: 100%;
        height: 200px;
    }

    .article-hero {
        padding: 48px 0 40px;
    }

    .article-title {
        font-size: 2.4rem;
        letter-spacing: -0.8px;
    }

    .article-meta {
        gap: 20px;
    }

    .article-content {
        font-size: 1.08rem;
    }

    .article-content h2 {
        font-size: 1.7rem;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }

    .article-content-wrapper {
        padding: 52px 0 80px;
    }

    .blog-listing {
        padding: 50px 0 80px;
    }
}

@media screen and (max-width: 480px) {
    .blog-hero-section h1 {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }

    .blog-hero-section p {
        font-size: 1rem;
    }

    .article-title {
        font-size: 1.9rem;
        letter-spacing: -0.5px;
    }

    .post-card__meta {
        flex-direction: column;
        gap: 8px;
    }

    .post-card__title {
        font-size: 1.4rem;
    }

    .article-content {
        font-size: 1.05rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .logo {
        max-height: 50px;
    }
}
