        /* --- CSS VARIABLES & RESET --- */
        :root {
            /* Color Palette */
            --bg-body: #f9fafb;
            --bg-surface: #ffffff;
            --text-main: #1f2937;
            --text-muted: #6b7280;
            --primary: #4f46e5; /* Indigo accent */
            --primary-hover: #4338ca;
            --border-color: #e5e7eb;
            --code-bg: #f3f4f6;
            --newsletter-bg: #eef2ff;
            
            /* Typography */
            --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
            --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            
            /* Layout */
            --max-width: 1200px;
            --content-width: 760px;
            --sidebar-width: 280px;
            --gap-lg: 3rem;
            --gap-md: 2rem;
            --radius-md: 8px;
            --radius-lg: 12px;
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-system);
            background-color: var(--bg-body);
            color: var(--text-main);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        a {
            color: var(--primary);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        a:hover {
            color: var(--primary-hover);
            text-decoration: underline;
        }

        img {
            max-width: 100%;
            height: auto;
            display: block;
        }

        /* --- GLOBAL NAVIGATION --- */
        .site-header {
            background-color: var(--bg-surface);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
            padding: 1rem 0;
        }

        .nav-container {
            max-width: var(--max-width);
            margin: 0 auto;
            padding: 0 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-main);
            text-decoration: none;
        }

        .nav-links {
            display: flex;
            gap: 1.5rem;
            list-style: none;
        }

        .nav-links a {
            color: var(--text-muted);
            font-weight: 500;
            text-decoration: none;
        }

        .nav-links a:hover {
            color: var(--text-main);
        }

        /* --- MAIN ARTICLE LAYOUT --- */
        .main-container {
            max-width: var(--max-width);
            margin: 3rem auto;
            padding: 0 1.5rem;
            display: grid;
            grid-template-columns: 1fr; /* Default mobile single column */
            gap: var(--gap-lg);
        }

        @media (min-width: 1024px) {
            .main-container {
                /* Left space, Content, Right Sidebar */
                grid-template-columns: minmax(0, 1fr) var(--content-width) var(--sidebar-width);
            }
        }

        /* --- ARTICLE HEADER (Title, Author, Meta) --- */
        .article-header {
            margin-bottom: 2.5rem;
            text-align: center;
        }

        .category-tag {
            display: inline-block;
            background-color: var(--primary);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            font-size: 0.875rem;
            font-weight: 600;
            margin-bottom: 1rem;
            text-decoration: none;
        }

        .article-title {
            font-size: clamp(2rem, 5vw, 3rem);
            line-height: 1.2;
            font-weight: 800;
            margin-bottom: 1.5rem;
            letter-spacing: -0.02em;
        }

        .article-meta-info {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            color: var(--text-muted);
            font-size: 0.95rem;
        }

        .author-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--border-color);
            object-fit: cover;
        }

        .meta-divider {
            color: var(--border-color);
        }

        /* --- ARTICLE CONTENT TYPOGRAPHY & ELEMENTS --- */
        .article-content {
            background-color: var(--bg-surface);
            padding: 2rem;
            border-radius: var(--radius-lg);
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            font-size: 1.125rem;
            line-height: 1.7;
        }

        @media (min-width: 768px) {
            .article-content {
                padding: 3rem;
            }
        }

        .article-content > * + * {
            margin-top: 1.5em; /* Consistent vertical rhythm */
        }

        .article-content h2, 
        .article-content h3, 
        .article-content h4 {
            color: var(--text-main);
            font-weight: 700;
            margin-top: 2em;
            margin-bottom: 0.75em;
            line-height: 1.3;
        }

        .article-content h2 { font-size: 1.875rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
        .article-content h3 { font-size: 1.5rem; }
        .article-content h4 { font-size: 1.25rem; }

        .article-content p {
            color: #374151;
        }

        /* Responsive Images */
        .article-content figure {
            margin: 2.5rem 0;
        }

        .article-content figure img {
            border-radius: var(--radius-md);
            width: 100%;
            border: 1px solid var(--border-color);
        }

        .article-content figcaption {
            text-align: center;
            font-size: 0.875rem;
            color: var(--text-muted);
            margin-top: 0.75rem;
            font-style: italic;
        }

        /* Responsive Table */
        .table-responsive {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin: 2rem 0;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-color);
        }

        .article-content table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.95rem;
            white-space: nowrap; /* Prevent harsh wrapping in small cells */
        }

        .article-content th,
        .article-content td {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
        }

        .article-content th {
            background-color: var(--bg-body);
            font-weight: 600;
            color: var(--text-main);
        }

        .article-content tr:last-child td {
            border-bottom: none;
        }
        
        .article-content tbody tr:hover {
            background-color: #f8fafc;
        }

        /* Blockquote */
        .article-content blockquote {
            border-left: 4px solid var(--primary);
            background-color: var(--code-bg);
            padding: 1.5rem 2rem;
            margin: 2rem 0;
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
            font-style: italic;
            color: #4b5563;
        }

        .article-content blockquote p {
            margin-top: 0;
        }

        /* Code Blocks */
        .article-content pre {
            background-color: #1e293b;
            color: #e2e8f0;
            padding: 1.5rem;
            border-radius: var(--radius-md);
            overflow-x: auto;
            font-family: var(--font-mono);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .article-content code {
            font-family: var(--font-mono);
            background-color: var(--code-bg);
            padding: 0.2em 0.4em;
            border-radius: 4px;
            font-size: 0.875em;
            color: #be185d;
        }
        
        .article-content pre code {
            background-color: transparent;
            padding: 0;
            color: inherit;
        }

        /* Lists */
        .article-content ul, .article-content ol {
            padding-left: 1.5rem;
        }
        
        .article-content li {
            margin-bottom: 0.5rem;
        }

        /* --- SIDEBAR (Table of Contents) --- */
        .sidebar-wrapper {
            display: none; /* Hidden on mobile */
        }

        @media (min-width: 1024px) {
            .sidebar-wrapper {
                display: block;
            }
        }

        .sticky-sidebar {
            position: sticky;
            top: 5rem; /* Offset from header */
            background-color: var(--bg-surface);
            padding: 1.5rem;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-color);
            max-height: calc(100vh - 6rem);
            overflow-y: auto;
        }

        .sticky-sidebar h3 {
            font-size: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 1rem;
            font-weight: 700;
        }

        #toc-list {
            list-style: none;
            padding: 0;
            margin: 0;
            font-size: 0.9rem;
        }

        #toc-list li {
            margin-bottom: 0.75rem;
        }

        #toc-list a {
            color: var(--text-muted);
            text-decoration: none;
            display: block;
            line-height: 1.4;
            transition: color 0.2s, transform 0.2s;
        }

        #toc-list a:hover {
            color: var(--primary);
            transform: translateX(4px);
        }

        /* --- BOTTOM SECTIONS --- */
        
        /* Newsletter */
        .newsletter-section {
            background-color: var(--newsletter-bg);
            padding: 4rem 1.5rem;
            text-align: center;
            margin-top: 4rem;
        }

        .newsletter-inner {
            max-width: 600px;
            margin: 0 auto;
        }

        .newsletter-title {
            font-size: 1.75rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .newsletter-desc {
            color: var(--text-muted);
            margin-bottom: 2rem;
        }

        .subscribe-form {
            display: flex;
            gap: 0.5rem;
            flex-direction: column;
        }

        @media (min-width: 640px) {
            .subscribe-form {
                flex-direction: row;
            }
        }

        .subscribe-form input[type="email"] {
            flex: 1;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            font-family: inherit;
            font-size: 1rem;
            outline: none;
        }

        .subscribe-form input[type="email"]:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: var(--radius-md);
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
        }

        /* Related Articles */
        .related-section {
            max-width: var(--max-width);
            margin: 4rem auto;
            padding: 0 1.5rem;
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 2rem;
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 0.5rem;
            display: inline-block;
        }

        .related-list {
            list-style: none;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .related-item {
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-color);
        }

        .related-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .related-category {
            font-size: 0.75rem;
            text-transform: uppercase;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 0.25rem;
            display: block;
        }

        .related-title {
            font-size: 1.125rem;
            font-weight: 700;
            line-height: 1.4;
            margin-bottom: 0.25rem;
        }

        .related-title a {
            color: var(--text-main);
        }
        
        .related-title a:hover {
            color: var(--primary);
            text-decoration: none;
        }

        .related-meta {
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        /* Footer */
        .site-footer {
            background-color: white;
            border-top: 1px solid var(--border-color);
            padding: 2rem 0;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.875rem;
        }
        
        /* Utility */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

        .post-meta {
            margin-bottom: 20px;
            font-style: italic;
        }