 :root {
            /* ===== DARK THEME (default): charcoal grey + white ===== */
            color-scheme: dark;
            --primary-gradient: linear-gradient(135deg, #FFFFFF 0%, #D0D0D0 50%, #9A9A9A 100%);
            --secondary-gradient: linear-gradient(135deg, #F2F2F2 0%, #BDBDBD 50%, #8A8A8A 100%);
            --accent-gradient: linear-gradient(135deg, #FFFFFF 0%, #CFCFCF 50%, #A8A8A8 100%);
            --button-gradient: linear-gradient(90deg, #FFFFFF 0%, #CFCFCF 100%);
            --on-accent: #1A1A1A;
            --text-primary: #FFFFFF;
            --text-secondary: #D2D2D2;
            --bg-dark: #161616;
            --bg-panel: #212121;
            --bg-input: #2C2C2C;
            --bg-expertise: linear-gradient(135deg, #161616 0%, #222222 100%);
            --accent-color: #E8E8E8;
            --accent-hover: #FFFFFF;
            --accent-border: rgba(255, 255, 255, 0.22);
            --border-subtle: rgba(255, 255, 255, 0.08);
            --nav-bg: rgba(22, 22, 22, 0.8);
            --overlay-bg: rgba(22, 22, 22, 0.96);
            --dropdown-bg: rgba(33, 33, 33, 0.98);
            --glow-1: rgba(255, 255, 255, 0.06);
            --glow-2: rgba(255, 255, 255, 0.04);
            --shadow-card: none;
            --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.45);
            --shadow-form: 0 10px 30px rgba(0, 0, 0, 0.4);
            --button-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
            --button-shadow-hover: 0 8px 25px rgba(255, 255, 255, 0.22);
            --focus-ring: 0 0 10px rgba(255, 255, 255, 0.18);
        }

        /* ===== LIGHT THEME: inverted (white + charcoal grey) ===== */
        :root[data-theme="light"] {
            color-scheme: light;
            --primary-gradient: linear-gradient(135deg, #121212 0%, #3A3A3A 50%, #6E6E6E 100%);
            --secondary-gradient: linear-gradient(135deg, #1A1A1A 0%, #444444 50%, #777777 100%);
            --accent-gradient: linear-gradient(135deg, #121212 0%, #3A3A3A 50%, #5E5E5E 100%);
            --button-gradient: linear-gradient(90deg, #1A1A1A 0%, #4A4A4A 100%);
            --on-accent: #FFFFFF;
            --text-primary: #161616;
            --text-secondary: #4A4A4A;
            --bg-dark: #FAFAFA;
            --bg-panel: #FFFFFF;
            --bg-input: #F1F1F1;
            --bg-expertise: linear-gradient(135deg, #FAFAFA 0%, #ECECEC 100%);
            --accent-color: #2B2B2B;
            --accent-hover: #000000;
            --accent-border: rgba(0, 0, 0, 0.25);
            --border-subtle: rgba(0, 0, 0, 0.09);
            --nav-bg: rgba(250, 250, 250, 0.85);
            --overlay-bg: rgba(250, 250, 250, 0.97);
            --dropdown-bg: rgba(255, 255, 255, 0.98);
            --glow-1: rgba(0, 0, 0, 0.05);
            --glow-2: rgba(0, 0, 0, 0.04);
            --shadow-card: 0 2px 14px rgba(0, 0, 0, 0.06);
            --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.14);
            --shadow-form: 0 10px 30px rgba(0, 0, 0, 0.10);
            --button-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
            --button-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.32);
            --focus-ring: 0 0 10px rgba(0, 0, 0, 0.18);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        body {
            background-color: var(--bg-dark);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            width: 100%;
            padding: 20px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--nav-bg);
            backdrop-filter: blur(10px);
            z-index: 102;
            border-bottom: 1px solid var(--border-subtle);
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: -0.5px;
        }

        /* Hamburger Menu Styles */
        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
            z-index: 101;
        }

        .hamburger div {
            width: 25px;
            height: 3px;
            background-color: var(--text-secondary);
            margin: 4px 0;
            transition: all 0.3s ease;
            border-radius: 2px;
        }


        /* Nav actions + Theme Toggle */
        .nav-actions {
            display: flex;
            align-items: center;
            gap: 18px;
        }

        .theme-toggle {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            border: 1px solid var(--accent-border);
            background: transparent;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
        }

        .theme-toggle:hover {
            transform: rotate(15deg) scale(1.05);
            border-color: var(--accent-hover);
            background: var(--border-subtle);
        }

        .theme-toggle:focus-visible {
            outline: 2px solid var(--accent-color);
            outline-offset: 3px;
        }

        .theme-toggle svg {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* Dark mode shows the sun (switch to light); light mode shows the moon */
        .theme-toggle .icon-moon { display: none; }
        :root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
        :root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

        /* Navigation Links */
        .nav-links {
            display: flex;
            gap: 30px;
            align-items: center;
        }

        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .nav-links a:hover {
            color: var(--accent-color);
        }

        /* Mobile Menu Overlay */
        .mobile-menu-overlay {
            position: fixed;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: var(--overlay-bg);
            backdrop-filter: blur(20px);
            z-index: 100;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: left 0.4s ease;
        }

        .mobile-menu-overlay.active {
            left: 0;
        }

        .mobile-menu-links {
            flex-direction: column;
            gap: 30px;
            text-align: center;
        }

        .mobile-menu-links a {
            font-size: 2rem;
            color: var(--text-primary);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s ease;
            padding: 15px;
        }

        .mobile-menu-links a:hover {
            color: var(--accent-color);
        }

        /* Hamburger Animation */
        .hamburger.active div:nth-child(1) {
            transform: rotate(-45deg) translate(-5px, 6px);
        }

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

        .hamburger.active div:nth-child(3) {
            transform: rotate(45deg) translate(-5px, -6px);
        }

        /* Hero Section - Centered */
        .hero {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 80px 40px;
            position: relative;
            overflow: hidden;
            text-align: center;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -150px;
            left: -20%;
            right: -20%;
            width: 140%;
            height: 100%;
            background: radial-gradient(circle, var(--glow-1) 0%, transparent 60%);
        }

        .hero::after {
            content: '';
            position: absolute;
            bottom: -150px;
            left: -20%;
            right: -20%;
            width: 140%;
            height: 100%;
            background: radial-gradient(circle, var(--glow-2) 0%, transparent 60%);
        }

        .hero-content {
            max-width: 800px;
            z-index: 2;
            position: relative;
            width: 100%;
        }

        .hero h1 {
            font-size: 4rem;
            line-height: 1.1;
            margin-bottom: 30px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero p {
            font-size: 1.25rem;
            color: var(--text-secondary);
            margin-bottom: 40px;
        }

        .cta-button {
            display: inline-block;
            padding: 16px 36px;
            background: var(--button-gradient);
            color: var(--on-accent);
            border-radius: 50px;
            font-weight: 600;
            text-decoration: none;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: var(--button-shadow);
        }

        .cta-button:hover {
            transform: translateY(-5px);
            box-shadow: var(--button-shadow-hover);
        }

        /* Services Section */
        .services {
            padding: 100px 40px;
            max-width: 1400px;
            margin: 0 auto;
        }

        .section-title {
            text-align: center;
            margin-bottom: 60px;
            font-size: 2.5rem;
            background: var(--secondary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 40px;
        }

        .service-card {
            background: var(--bg-panel);
            padding: 40px;
            border-radius: 20px;
            transition: transform 0.4s ease, box-shadow 0.3s ease;
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-card);
        }

        .service-card:hover {
            transform: translateY(-15px);
            box-shadow: var(--shadow-hover);
            border-color: var(--accent-border);
        }

        .service-icon {
            width: 60px;
            height: 60px;
            margin-bottom: 30px;
            background: var(--primary-gradient);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .service-icon svg {
            width: 32px;
            height: 32px;
            fill: var(--on-accent);
        }

        .service-card h3 {
            margin-bottom: 20px;
            font-size: 1.5rem;
        }

        .service-card p {
            color: var(--text-secondary);
            opacity: 0.8;
        }

        /* Technical Expertise */
        .expertise {
            padding: 80px 40px;
            background: var(--bg-expertise);
        }

        .expertise-container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .expertise-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 60px;
        }

        .tech-item {
            background: var(--bg-panel);
            padding: 40px;
            border-radius: 20px;
            position: relative;
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-card);
        }

        .tech-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: var(--primary-gradient);
            border-radius: 20px 20px 0 0;
        }

        .tech-item h4 {
            font-size: 1.5rem;
            margin-bottom: 20px;
            color: var(--text-primary);
        }

        .tech-list {
            list-style-type: none;
        }

        .tech-list li {
            padding: 10px 0;
            border-bottom: 1px solid var(--border-subtle);
            position: relative;
            padding-left: 30px;
        }

        .tech-list li::before {
            content: '•';
            color: var(--accent-color);
            position: absolute;
            left: 0;
        }

        /* Contact Section */
        .contact {
            padding: 100px 40px;
            max-width: 800px;
            margin: 0 auto;
        }

        .form-container {
            background: var(--bg-panel);
            padding: 60px;
            border-radius: 25px;
            box-shadow: var(--shadow-form);
        }

        .contact-form h4 {
            margin-bottom: 30px;
            font-size: 1.8rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .form-group {
            margin-bottom: 25px;
        }

        .form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .form-control {
            width: 100%;
            padding: 16px;
            background: var(--bg-input);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 1rem;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: var(--focus-ring);
        }

        textarea.form-control {
            min-height: 150px;
            resize: vertical;
        }

        .submit-button {
            width: 100%;
            padding: 18px;
            background: var(--button-gradient);
            color: var(--on-accent);
            border: none;
            border-radius: 8px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .submit-button:hover {
            transform: translateY(-5px);
            box-shadow: var(--button-shadow-hover);
        }

        /* Footer */
        footer {
            padding: 60px 40px;
            background: var(--bg-dark);
            border-top: 1px solid var(--border-subtle);
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 60px;
        }

        .footer-brand h3 {
            font-size: 2rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 20px;
        }

        .footer-brand p {
            color: var(--text-secondary);
            opacity: 0.7;
            max-width: 400px;
        }

        .footer-links h5 {
            font-size: 1.1rem;
            margin-bottom: 20px;
            color: var(--text-primary);
        }

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

        .footer-links li {
            padding: 8px 0;
        }

        .footer-links a {
            color: var(--text-secondary);
            text-decoration: none;
            opacity: 0.7;
            transition: color 0.3s ease;
        }

        .footer-links a:hover {
            color: var(--accent-color);
        }

        .copyright {
            margin-top: 60px;
            text-align: center;
            padding: 40px 20px;
            border-top: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            opacity: 0.7;
        }

        /* Responsive Design */
        @media (max-width: 992px) {
            .hero-content h1 { font-size: 3rem; }
            .footer-content { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
        }

        @media (max-width: 768px) {
            .hamburger { display: flex; z-index: 101; }
            .nav-links { 
                position: fixed;
                top: 70px;
                left: 0;
                width: 100%;
                background: var(--dropdown-bg);
                flex-direction: column;
                padding: 40px;
                gap: 30px;
                align-items: center;
                transform: translateY(-100%);
                transition: transform 0.4s ease;
            }
            
            .nav-links.active {
                transform: translateY(0);
            }
            
            .nav-links a {
                font-size: 1.5rem;
                padding: 20px 0;
            }

            .hero { padding: 60px 20px; height: auto; min-height: 100vh; }
            .hero-content h1 { font-size: 2.5rem; }
            .hero p { margin-bottom: 30px; }
            .cta-button { display: inline-block; }
            .services-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
        }

        @media (max-width: 576px) {
            .hero-content h1 { font-size: 2rem; }
            .service-card { padding: 30px; }
            .form-container { padding: 40px 30px; }
        }

        /* ===== Legal / Policy Pages ===== */
        html { scroll-behavior: smooth; }

        .policy {
            max-width: 900px;
            margin: 0 auto;
            padding: 140px 40px 80px;
        }

        .policy-header {
            text-align: center;
            margin-bottom: 50px;
        }

        .policy-header h1 {
            font-size: 3rem;
            line-height: 1.15;
            margin-bottom: 20px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .policy-header p {
            color: var(--text-secondary);
            opacity: 0.85;
        }

        .policy-card {
            background: var(--bg-panel);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            box-shadow: var(--shadow-card);
            padding: 50px;
            position: relative;
            margin-bottom: 30px;
        }

        .policy-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: var(--primary-gradient);
            border-radius: 20px 20px 0 0;
        }

        .policy-toc h2,
        .policy section h2 {
            font-size: 1.5rem;
            margin-bottom: 18px;
            color: var(--text-primary);
        }

        .policy-toc ol {
            columns: 2;
            column-gap: 40px;
            padding-left: 24px;
        }

        .policy-toc li { padding: 5px 0; break-inside: avoid; }

        .policy a { color: var(--accent-color); text-decoration: underline; text-underline-offset: 3px; transition: color 0.3s ease; }
        .policy a:hover { color: var(--accent-hover); }

        .policy section { scroll-margin-top: 100px; padding: 28px 0; border-top: 1px solid var(--border-subtle); }
        .policy section:first-of-type { border-top: none; padding-top: 0; }
        .policy section:last-of-type { padding-bottom: 0; }

        .policy h3 { font-size: 1.1rem; margin: 22px 0 10px; color: var(--text-primary); }

        .policy p,
        .policy li { color: var(--text-secondary); }

        .policy p { margin-bottom: 14px; }

        .policy ul { list-style-type: none; margin-bottom: 14px; }

        .policy ul li {
            padding: 8px 0 8px 30px;
            border-bottom: 1px solid var(--border-subtle);
            position: relative;
        }

        .policy ul li::before {
            content: '•';
            color: var(--accent-color);
            position: absolute;
            left: 0;
        }

        .policy ul li:last-child { border-bottom: none; }

        .policy-note {
            background: var(--bg-input);
            border-left: 4px solid var(--accent-color);
            border-radius: 8px;
            padding: 18px 22px;
            margin: 18px 0;
        }

        .policy-note p { margin: 0; }

        @media (max-width: 768px) {
            .policy { padding: 110px 20px 60px; }
            .policy-header h1 { font-size: 2.3rem; }
            .policy-card { padding: 35px 25px; }
            .policy-toc ol { columns: 1; }
        }


        /* ===== Blog + Code Block Theme Tokens ===== */
        :root {
            --code-bg: #121212;
            --code-header-bg: #1B1B1B;
            --code-border: rgba(255, 255, 255, 0.10);
            --code-text: #D6D6D6;
            --tok-keyword: #FFFFFF;
            --tok-function: #EDEDED;
            --tok-string: #A9A9A9;
            --tok-number: #CFCFCF;
            --tok-comment: #7E7E7E;
            --tok-operator: #9A9A9A;
            --tok-type: #DADADA;
            --inline-code-bg: rgba(255, 255, 255, 0.09);
        }

        :root[data-theme="light"] {
            --code-bg: #F4F4F4;
            --code-header-bg: #EAEAEA;
            --code-border: rgba(0, 0, 0, 0.12);
            --code-text: #2A2A2A;
            --tok-keyword: #000000;
            --tok-function: #1F1F1F;
            --tok-string: #5C5C5C;
            --tok-number: #3A3A3A;
            --tok-comment: #8A8A8A;
            --tok-operator: #6A6A6A;
            --tok-type: #2E2E2E;
            --inline-code-bg: rgba(0, 0, 0, 0.07);
        }

        /* Reading progress bar */
        .read-progress {
            position: fixed;
            top: 0;
            left: 0;
            height: 3px;
            width: 0;
            background: var(--primary-gradient);
            z-index: 103;
        }

        /* ===== Blog Layout ===== */
        .blog {
            max-width: 1200px;
            margin: 0 auto;
            padding: 140px 40px 80px;
        }

        .blog-header {
            max-width: 860px;
            margin: 0 auto 60px;
            text-align: center;
        }

        .breadcrumb {
            font-size: 0.9rem;
            color: var(--text-secondary);
            opacity: 0.85;
            margin-bottom: 20px;
        }

        .breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
        .breadcrumb a:hover { color: var(--accent-color); }
        .breadcrumb span { margin: 0 8px; opacity: 0.6; }

        .blog-header h1 {
            font-size: 3.2rem;
            line-height: 1.15;
            margin-bottom: 24px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .blog-lede {
            font-size: 1.25rem;
            color: var(--text-secondary);
            margin-bottom: 28px;
        }

        .post-meta {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px 24px;
            font-size: 0.95rem;
            color: var(--text-secondary);
            opacity: 0.85;
            margin-bottom: 22px;
        }

        .tag-list {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            list-style: none;
        }

        .tag {
            display: inline-block;
            padding: 6px 16px;
            border: 1px solid var(--accent-border);
            border-radius: 50px;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            text-decoration: none;
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }

        .tag:hover {
            background: var(--button-gradient);
            color: var(--on-accent);
            border-color: transparent;
        }

        .blog-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 300px;
            gap: 60px;
            align-items: start;
        }

        /* Article typography */
        .article { min-width: 0; }

        .article h2 {
            font-size: 2rem;
            margin: 50px 0 18px;
            color: var(--text-primary);
            scroll-margin-top: 100px;
        }

        .article h2:first-child { margin-top: 0; }

        .article h3 {
            font-size: 1.4rem;
            margin: 36px 0 14px;
            color: var(--text-primary);
            scroll-margin-top: 100px;
        }

        .article p,
        .article li {
            color: var(--text-secondary);
            font-size: 1.08rem;
            line-height: 1.8;
        }

        .article p { margin-bottom: 20px; }

        .article ul,
        .article ol { margin: 0 0 22px 26px; }

        .article li { padding: 4px 0; }
        .article li::marker { color: var(--accent-color); }

        .article a {
            color: var(--accent-color);
            text-decoration: underline;
            text-underline-offset: 3px;
            transition: color 0.3s ease;
        }

        .article a:hover { color: var(--accent-hover); }

        .article strong { color: var(--text-primary); }

        .article hr {
            border: none;
            border-top: 1px solid var(--border-subtle);
            margin: 45px 0;
        }

        .article blockquote {
            margin: 30px 0;
            padding: 22px 28px;
            background: var(--bg-panel);
            border: 1px solid var(--border-subtle);
            border-left: 4px solid var(--accent-color);
            border-radius: 12px;
        }

        .article blockquote p { margin: 0; font-style: italic; }

        .article figure { margin: 34px 0; }

        .article figure img {
            display: block;
            width: 100%;
            height: auto;
            border-radius: 14px;
            border: 1px solid var(--border-subtle);
        }

        .article figcaption {
            margin-top: 10px;
            text-align: center;
            font-size: 0.9rem;
            color: var(--text-secondary);
            opacity: 0.8;
        }

        /* Callout */
        .callout {
            margin: 30px 0;
            padding: 22px 26px;
            background: var(--bg-input);
            border-left: 4px solid var(--accent-color);
            border-radius: 10px;
        }

        .callout-title {
            display: block;
            font-weight: 700;
            margin-bottom: 6px;
            color: var(--text-primary);
        }

        .article .callout p { margin: 0; font-size: 1rem; }

        /* Tables */
        .table-wrap {
            overflow-x: auto;
            margin: 30px 0;
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
        }

        .article table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.98rem;
        }

        .article th,
        .article td {
            padding: 14px 18px;
            text-align: left;
            border-bottom: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }

        .article th { color: var(--text-primary); background: var(--bg-panel); font-weight: 600; }
        .article tr:last-child td { border-bottom: none; }

        /* ===== Code ===== */
        .article code,
        .code-block code {
            font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
        }

        .article :not(pre) > code {
            padding: 2px 8px;
            font-size: 0.9em;
            background: var(--inline-code-bg);
            color: var(--text-primary);
            border-radius: 6px;
        }

        .code-block {
            margin: 30px 0;
            background: var(--code-bg);
            border: 1px solid var(--code-border);
            border-radius: 14px;
            overflow: hidden;
            box-shadow: var(--shadow-card);
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px 10px 18px;
            background: var(--code-header-bg);
            border-bottom: 1px solid var(--code-border);
        }

        .code-lang {
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .code-title {
            flex: 1;
            margin: 0 16px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            opacity: 0.7;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .code-copy {
            padding: 6px 14px;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-primary);
            background: transparent;
            border: 1px solid var(--accent-border);
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .code-copy:hover { background: var(--button-gradient); color: var(--on-accent); border-color: transparent; }
        .code-copy:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

        .code-block pre {
            margin: 0;
            padding: 20px 22px;
            overflow-x: auto;
            tab-size: 4;
        }

        .code-block pre code {
            display: block;
            font-size: 0.92rem;
            line-height: 1.7;
            color: var(--code-text);
            white-space: pre;
        }

        /* Syntax tokens (SQL, Python, and general) */
        .tok-k { color: var(--tok-keyword); font-weight: 700; }
        .tok-f { color: var(--tok-function); text-decoration: underline; text-decoration-color: var(--tok-operator); text-underline-offset: 3px; text-decoration-thickness: 1px; }
        .tok-s { color: var(--tok-string); }
        .tok-n { color: var(--tok-number); }
        .tok-c { color: var(--tok-comment); font-style: italic; }
        .tok-o { color: var(--tok-operator); }
        .tok-t { color: var(--tok-type); font-style: italic; }

        /* Sidebar */
        .blog-sidebar {
            position: sticky;
            top: 100px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .sidebar-card {
            background: var(--bg-panel);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            box-shadow: var(--shadow-card);
            padding: 28px;
            position: relative;
        }

        .sidebar-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: var(--primary-gradient);
            border-radius: 20px 20px 0 0;
        }

        .sidebar-card h4 {
            font-size: 1.1rem;
            margin-bottom: 14px;
            color: var(--text-primary);
        }

        .sidebar-card p { color: var(--text-secondary); font-size: 0.95rem; }

        .toc-list { list-style: none; }

        .toc-list li { border-bottom: 1px solid var(--border-subtle); }
        .toc-list li:last-child { border-bottom: none; }

        .toc-list a {
            display: block;
            padding: 9px 0;
            font-size: 0.95rem;
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.3s ease, padding-left 0.3s ease;
        }

        .toc-list a:hover,
        .toc-list a.active { color: var(--accent-hover); padding-left: 6px; }

        .toc-list .toc-sub a { padding-left: 16px; font-size: 0.9rem; }
        .toc-list .toc-sub a:hover,
        .toc-list .toc-sub a.active { padding-left: 22px; }

        .sidebar-card .tag-list { justify-content: flex-start; }

        /* Author box + post navigation */
        .author-box {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-top: 60px;
            padding: 28px;
            background: var(--bg-panel);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            box-shadow: var(--shadow-card);
        }

        .author-avatar {
            flex-shrink: 0;
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: var(--primary-gradient);
            color: var(--on-accent);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            font-weight: 700;
        }

        .author-box h4 { color: var(--text-primary); margin-bottom: 4px; }
        .author-box p { margin: 0; font-size: 0.95rem; color: var(--text-secondary); }

        .post-nav {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-top: 30px;
        }

        .post-nav a {
            display: block;
            padding: 22px 26px;
            background: var(--bg-panel);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            text-decoration: none;
            transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .post-nav a:hover { transform: translateY(-6px); border-color: var(--accent-border); box-shadow: var(--shadow-hover); }
        .post-nav a:last-child { text-align: right; }

        .post-nav small { display: block; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-secondary); opacity: 0.75; margin-bottom: 6px; }
        .post-nav span { font-weight: 600; color: var(--text-primary); }

        /* Related posts */
        .related { margin-top: 90px; }
        .related .section-title { margin-bottom: 40px; }

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

        .post-card {
            display: block;
            background: var(--bg-panel);
            padding: 32px;
            border-radius: 20px;
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-card);
            text-decoration: none;
            transition: transform 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
        }

        .post-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-hover); border-color: var(--accent-border); }
        .post-card .card-meta { font-size: 0.85rem; color: var(--text-secondary); opacity: 0.75; margin-bottom: 12px; }
        .post-card h3 { font-size: 1.3rem; color: var(--text-primary); margin-bottom: 12px; }
        .post-card p { color: var(--text-secondary); opacity: 0.85; font-size: 0.95rem; }

        @media (max-width: 992px) {
            .blog-layout { grid-template-columns: minmax(0, 1fr); }
            .blog-sidebar { position: static; order: -1; }
            .blog-header h1 { font-size: 2.6rem; }
        }

        @media (max-width: 768px) {
            .blog { padding: 110px 20px 60px; }
            .blog-header h1 { font-size: 2.1rem; }
            .blog-lede { font-size: 1.1rem; }
            .article h2 { font-size: 1.6rem; }
            .post-nav { grid-template-columns: 1fr; }
            .post-nav a:last-child { text-align: left; }
            .author-box { flex-direction: column; text-align: center; }
            .code-block pre { padding: 16px; }
        }
