        @import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&family=Bebas+Neue&display=swap');
        
        :root {
            --bg-primary: #ffffff;
            --bg-secondary: #f8f8f8;
            --text-primary: #000000;
            --text-secondary: #666666;
            --accent: #000000;
            --border: #e0e0e0;
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        [data-theme="dark"] {
            --bg-primary: #0a0a0a;
            --bg-secondary: #1a1a1a;
            --text-primary: #ffffff;
            --text-secondary: #999999;
            --accent: #ffffff;
            --border: #2a2a2a;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Merriweather', 'Georgia', serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            transition: var(--transition);
            font-size: 18px;
        }

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

        /* Header */
        header {
            padding: 30px 0;
            background-color: var(--bg-primary);
            border-bottom: 1px solid var(--border);
            position: relative;
            transition: var(--transition);
        }

        .header-content {
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .logo {
            height: 209px;
            width: auto;
            transition: opacity 0.3s ease;
        }

        .theme-switcher {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            width: 30px;
            height: 30px;
            cursor: pointer;
            overflow: hidden;
            padding: 0;
        }

        .theme-icon {
            width: 30px;
            height: 60px;
            transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateY(-30px); /* Show moon (bottom half) by default for light theme */
        }

        [data-theme="dark"] .theme-icon {
            transform: translateY(0); /* Show sun (top half) for dark theme */
        }


        /* SPA transitions */
        #main-content {
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Loading state */
        #main-content[data-loading="true"] {
            opacity: 0.5;
            pointer-events: none;
        }

        /* Prefetch on hover for better performance */
        a[data-link] {
            position: relative;
        }

        /* Progress indicator (optional) */
        .page-progress {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--accent);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.3s ease;
            z-index: 9999;
        }

        .page-progress.loading {
            transform: scaleX(0.8);
        }

        /* Navigation */
        nav {
            background-color: var(--bg-primary);
            padding: 20px 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid var(--border);
            transition: var(--transition);
        }

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

        .nav-links a {
            font-family: 'Merriweather', 'Georgia', serif;
            color: var(--text-primary);
            text-decoration: none;
            font-weight: 400;  /* Changed from 600 since Bebas Neue is already bold */
            font-size: 20px;  /* Increased slightly for Bebas Neue */
            letter-spacing: 2px;  /* Increased letter spacing */
            transition: var(--transition);
            position: relative;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--accent);
            transition: var(--transition);
        }

        .nav-links a:hover::after,
        .nav-links a.active::after {
            width: 100%;
        }


        main .container {
            transition: opacity 0.3s ease;
        }

        /* Loading state */
        .loading {
            opacity: 0.5;
            pointer-events: none;
        }

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

        /* Blog Posts */
        .blog-post {
            display: flex;
            gap: 30px;  /* Reduced from 40px */
            margin-bottom: 60px;  /* Reduced from 80px */
            align-items: flex-start;
        }

        .date-box {
            flex-shrink: 0;
            width: 60px;  /* Reduced from 80px */
            border: 2px solid var(--text-primary);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            font-weight: 700;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .date-month {
            font-size: 11px;  /* Reduced from 14px */
            letter-spacing: 1px;
            text-transform: uppercase;
            padding: 4px 0;
        }

        .date-divider {
            width: 20px;  /* Reduced from 30px */
            height: 1px;
            background-color: var(--text-primary);
            margin: 4px 0;  /* Reduced from 8px */
        }

        .date-day {
            font-size: 18px;  /* Reduced from 20px */
            padding: 2px 0;
        }

        /* Year section with inverted colors */
        .date-year {
            width: 100%;
            background-color: var(--text-primary);
            color: var(--bg-primary);
            font-size: 10px;
            text-align: center;
            padding: 3px 0;
            letter-spacing: 1px;
            margin-top: auto;
        }

        /* Hover effect for date-box */
        .blog-post:hover .date-box {
            box-shadow: 3px 3px 0 var(--text-primary);
        }

        .post-content {
            flex: 1;
        }

        .post-title {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 10px;
            line-height: 1.2;
            transition: var(--transition);
        }

        .post-subtitle {
            font-size: 20px;
            color: var(--text-secondary);
            margin-bottom: 20px;
            font-style: italic;
        }

        .post-excerpt {
            font-size: 18px;
            line-height: 1.8;
            margin-bottom: 20px;
        }

        .post-excerpt p {
            margin-bottom: 10px;
        }

        .post-excerpt p:last-child {
            margin-bottom: 0;
        }

        /* Style for inline code in excerpts */
        .post-excerpt code {
            background: var(--bg-secondary);
            padding: 2px 6px;
            border: 1px solid var(--border);
            font-family: 'Courier New', monospace;
            font-size: 0.9em;
        }

        /* Style for math blocks in excerpts */
        .post-excerpt .math-block {
            margin: 15px 0;
            padding: 15px;
            background-color: var(--bg-secondary);
            border-left: 4px solid var(--accent);
            overflow-x: auto;
        }

        .read-more {
            display: inline-block;
            color: var(--text-primary);
            text-decoration: none;
            font-weight: 600;
            border-bottom: 2px solid var(--text-primary);
            transition: var(--transition);
            padding-bottom: 2px;
        }

        .read-more:hover {
            padding-bottom: 5px;
        }

        /* Article Page */
        .article {
            max-width: 800px;
            margin: 0 auto;
        }

        .article-header {
            margin-bottom: 40px;
        }

        .article-content {
            font-size: 20px;
            line-height: 1.8;
        }

        /* Article content spacing */
        .article-content p {
            margin-bottom: 1.2em;
            line-height: 1.8;
        }

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

        /* For author/attribution lines */
        .article-content p strong,
        .article-content p em {
            display: inline-block;
        }

        /* Consecutive formatted paragraphs (like author info) */
        .article-content p + p {
            margin-top: 0.6em;
        }

        /* Headers in articles */
        .article-content h1,
        .article-content h2,
        .article-content h3 {
            margin-top: 1.5em;
            margin-bottom: 0.8em;
        }

        .article-content h1:first-child,
        .article-content h2:first-child,
        .article-content h3:first-child {
            margin-top: 0;
        }

        /* Code blocks */
        .article-content pre {
            margin: 1.5em 0;
            padding: 1em;
            background: var(--bg-secondary);
            border-left: 4px solid var(--accent);
            overflow-x: auto;
        }

        /* Lists */
        .article-content ul,
        .article-content ol {
            margin: 1.2em 0;
            padding-left: 2em;
        }

        .article-content li {
            margin-bottom: 0.5em;
        }

        /* Blockquotes */
        .article-content blockquote {
            margin: 1.5em 0;
            padding-left: 1.5em;
            border-left: 4px solid var(--accent);
            font-style: italic;
            color: var(--text-secondary);
        }

        /* Tables in article content */
        .article-content table,
        .post-excerpt table {
            width: 100%;
            margin: 1.5em 0;
            border-collapse: collapse;
            border: 2px solid var(--text-primary);
            background: var(--bg-primary);
            font-size: 0.95em;
        }

        .article-content th,
        .article-content td,
        .post-excerpt th,
        .post-excerpt td {
            padding: 12px 15px;
            text-align: left;
            border: 1px solid var(--border);
        }

        .article-content th,
        .post-excerpt th {
            background: var(--bg-secondary);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.9em;
            letter-spacing: 0.5px;
            border: 1px solid var(--text-primary);
        }

        .article-content tbody tr:hover,
        .post-excerpt tbody tr:hover {
            background: var(--bg-secondary);
            transition: var(--transition);
        }

        /* Responsive tables */
        @media (max-width: 768px) {
            .article-content table,
            .post-excerpt table {
                font-size: 0.85em;
                display: block;
                overflow-x: auto;
                white-space: nowrap;
            }
            
            .article-content th,
            .article-content td,
            .post-excerpt th,
            .post-excerpt td {
                padding: 8px 10px;
            }
        }

        /* Center align number columns (optional - for your specific use case) */
        .article-content td:has(> .katex),
        .post-excerpt td:has(> .katex) {
            text-align: center;
        }

        /* If a table cell contains only numbers or math, center it */
        .article-content td,
        .post-excerpt td {
            text-align: center;
        }

        .article-content td:first-child,
        .article-content th:first-child,
        .post-excerpt td:first-child,
        .post-excerpt th:first-child {
            text-align: left;
        }

        /* Math Display */
        .math-block {
            margin: 30px 0;
            padding: 20px;
            background-color: var(--bg-secondary);
            border-left: 4px solid var(--accent);
            overflow-x: auto;
        }

        /* Math display styles */
        .math-display {
            margin: 1.5em 0;
            overflow-x: auto;
            text-align: center;
        }

        /* Ensure proper spacing for KaTeX rendered math */
        .katex-display {
            margin: 1em 0 !important;
        }

        /* Inline math */
        .katex {
            font-size: 1.1em;
        }

        /* Prevent math from breaking layout */
        .article-content .math-display,
        .article-content .katex-display {
            overflow-x: auto;
            overflow-y: hidden;
            max-width: 100%;
        }

        /* Fix spacing in article content */
        .article-content p + .math-display,
        .article-content .math-display + p {
            margin-top: 1em;
        }

        /* Footer */
        footer {
            padding: 40px 0;
            border-top: 1px solid var(--border);
            text-align: center;
            color: var(--text-secondary);
            font-size: 14px;
        }



        /* Responsive */
        @media (max-width: 768px) {
            .nav-links {
                gap: 30px;
            }
            
            .blog-post {
                gap: 20px;
                margin-bottom: 50px;
            }
            
            .date-box {
                width: 55px;  /* Slightly smaller on tablets */
            }
            
            .date-month {
                font-size: 10px;
            }
            
            .date-day {
                font-size: 16px;
            }
            
            .date-year {
                font-size: 9px;
                padding: 2px 0;
            }
            
            .post-title {
                font-size: 28px;
            }
            
            .post-subtitle {
                font-size: 18px;
            }
            
            .article-content {
                font-size: 18px;
            }
        }

        /* Stack layout for mobile */
        @media (max-width: 640px) {
            .blog-post {
                flex-direction: row;  /* Keep side-by-side even on mobile */
                gap: 15px;
            }
            
            .date-box {
                width: 50px;  /* Even smaller on mobile */
            }
            
            .date-month {
                font-size: 9px;
                letter-spacing: 0.5px;
            }
            
            .date-divider {
                width: 15px;
            }
            
            .date-day {
                font-size: 14px;
            }
            
            .date-year {
                font-size: 8px;
            }
        }

        @media (max-width: 480px) {
            .nav-links {
                gap: 20px;
                font-size: 14px;
            }

            .blog-post {
                gap: 12px;
                margin-bottom: 40px;
            }
            
            .date-box {
                width: 45px;
                border-width: 1.5px;  /* Thinner border on very small screens */
            }
            
            .post-title {
                font-size: 24px;  /* Smaller title to compensate */
            }
            
            .post-subtitle {
                font-size: 16px;
            }
            
            .post-excerpt {
                font-size: 16px;
            }
            
            .theme-switcher {
                width: 35px;
                height: 35px;
            }
        }

        /* Smooth transitions */
        * {
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
            }