
        /* ===== COLOR AND FORMATTING PARAMETERS ===== */
        :root { 
            --primary-blue: #1e3a8a;
            --pale-cornflower: #b3c6f2;
            --accent-blue: #3b82f6;
            --white: #ffffff;
            --black: #000000;
            --glass-white: rgba(255, 255, 255, 0.15);
            --pt-sans-font: 'PT Sans', sans-serif;
            --compact-padding: 20px;
            --glass-gradient: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
            --shadow-primary: 0 20px 40px rgba(30, 58, 138, 0.15);
            --shadow-hover: 0 30px 60px rgba(30, 58, 138, 0.25);
        }

        /* ===== BACKGROUND ZOOM ANIMATION ===== */
        :root {
            --zoom-duration: 155s;
            --zoom-max: 200%;
            --blur-amount: 3px;
        }

        .background-layer {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-repeat: no-repeat;
            background-position: center center;
            background-image: url('/back.jpg');
            animation: animateBackgroundZoom infinite ease-in-out var(--zoom-duration);
            filter: blur(var(--blur-amount));
            z-index: -1;
            margin: 0;
            padding: 0;
        }

        @keyframes animateBackgroundZoom {
            0% { background-size: 100% auto; }
            50% { background-size: var(--zoom-max) auto; }
            100% { background-size: 100% auto; }
        }

        /* ===== GLOBAL STYLES ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--pt-sans-font);
            background: var(--pale-cornflower);
            background-image: 
                radial-gradient(circle at 20% 80%, rgba(30, 58, 138, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
                linear-gradient(180deg, var(--pale-cornflower) 0%, #a5b8f0 100%);
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
            margin: 0;
            padding: 0;
        }

        .content-wrapper {
            position: relative;
            z-index: 1;
            min-height: 100vh;
        }

        /* ===== HEADER SECTION ===== */
        .header-section {
            padding: var(--compact-padding);
            text-align: left;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
        }

        .logo {
            width: 30%;
            height: auto;
            margin-bottom: 15px;
            display: block;
            margin-left: 0;
            margin-right: auto;
        }

        .branding-text {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--white);
            -webkit-text-stroke: 1px var(--black);
            text-stroke: 1px var(--black);
            margin-bottom: 20px;
            text-align: left;
        }

        /* ===== NAVIGATION MENU ===== */
        .navigation {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            padding: 15px 0;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .nav-menu {
            display: flex;
            justify-content: center;
            gap: 20px;
            list-style: none;
        }

        .nav-item {
            font-family: var(--pt-sans-font);
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--white);
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 8px;
            transition: all 0.3s ease;
            background: rgba(59, 130, 246, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.2);
            cursor: pointer;
            user-select: none;
        }

        .nav-item:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
        }

        .nav-item.active {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.4);
        }

        /* ===== MAIN CONTENT AREA ===== */
        .main-content {
            padding: var(--compact-padding);
            position: relative;
        }

        /* ===== BLOG GRID ===== */
        .posts-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            gap: 30px;
            margin-top: 40px;
            align-items: stretch;
        }

        .post-card {
            flex: 1;
            min-width: 280px;
            max-width: 400px;
            background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.25), 
                rgba(255, 255, 255, 0.1));
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 0;
            transition: all 0.4s ease;
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 15px 30px rgba(30, 58, 138, 0.1);
            position: relative;
            overflow: hidden;
            cursor: pointer;
        }

        .post-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 50px rgba(30, 58, 138, 0.2);
            backdrop-filter: blur(25px);
        }

        .post-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
            display: block;
        }

        .post-content {
            padding: 30px;
        }

        .post-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            font-size: 0.9rem;
            color: rgba(30, 58, 138, 0.6);
        }

        .author {
            font-weight: 600;
        }

        .date {
            color: rgba(30, 58, 138, 0.5);
        }

        .category-tag {
            position: absolute;
            top: 15px;
            right: 15px;
            background: var(--accent-blue);
            color: white;
            padding: 0.4rem 0.9rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            z-index: 2;
        }

        .post-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-blue);
            margin-bottom: 15px;
            line-height: 1.3;
        }

        .post-excerpt {
            color: rgba(30, 58, 138, 0.8);
            margin-bottom: 20px;
            line-height: 1.5;
            font-size: 1rem;
        }

        .read-more {
            color: var(--accent-blue);
            text-decoration: none;
            font-weight: 700;
            font-size: 0.95rem;
            transition: color 0.2s ease;
        }

        .read-more:hover {
            color: var(--primary-blue);
        }

        /* Per-card permalink */
        .post-permalink {
            display: block;
            margin-top: 16px;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.3);
            font-size: 0.72rem;
            color: rgba(30, 58, 138, 0.55);
            text-decoration: none;
            word-break: break-all;
            transition: color 0.2s ease;
        }

        .post-permalink:hover {
            color: var(--accent-blue);
        }

        /* Word count + reading time, under the title on each card */
        .post-stats {
            font-size: 0.8rem;
            color: rgba(30, 58, 138, 0.6);
            margin-top: -8px;
            margin-bottom: 15px;
        }

        /* Same line, under the big title in the full post */
        .read-time {
            font-size: 0.85rem;
            font-weight: 400;
            color: rgba(30, 58, 138, 0.6);
            margin-top: -12px;
            margin-bottom: 20px;
        }

        /* ===== FULL POST VIEW ===== */
        .full-post {
            display: none;
            background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.25), 
                rgba(255, 255, 255, 0.1));
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 15px 30px rgba(30, 58, 138, 0.1);
            max-width: 900px;
            margin: 40px auto;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .full-post.active {
            display: block;
        }

        .back-button {
            background: var(--accent-blue);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            margin-bottom: 30px;
            font-size: 1rem;
            font-weight: 700;
            font-family: var(--pt-sans-font);
            transition: all 0.3s ease;
        }

        .back-button:hover {
            background: var(--primary-blue);
            transform: translateY(-2px);
        }

        .full-post h1 {
            font-size: 2.2rem;
            margin-bottom: 20px;
            color: var(--primary-blue);
            text-align: left;
        }

        .full-post .post-meta {
            border-bottom: 2px solid rgba(255, 255, 255, 0.3);
            padding-bottom: 20px;
            margin-bottom: 30px;
        }

        .full-post-content {
            font-size: 1.1rem;
            line-height: 1.8;
            color: rgba(30, 58, 138, 0.9);
        }

        .full-post-content .figure-caption {
            font-size: 0.85rem;
            font-style: italic;
            color: rgba(30, 58, 138, 0.65);
            text-align: center;
            margin-top: -10px;
            margin-bottom: 25px;
        }

        .full-post-content img {
            max-width: 100%;
            height: auto;
            border-radius: 15px;
            margin: 2rem 0;
            box-shadow: 0 8px 20px rgba(30, 58, 138, 0.15);
        }

        .full-post-content p {
            margin-bottom: 1.5rem;
        }

        .full-post-content h2 {
            margin: 2.5rem 0 1rem 0;
            color: var(--primary-blue);
            font-size: 1.8rem;
        }

        .full-post-content h3 {
            margin: 2rem 0 0.75rem 0;
            color: var(--primary-blue);
            font-size: 1.4rem;
        }

        .full-post-content code {
            background: rgba(59, 130, 246, 0.1);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.95em;
            color: var(--primary-blue);
        }

        .full-post-content strong {
            color: var(--primary-blue);
        }

        /* ===== FOOTER ===== */
        .footer {
            margin-top: 60px;
            padding: 30px var(--compact-padding);
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .footer-divider {
            border: none;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            margin-bottom: 20px;
        }

        .footer-link {
            color: rgba(30, 58, 138, 0.75);
            text-decoration: underline;
            text-underline-offset: 3px;
            transition: color 0.3s ease;
        }

        .footer-link:hover {
            color: var(--accent-blue);
        }

        .footer-text {
            text-align: center;
            font-size: 0.85rem;
            color: rgba(30, 58, 138, 0.6);
            line-height: 1.4;
        }

        /* ===== RESPONSIVE DESIGN ===== */
        @media (max-width: 400px) {
            .logo {
                width: 90%;
            }

            .branding-text {
                font-size: 1.5rem;
            }

            .nav-menu {
                flex-direction: column;
                gap: 18px;
                align-items: center;
            }

            .posts-grid {
                justify-content: center;
            }

            .post-card {
                flex: none;
                width: 90%;
                min-width: 250px;
                max-width: none;
            }

            .main-content {
                padding: 15px;
            }

            .full-post {
                padding: 20px;
            }
        }

        @media (max-width: 480px) {
            .nav-item {
                font-size: 1rem;
                padding: 8px 15px;
            }

            .post-card {
                padding: 0;
            }

            .post-content {
                padding: 20px;
            }
        }
    
        /* Restores the half-transparency lost when the 50%-alpha PNG became a
           JPEG. See BACKGROUND_OPACITY for the measurement. */
        .background-layer {
            opacity: 0.5;
        }

        /* --- added by build_blog.py: static cards are links, not JS onclick --- */
        .post-card .card-link {
            display: block;
            text-decoration: none;
            color: inherit;
        }

        .post-note {
            font-size: 0.9rem;
            font-style: italic;
            color: rgba(30, 58, 138, 0.7);
            border-left: 3px solid rgba(59, 130, 246, 0.4);
            padding-left: 14px;
            margin-bottom: 25px;
        }

        /* The full post is always visible on its own page. */
        .full-post {
            display: block;
        }

        a.back-button {
            display: inline-block;
            text-decoration: none;
        }

        /* --- extended post markup: links, lists, quotes, rules, lead --- */
        .full-post-content a {
            color: var(--accent-blue);
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .full-post-content a:hover {
            color: var(--primary-blue);
        }

        .full-post-content h4 {
            margin: 1.75rem 0 0.5rem 0;
            color: var(--primary-blue);
            font-size: 1.15rem;
        }

        .full-post-content p.lead {
            font-size: 1.35rem;
            line-height: 1.6;
            font-weight: 400;
            color: var(--primary-blue);
            margin-bottom: 2rem;
        }

        .full-post-content ul,
        .full-post-content ol {
            margin: 0 0 1.5rem 1.5rem;
            padding-left: 1rem;
        }

        .full-post-content li {
            margin-bottom: 0.5rem;
            line-height: 1.7;
        }

        .full-post-content blockquote {
            margin: 1.75rem 0;
            padding: 0.5rem 0 0.5rem 1.25rem;
            border-left: 4px solid rgba(59, 130, 246, 0.5);
            font-style: italic;
            color: rgba(30, 58, 138, 0.8);
        }

        .full-post-content hr {
            border: none;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.35), transparent);
            margin: 2.5rem auto;
            width: 60%;
        }

        .full-post-content del {
            opacity: 0.65;
        }
