        /* Self-hosted Inter font */
        @font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 400;
            font-display: swap;
            src: url('../../fonts/inter-v13-latin-regular.woff2') format('woff2');
        }
        @font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 500;
            font-display: swap;
            src: url('../../fonts/inter-v13-latin-500.woff2') format('woff2');
        }
        @font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 600;
            font-display: swap;
            src: url('../../fonts/inter-v13-latin-600.woff2') format('woff2');
        }
        @font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 700;
            font-display: swap;
            src: url('../../fonts/inter-v13-latin-700.woff2') format('woff2');
        }

        /* Self-hosted JetBrains Mono */
        @font-face {
            font-family: 'JetBrains Mono';
            font-style: normal;
            font-weight: 400;
            font-display: swap;
            src: url('../../fonts/jetbrains-mono-regular.woff2') format('woff2');
        }
        @font-face {
            font-family: 'JetBrains Mono';
            font-style: normal;
            font-weight: 500;
            font-display: swap;
            src: url('../../fonts/jetbrains-mono-500.woff2') format('woff2');
        }

        :root {
            --container-padding: 1.5rem;
            --color-bg: #ffffff;
            --color-bg-secondary: #f5f5f5;
            --color-bg-tertiary: #ebebeb;
            --color-text: #0f172a;
            --color-text-secondary: #475569;
            --color-text-muted: #94a3b8;
            --color-border: #e2e8f0;
            --color-primary: #e53935;
            --color-primary-hover: #c62828;
            --color-accent: #e53935;
            --color-gradient-start: #e53935;
            --color-gradient-end: #ff6659;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --radius-sm: 0.25rem;
            --radius-md: 0.375rem;
            --radius-lg: 0.5rem;
            --radius-xl: 0.625rem;
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --font-mono: 'JetBrains Mono', ui-monospace, monospace;
            --font-serif: 'Georgia', 'Times New Roman', serif;
        }

        /* Dark mode - triggered by class or system preference */
        @media (prefers-color-scheme: dark) {
            :root:not(.light-mode) {
                --color-bg: #181818;
                --color-bg-secondary: #222222;
                --color-bg-tertiary: #2a2a2a;
                --color-text: #f0f0f0;
                --color-text-secondary: #cccccc;
                --color-text-muted: #777777;
                --color-border: #333333;
                --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
                --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
                --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
            }
        }

        /* Manual dark mode override */
        :root.dark-mode {
            --color-bg: #181818;
            --color-bg-secondary: #222222;
            --color-bg-tertiary: #2a2a2a;
            --color-text: #f0f0f0;
            --color-text-secondary: #cccccc;
            --color-text-muted: #777777;
            --color-border: #333333;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
        }

        *, *::before, *::after {
            box-sizing: border-box;
        }

        /* Always show scrollbar to prevent layout shift */
        html {
            scrollbar-gutter: stable;
        }

        * {
            margin: 0;
            padding: 0;
        }

        html {
            font-size: 16px;
            scroll-behavior: smooth;
        }

        html {
            overflow-x: clip;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-serif);
        }

        body {
            font-family: var(--font-sans);
            background-color: var(--color-bg);
            color: var(--color-text);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: clip;
            position: relative;
        }

        a {
            color: var(--color-primary);
            text-decoration: none;
            transition: color 0.2s ease;
        }

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

        /* Focus styles for keyboard navigation */
        :focus {
            outline: 2px solid var(--color-primary);
            outline-offset: 2px;
        }

        :focus:not(:focus-visible) {
            outline: none;
        }

        :focus-visible {
            outline: 2px solid var(--color-primary);
            outline-offset: 2px;
        }

        /* Skip link for accessibility */
        .skip-link {
            position: absolute;
            top: -100%;
            left: 1rem;
            padding: 0.75rem 1.25rem;
            background: var(--color-primary);
            color: white;
            font-weight: 600;
            border-radius: var(--radius-md);
            z-index: 10000;
            transition: top 0.2s ease;
        }

        .skip-link:focus {
            top: 1rem;
            outline: 2px solid white;
        }

        img {
            max-width: 100%;
            height: auto;
            display: block;
        }

        /* Header - Enhanced Glassmorphism */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(16px) saturate(180%);
            -webkit-backdrop-filter: blur(16px) saturate(180%);
            background: rgba(255, 255, 255, 0.85);
            will-change: transform;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                        0 4px 12px rgba(0, 0, 0, 0.03);
        }

        /* Gradient accent line under header */
        .site-header::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg,
                var(--color-primary) 0%,
                var(--color-accent) 50%,
                var(--color-primary) 100%);
            opacity: 0.6;
            background-size: 200% 100%;
            animation: headerGradient 8s ease infinite;
            z-index: 1;
            pointer-events: none;
        }

        @keyframes headerGradient {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        /* Reading Progress Bar */
        .reading-progress {
            position: fixed;
            top: 0;
            left: 0;
            width: 0%;
            height: 4px;
            background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
            z-index: 10000;
            transition: width 0.1s ease-out;
            box-shadow: 0 0 10px var(--color-primary);
            pointer-events: none;
        }

        /* Dark header - system preference or manual toggle */
        @media (prefers-color-scheme: dark) {
            :root:not(.light-mode) .site-header {
                background: rgba(24, 24, 24, 0.85);
                border-bottom: 1px solid rgba(51, 51, 51, 0.6);
                box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                            0 4px 12px rgba(0, 0, 0, 0.15);
            }
        }

        :root.dark-mode .site-header {
            background: rgba(24, 24, 24, 0.85);
            border-bottom: 1px solid rgba(51, 51, 51, 0.6);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                        0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .header-inner {
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            padding: 1rem var(--container-padding);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 2rem;
            min-height: 68px; /* Stabilize height to prevent layout shift */
            transform: translateZ(0);
            backface-visibility: hidden;
            position: relative;
            z-index: 10;
        }

        .logo {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .logo:hover {
            text-decoration: none;
        }

        .logo-text {
            font-family: var(--logo-font, 'Outfit'), sans-serif;
            font-weight: 700;
            font-size: 1.75rem;
            letter-spacing: -0.02em;
            line-height: 1;
        }

        .logo-text .logo-t,
        .logo-text .logo-2 {
            color: #e53935;
        }

        .logo-text .logo-2 {
            margin-left: 0.05em;
        }

        .logo-text .logo-tek {
            color: var(--color-text);
        }

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

        .logo-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 1rem;
        }

        .nav-links {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            margin-left: auto;
            contain: layout style;
        }

        .nav-link {
            padding: 0.5rem 0.75rem;
            color: var(--color-text-secondary);
            font-weight: 500;
            font-size: 0.875rem;
            border-radius: var(--radius-md);
            transition: color 0.2s ease, background-color 0.2s ease;
            white-space: nowrap;
        }

        .nav-link:hover {
            color: var(--color-text);
            background: var(--color-bg-secondary);
        }

        .nav-link-rigboard {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            color: var(--color-primary);
            font-weight: 600;
            border: 1px solid var(--color-primary);
            border-radius: var(--radius-md);
            padding: 0.4rem 0.75rem;
            margin-left: 0.25rem;
            font-size: 0.8rem;
            transition: all 0.2s ease;
        }
        .nav-link-rigboard:hover {
            background: var(--color-primary);
            color: #fff;
        }
        .nav-link-rigboard svg {
            flex-shrink: 0;
        }

        /* Mobile header actions - hidden on desktop */
        .mobile-header-actions {
            display: none;
        }

        /* Mobile hamburger menu */
        .nav-toggle {
            display: none;
            background: none;
            border: none;
            padding: 0.625rem;
            cursor: pointer;
            color: var(--color-text);
            min-width: 44px;
            min-height: 44px;
            border-radius: var(--radius-md);
            transition: background-color 0.2s ease;
        }

        .nav-toggle:hover {
            background: var(--color-bg-secondary);
        }

        .nav-toggle:active {
            background: var(--color-bg-tertiary);
        }

        .nav-toggle svg {
            width: 24px;
            height: 24px;
        }

        /* Hidden by default on desktop */
        .nav-overlay {
            display: none;
        }

        @media (max-width: 1024px) {
            /* Elevate header z-index on mobile for menu to show above content */
            .site-header {
                z-index: 1000;
            }

            /* Remove backdrop-filter when nav is open to fix stacking context */
            body.nav-open .site-header {
                backdrop-filter: none;
                -webkit-backdrop-filter: none;
                background: var(--color-bg);
            }

            .nav-links {
                position: fixed;
                top: 0;
                right: 0;
                width: min(280px, 85vw);
                max-width: 85vw;
                height: 100%;
                height: 100dvh;
                flex-direction: column;
                align-items: stretch;
                background: var(--color-bg);
                border-left: 1px solid var(--color-border);
                padding: 5rem 1rem 2rem;
                gap: 0.25rem;
                z-index: 9999;
                overflow-y: auto;
                overscroll-behavior: contain;
                -webkit-overflow-scrolling: touch;
                transform: translateX(100%);
                transition: transform 0.25s ease-out;
                will-change: transform;
            }

            .nav-links.open {
                transform: translateX(0);
            }

            .nav-link {
                padding: 0.875rem 1rem;
                font-size: 1rem;
                min-height: 44px;
                display: flex;
                align-items: center;
            }

            .nav-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
                position: fixed;
                top: 0.75rem;
                right: var(--container-padding, 1.5rem);
                z-index: 10000;
                background: var(--color-bg);
                border: 1px solid var(--color-border);
                border-radius: var(--radius-md);
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }

            .nav-overlay {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 9998;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.25s ease-out;
            }

            .nav-overlay.open {
                opacity: 1;
                pointer-events: auto;
            }

            /* Hide desktop-only elements on mobile */
            .desktop-only {
                display: none !important;
            }

            /* Mobile Header Actions (in header bar) */
            .mobile-header-actions {
                display: flex;
                align-items: center;
                gap: 0.25rem;
                margin-left: auto;
                margin-right: 3.5rem; /* Make room for fixed hamburger button */
            }

            .mobile-header-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 40px;
                height: 40px;
                background: transparent;
                border: none;
                border-radius: var(--radius-md);
                color: var(--color-text-secondary);
                cursor: pointer;
                position: relative;
                transition: color 0.2s ease, background 0.2s ease;
            }

            .mobile-header-btn:hover,
            .mobile-header-btn:active {
                color: var(--color-primary);
                background: var(--color-bg-secondary);
            }

            .mobile-header-btn svg {
                width: 20px;
                height: 20px;
            }

            .mobile-header-btn .icon-sun { display: none; }
            .mobile-header-btn .icon-moon { display: block; }

            :root.dark-mode .mobile-header-btn .icon-sun { display: block; }
            :root.dark-mode .mobile-header-btn .icon-moon { display: none; }

            .mobile-header-count {
                position: absolute;
                top: 2px;
                right: 2px;
                min-width: 16px;
                height: 16px;
                padding: 0 4px;
                display: flex;
                align-items: center;
                justify-content: center;
                background: var(--color-primary);
                color: white;
                font-size: 0.625rem;
                font-weight: 700;
                border-radius: 100px;
            }

            .mobile-header-count:empty,
            .mobile-header-count[data-count="0"] {
                display: none;
            }

            /* Mobile Menu Links */
            .mobile-menu-links {
                display: flex;
                flex-direction: column;
                gap: 0.25rem;
            }

            .mobile-menu-links .nav-link {
                padding: 0.875rem 1rem;
                font-size: 1rem;
                min-height: 44px;
                display: flex;
                align-items: center;
            }
        }

        /* Mobile Search Overlay */
        .mobile-search-overlay {
            display: none;
        }

        @media (max-width: 1024px) {
            .mobile-search-overlay {
                display: flex;
                flex-direction: column;
                position: fixed;
                inset: 0;
                background: var(--color-bg);
                z-index: 10002;
                padding: 1rem;
                opacity: 0;
                visibility: hidden;
                transition: opacity 0.25s ease, visibility 0.25s ease;
            }

            .mobile-search-overlay.open {
                opacity: 1;
                visibility: visible;
            }

            .mobile-search-container {
                display: flex;
                align-items: center;
                gap: 0.75rem;
                padding-bottom: 1rem;
                border-bottom: 1px solid var(--color-border);
            }

            .mobile-search-form {
                flex: 1;
                display: flex;
                align-items: center;
                background: var(--color-bg-secondary);
                border: 1px solid var(--color-border);
                border-radius: var(--radius-lg);
                padding: 0 1rem;
                transition: border-color 0.2s ease;
            }

            .mobile-search-form:focus-within {
                border-color: var(--color-primary);
            }

            .mobile-search-input {
                flex: 1;
                padding: 0.875rem 0;
                background: transparent;
                border: none;
                font-size: 1rem;
                color: var(--color-text);
                outline: none;
            }

            .mobile-search-input::placeholder {
                color: var(--color-text-muted);
            }

            .mobile-search-submit {
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0.5rem;
                background: transparent;
                border: none;
                color: var(--color-text-secondary);
                cursor: pointer;
            }

            .mobile-search-close {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 44px;
                height: 44px;
                background: var(--color-bg-secondary);
                border: 1px solid var(--color-border);
                border-radius: var(--radius-md);
                color: var(--color-text-secondary);
                cursor: pointer;
                flex-shrink: 0;
            }

            .mobile-search-close:hover {
                border-color: var(--color-primary);
                color: var(--color-primary);
            }

            .mobile-search-close svg {
                width: 20px;
                height: 20px;
            }

            .mobile-search-results {
                flex: 1;
                overflow-y: auto;
                padding-top: 1rem;
            }

            .mobile-search-result-item {
                display: flex;
                gap: 0.75rem;
                padding: 0.875rem;
                border-radius: var(--radius-md);
                text-decoration: none;
                color: inherit;
                transition: background 0.15s ease;
                margin-bottom: 0.5rem;
            }

            .mobile-search-result-item:hover,
            .mobile-search-result-item:active {
                background: var(--color-bg-secondary);
            }

            .mobile-search-result-thumb {
                width: 60px;
                height: 60px;
                object-fit: cover;
                border-radius: var(--radius-sm);
                flex-shrink: 0;
            }

            .mobile-search-result-thumb-placeholder {
                width: 60px;
                height: 60px;
                background: var(--color-bg-secondary);
                border-radius: var(--radius-sm);
                flex-shrink: 0;
            }

            .mobile-search-result-content {
                flex: 1;
                min-width: 0;
            }

            .mobile-search-result-title {
                font-weight: 600;
                color: var(--color-text);
                margin-bottom: 0.25rem;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }

            .mobile-search-result-title mark {
                background: var(--color-primary);
                color: white;
                padding: 0 0.125rem;
                border-radius: 2px;
            }

            .mobile-search-result-meta {
                font-size: 0.813rem;
                color: var(--color-text-muted);
            }

            .mobile-search-empty {
                padding: 2rem 1rem;
                text-align: center;
                color: var(--color-text-secondary);
            }

            .mobile-search-view-all {
                display: block;
                padding: 1rem;
                text-align: center;
                color: var(--color-primary);
                text-decoration: none;
                font-weight: 500;
                border-top: 1px solid var(--color-border);
                margin-top: 0.5rem;
            }

            .mobile-search-view-all:hover {
                background: var(--color-bg-secondary);
            }
        }

        /* Desktop: Show desktop-only, hide mobile elements */
        @media (min-width: 1025px) {
            .mobile-header-actions {
                display: none;
            }

            .mobile-menu-links {
                display: contents;
            }
        }

        /* Search Button */
        .nav-search-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.25rem;
            height: 2.25rem;
            padding: 0;
            color: var(--color-text-secondary);
            background: transparent;
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: color 0.2s ease, background-color 0.2s ease;
            text-decoration: none;
        }

        .nav-search-btn svg {
            width: 18px;
            height: 18px;
        }

        .nav-search-btn:hover {
            color: var(--color-primary);
            background: var(--color-bg-secondary);
        }

        /* Search Autocomplete Container */
        .nav-search-container {
            position: relative;
            display: flex;
            align-items: center;
            z-index: 100;
        }

        .nav-search-form {
            position: relative;
            display: flex;
            align-items: center;
        }

        .nav-search-input {
            width: 0;
            padding: 0;
            border: none;
            background: transparent;
            color: var(--color-text);
            font-size: 0.875rem;
            opacity: 0;
            transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
            outline: none;
        }

        .nav-search-container.expanded .nav-search-input {
            width: 180px;
            padding: 0.5rem 0.75rem;
            padding-right: 2.5rem;
            opacity: 1;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
        }

        .nav-search-container.expanded .nav-search-input:focus {
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 99, 102, 241), 0.1);
        }

        .nav-search-container.expanded .nav-search-btn {
            position: absolute;
            right: 0;
            background: transparent;
        }

        /* Search Autocomplete Dropdown */
        .search-autocomplete {
            position: absolute;
            top: calc(100% + 0.5rem);
            right: 0;
            width: 320px;
            max-height: 400px;
            overflow-y: auto;
            background: var(--color-bg, #ffffff);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                        0 10px 40px -10px rgba(0, 0, 0, 0.2);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
            z-index: 9999;
        }

        /* Dark mode autocomplete styling */
        .dark-mode .search-autocomplete,
        @media (prefers-color-scheme: dark) {
            :root:not(.light-mode) .search-autocomplete {
                background: rgba(30, 41, 59, 0.95);
                backdrop-filter: blur(12px);
                -webkit-backdrop-filter: blur(12px);
                border-color: rgba(255, 255, 255, 0.1);
                box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
                            0 10px 40px -10px rgba(0, 0, 0, 0.5);
            }
        }

        .search-autocomplete.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .search-autocomplete-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            text-decoration: none;
            color: var(--color-text);
            border-bottom: 1px solid var(--color-border);
            transition: background-color 0.15s ease;
        }

        .search-autocomplete-item:last-child {
            border-bottom: none;
        }

        .search-autocomplete-item:hover,
        .search-autocomplete-item.selected {
            background: var(--color-bg-hover, rgba(var(--color-primary-rgb, 99, 102, 241), 0.1));
        }

        .search-autocomplete-thumb {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-sm);
            object-fit: cover;
            flex-shrink: 0;
            background: var(--color-bg-tertiary);
        }

        .search-autocomplete-content {
            flex: 1;
            min-width: 0;
        }

        .search-autocomplete-title {
            font-size: 0.875rem;
            font-weight: 500;
            line-height: 1.3;
            margin-bottom: 0.25rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .search-autocomplete-title mark {
            background: rgba(var(--color-primary-rgb, 99, 102, 241), 0.3);
            color: inherit;
            border-radius: 2px;
            padding: 0 2px;
        }

        .search-autocomplete-meta {
            font-size: 0.75rem;
            color: var(--color-text-tertiary);
        }

        .search-autocomplete-empty {
            padding: 1.5rem 1rem;
            text-align: center;
            color: var(--color-text-tertiary);
            font-size: 0.875rem;
        }

        .search-autocomplete-footer {
            padding: 0.75rem 1rem;
            border-top: 1px solid var(--color-border);
            background: var(--color-bg-tertiary);
            border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        }

        .search-autocomplete-footer a {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            color: var(--color-primary);
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .search-autocomplete-footer a:hover {
            text-decoration: underline;
        }

        .search-shortcut-hint {
            display: none;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.75rem;
            color: var(--color-text-tertiary);
            margin-left: 0.5rem;
            transition: opacity 0.2s ease;
        }

        @media (min-width: 768px) {
            .search-shortcut-hint {
                display: flex;
            }
        }

        /* Hide hint when search is expanded */
        .nav-search-container.expanded + .search-shortcut-hint,
        .nav-search-container.expanded .search-shortcut-hint {
            opacity: 0;
            pointer-events: none;
        }

        .search-shortcut-hint kbd {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.25rem;
            height: 1.25rem;
            padding: 0 0.25rem;
            font-family: inherit;
            font-size: 0.7rem;
            background: var(--color-bg-tertiary);
            border: 1px solid var(--color-border);
            border-radius: 3px;
            box-shadow: 0 1px 0 var(--color-border);
        }

        @media (max-width: 767px) {
            .nav-search-container.expanded .nav-search-input {
                width: 150px;
            }

            .search-autocomplete {
                width: calc(100vw - 2rem);
                right: -1rem;
            }
        }

        /* Theme Toggle Button */
        .theme-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.25rem;
            height: 2.25rem;
            padding: 0;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
            color: var(--color-text-secondary);
        }

        .theme-toggle:hover {
            background: var(--color-bg-tertiary);
            color: var(--color-text);
            border-color: var(--color-text-muted);
        }

        .theme-toggle svg {
            width: 1.125rem;
            height: 1.125rem;
        }

        .theme-toggle .icon-sun { display: none; }
        .theme-toggle .icon-moon { display: block; }

        :root.dark-mode .theme-toggle .icon-sun,
        :root:not(.light-mode) .theme-toggle .icon-sun { display: block; }
        :root.dark-mode .theme-toggle .icon-moon,
        :root:not(.light-mode) .theme-toggle .icon-moon { display: none; }

        @media (prefers-color-scheme: light) {
            :root:not(.dark-mode) .theme-toggle .icon-sun { display: none; }
            :root:not(.dark-mode) .theme-toggle .icon-moon { display: block; }
        }

        .sidebar-theme-toggle {
            margin-top: auto;
            margin-bottom: 1rem;
        }

        /* Nav Bookmarks Button */
        .nav-bookmarks-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.25rem;
            height: 2.25rem;
            padding: 0;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
            color: var(--color-text-secondary);
            position: relative;
        }

        .nav-bookmarks-btn:hover {
            background: var(--color-bg-tertiary);
            color: var(--color-text);
            border-color: var(--color-text-muted);
        }

        .nav-bookmarks-btn svg {
            width: 1.125rem;
            height: 1.125rem;
        }

        .nav-bookmarks-count {
            position: absolute;
            top: -5px;
            right: -5px;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--color-primary);
            color: white;
            font-size: 0.625rem;
            font-weight: 700;
            border-radius: 100px;
        }

        .nav-bookmarks-count:empty,
        .nav-bookmarks-count[data-count="0"] {
            display: none;
        }

        /* Language Switcher */
        .nav-lang-switcher {
            position: relative;
            display: flex;
            align-items: center;
        }

        .nav-lang-btn {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            height: 2.25rem;
            padding: 0 0.5rem;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            cursor: pointer;
            color: var(--color-text-secondary);
            font-size: 0.6875rem;
            font-weight: 600;
            letter-spacing: 0.02em;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }

        .nav-lang-btn:hover {
            background: var(--color-bg-tertiary);
            color: var(--color-text);
            border-color: var(--color-text-muted);
        }

        .nav-lang-btn svg {
            width: 0.9375rem;
            height: 0.9375rem;
        }

        .nav-lang-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 0.5rem);
            right: 0;
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            box-shadow: 0 4px 16px rgba(0,0,0,0.12);
            z-index: 200;
            min-width: 150px;
            padding: 0.25rem;
            animation: langDropIn 0.15s ease;
        }

        @keyframes langDropIn {
            from { opacity: 0; transform: translateY(-4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .nav-lang-dropdown.open {
            display: block;
        }

        .nav-lang-option {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.4375rem 0.625rem;
            background: none;
            border: none;
            border-radius: var(--radius-sm, 4px);
            color: var(--color-text-secondary);
            font-size: 0.8125rem;
            text-align: left;
            cursor: pointer;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .nav-lang-option:hover {
            background: var(--color-bg-secondary);
            color: var(--color-text);
        }

        .nav-lang-option.active {
            color: var(--color-accent, var(--color-primary));
            font-weight: 600;
        }

        .nav-lang-option .lang-code {
            font-size: 0.6875rem;
            font-weight: 700;
            text-transform: uppercase;
            opacity: 0.5;
            min-width: 1.25rem;
        }

        /* Bookmarks Panel */
        .bookmarks-panel {
            position: fixed;
            top: 0;
            right: -380px;
            width: 380px;
            max-width: 100%;
            height: 100vh;
            background: var(--color-bg);
            border-left: 1px solid var(--color-border);
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
            z-index: 1002;
            display: flex;
            flex-direction: column;
            visibility: hidden;
            transition: right 0.3s ease, visibility 0.3s ease;
        }

        .bookmarks-panel.open {
            right: 0;
            visibility: visible;
        }

        .bookmarks-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--color-border);
        }

        .bookmarks-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin: 0;
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--color-text);
        }

        .bookmarks-title svg {
            width: 20px;
            height: 20px;
            color: var(--color-primary);
        }

        .bookmarks-close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            background: transparent;
            border: none;
            border-radius: var(--radius-md);
            color: var(--color-text-secondary);
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .bookmarks-close:hover {
            background: var(--color-bg-secondary);
            color: var(--color-text);
        }

        .bookmarks-close svg {
            width: 18px;
            height: 18px;
        }

        .bookmarks-list {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }

        .bookmark-item {
            display: flex;
            gap: 0.875rem;
            padding: 0.875rem;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            margin-bottom: 0.75rem;
            transition: border-color 0.2s ease;
        }

        .bookmark-item:hover {
            border-color: var(--color-primary);
        }

        .bookmark-item-image {
            width: 72px;
            height: 54px;
            border-radius: var(--radius-md);
            object-fit: cover;
            flex-shrink: 0;
        }

        .bookmark-item-content {
            flex: 1;
            min-width: 0;
        }

        .bookmark-item-title {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--color-text);
            text-decoration: none;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.4;
        }

        .bookmark-item-title:hover {
            color: var(--color-primary);
        }

        .bookmark-item-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0.375rem;
        }

        .bookmark-item-date {
            font-size: 0.75rem;
            color: var(--color-text-muted);
        }

        .bookmark-item-remove {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            background: transparent;
            border: none;
            border-radius: var(--radius-sm);
            color: var(--color-text-muted);
            cursor: pointer;
            transition: color 0.2s ease, background 0.2s ease;
        }

        .bookmark-item-remove:hover {
            color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
        }

        .bookmark-item-remove svg {
            width: 14px;
            height: 14px;
        }

        .bookmarks-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 1.5rem;
            text-align: center;
            color: var(--color-text-muted);
        }

        .bookmarks-empty svg {
            width: 48px;
            height: 48px;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        .bookmarks-empty p {
            margin: 0;
            font-size: 0.875rem;
        }

        .bookmarks-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 1001;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .bookmarks-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        @media (max-width: 480px) {
            .bookmarks-panel {
                width: 100%;
                right: -100%;
            }
        }

        /* Main Content */
        .main-content {
            flex: 1;
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem var(--container-padding);
            min-width: 0; /* Prevent flex item overflow */
            position: relative;
            z-index: 1;
            isolation: isolate;
        }

        /* Prevent any child from causing overflow */
        .main-content > * {
            max-width: 100%;
        }

        /* Density Presets - must be in head to prevent layout shift */
        .theme-density-compact {
            --container-padding: 1rem;
        }
        .theme-density-compact .main-content {
            padding-top: 1rem;
            padding-bottom: 1rem;
        }
        .theme-density-comfortable {
            --container-padding: 1.5rem;
        }
        .theme-density-comfortable .main-content {
            padding-top: 2rem;
            padding-bottom: 2rem;
        }
        .theme-density-spacious {
            --container-padding: 2rem;
        }
        .theme-density-spacious .main-content {
            padding-top: 3rem;
            padding-bottom: 3rem;
        }

        /* Width Presets - must be in head to prevent layout shift */
        .theme-width-narrow .header-inner,
        .theme-width-narrow .main-content {
            max-width: 680px;
        }
        .theme-width-standard .header-inner,
        .theme-width-standard .main-content {
            max-width: 1400px;
        }
        .theme-width-wide .header-inner,
        .theme-width-wide .main-content {
            max-width: 1400px;
        }

        /* Hero Section */
        .hero {
            text-align: center;
            padding: 3rem 0 4rem;
        }

        .hero h1 {
            font-size: clamp(2rem, 5vw, 3rem);
            font-weight: 700;
            line-height: 1.2;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero p {
            font-size: 1.125rem;
            color: var(--color-text-secondary);
            max-width: 600px;
            margin: 0 auto;
        }

        /* Section Headers */
        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--color-border);
        }

        .section-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--color-text);
        }

        .section-link {
            font-size: 0.875rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        /* Category Section */
        .category-section,
        .category-grid-section {
            margin-bottom: 2.5rem;
        }

        .category-section .section-header {
            margin-bottom: 1.25rem;
            padding-bottom: 0.75rem;
        }

        .section-title-indicator {
            display: inline-block;
            width: 4px;
            height: 1.25em;
            border-radius: 2px;
            margin-right: 0.625rem;
            vertical-align: middle;
        }

        .section-view-all {
            font-size: 0.8125rem;
            font-weight: 500;
            color: var(--color-text-secondary);
            display: flex;
            align-items: center;
            gap: 0.25rem;
            transition: color 0.15s ease;
        }

        .section-view-all:hover {
            color: var(--color-primary);
        }

        /* Articles Row (4 columns) */
        .articles-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.25rem;
            max-width: 100%;
        }

        .articles-row > * {
            min-width: 0; /* Prevent grid item overflow */
        }

        @media (max-width: 1100px) {
            .articles-row {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 600px) {
            .articles-row {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
        }

        /* Compact Article Card */
        .article-card-compact {
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            overflow: hidden;
            transition: all 0.2s ease;
            min-width: 0; /* Prevent content overflow */
        }

        .article-card-compact:hover {
            border-color: var(--color-primary);
            box-shadow: var(--shadow-md);
        }

        .article-card-compact-image-wrapper {
            position: relative;
        }

        .article-card-compact-image {
            display: block;
            aspect-ratio: 16/10;
            overflow: hidden;
            background: var(--color-bg-tertiary);
        }

        .article-card-compact-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .article-card-compact:hover .article-card-compact-image img {
            transform: scale(1.05);
        }

        .article-card-compact-image .article-card-gradient {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            font-weight: 700;
            color: white;
        }

        .article-card-label {
            position: absolute;
            top: 0.5rem;
            left: 0.5rem;
            z-index: 2;
            padding: 0.25rem 0.5rem;
            font-size: 0.625rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: white;
            border-radius: var(--radius-sm);
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
            text-decoration: none;
        }

        .article-card-label:hover {
            text-decoration: underline;
            color: white;
        }

        .article-card-compact-body {
            padding: 0.875rem;
        }

        .article-card-compact-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.6875rem;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .tldr-toggle {
            cursor: pointer;
            transition: color 0.15s ease;
        }

        .tldr-toggle:hover {
            color: var(--color-primary);
        }

        .tldr-toggle-expand,
        .tldr-toggle-collapse {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
        }

        .tldr-toggle-collapse {
            display: none;
        }

        .category-section.expanded .tldr-toggle-expand,
        .category-grid-section.expanded .tldr-toggle-expand {
            display: none;
        }

        .category-section.expanded .tldr-toggle-collapse,
        .category-grid-section.expanded .tldr-toggle-collapse {
            display: inline-flex;
        }

        .article-card-compact-body h3 {
            font-size: 0.9375rem;
            font-weight: 600;
            line-height: 1.4;
            margin: 0.375rem 0 0 0;
            color: var(--color-text);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            word-break: break-word;
            overflow-wrap: break-word;
        }

        .article-card-compact-body h3 a {
            color: inherit;
            text-decoration: none;
        }

        .article-card-compact-body h3 a:hover {
            color: var(--color-primary);
        }

        .article-card-compact-tldr {
            font-size: 0.8125rem;
            line-height: 1.5;
            color: var(--color-text-secondary);
            margin: 0.5rem 0 0 0;
        }

        .article-card-compact-tldr .tldr-text {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .category-section.expanded .tldr-text,
        .category-grid-section.expanded .tldr-text {
            display: inline;
            -webkit-line-clamp: unset;
        }

        .tldr-read-more {
            display: none;
            margin-left: 0.25rem;
            font-size: 0.8125rem;
            color: var(--color-primary);
        }

        .tldr-read-more:hover {
            text-decoration: underline;
        }

        .category-section.expanded .tldr-read-more,
        .category-grid-section.expanded .tldr-read-more {
            display: inline;
        }

        /* Article Cards Grid */
        .articles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
            gap: 1.5rem;
        }

        @media (max-width: 768px) {
            .articles-grid {
                grid-template-columns: 1fr;
                gap: 1.25rem;
            }

            /* Mobile-friendly category nav - horizontal scroll */
            .category-nav {
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none; /* Firefox */
                -ms-overflow-style: none; /* IE/Edge */
                margin-left: -1rem;
                margin-right: -1rem;
                padding-left: 1rem;
                padding-right: 1rem;
                border-radius: 0;
                border-left: none;
                border-right: none;
            }

            .category-nav::-webkit-scrollbar {
                display: none; /* Chrome/Safari */
            }

            .category-nav-item {
                flex-shrink: 0;
                padding: 0.4rem 0.75rem;
                font-size: 0.8125rem;
            }
        }

        /* Article Card */
        .article-card {
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-xl);
            overflow: hidden;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            min-width: 0; /* Prevent content overflow */
        }

        .article-card:hover {
            border-color: var(--color-primary);
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }

        .article-card-image {
            display: flex;
            aspect-ratio: 16/9;
            overflow: hidden;
            position: relative;
            background: var(--color-bg-tertiary);
        }

        .article-card-image img {
            flex: 1 1 0;
            min-height: 0;
            width: 100%;
            object-fit: cover;
            object-position: center;
            transition: transform 0.4s ease;
        }

        .article-card:hover .article-card-image img {
            transform: scale(1.05);
        }

        .article-card-gradient {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            font-weight: 700;
            color: white;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .article-card-body {
            padding: 1.25rem;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .article-card-meta {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.8125rem;
            color: var(--color-text-muted);
            margin-bottom: 0.75rem;
        }

        .article-card h2 {
            font-size: 1.125rem;
            font-weight: 600;
            line-height: 1.4;
            margin-bottom: 0.5rem;
            color: var(--color-text);
            word-break: break-word;
            overflow-wrap: break-word;
        }

        .article-card h2 a {
            color: inherit;
        }

        .article-card h2 a:hover {
            color: var(--color-primary);
        }

        .article-card-excerpt {
            font-size: 0.9375rem;
            color: var(--color-text-secondary);
            line-height: 1.6;
            flex: 1;
        }

        .read-more-link {
            color: var(--color-primary);
            text-decoration: none;
            font-weight: 500;
            white-space: nowrap;
            margin-left: 0.25rem;
        }

        .read-more-link:hover {
            text-decoration: underline;
        }

        .article-card-read-time {
            font-size: 0.8125rem;
            color: var(--color-text-muted);
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        /* Featured Article */
        .featured-article {
            display: block;
            position: relative;
            background: var(--color-bg-tertiary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-xl);
            overflow: hidden;
            margin-bottom: 3rem;
            min-height: 350px;
            max-width: 100%;
        }

        .featured-article-image-link {
            display: block;
        }

        .featured-article h2 a {
            color: inherit;
            text-decoration: none;
        }

        .featured-read-more {
            color: inherit;
            text-decoration: none;
        }

        .featured-read-more:hover {
            text-decoration: underline;
        }

        .featured-article:hover .featured-article-image img {
            transform: scale(1.03);
        }

        .featured-article-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .featured-article-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transition: transform 0.4s ease;
        }

        .featured-article-gradient {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            font-weight: 700;
            color: white;
        }

        .featured-article-content {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 2rem;
            background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
            color: white;
            overflow: hidden;
        }

        .featured-badges {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        .featured-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.25rem 0.75rem;
            background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            font-weight: 600;
            color: white;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .featured-badges .article-category-badge {
            margin-bottom: 0;
        }

        .featured-article h2 {
            font-size: 1.75rem;
            font-weight: 700;
            line-height: 1.3;
            margin-bottom: 0.5rem;
            color: white;
            word-break: break-word;
            overflow-wrap: break-word;
        }

        .featured-article-tldr {
            font-size: 0.9375rem;
            line-height: 1.5;
            color: rgba(255,255,255,0.85);
            margin-bottom: 0.75rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .featured-article-meta {
            display: flex;
            align-items: center;
            gap: 1rem;
            font-size: 0.875rem;
            color: rgba(255,255,255,0.8);
        }

        .featured-read-more {
            margin-left: auto;
            color: white;
            font-weight: 600;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }

        .featured-article:hover .featured-read-more {
            opacity: 1;
        }

        @media (max-width: 600px) {
            .featured-article {
                aspect-ratio: 4/3;
            }
            .featured-article h2 {
                font-size: 1.25rem;
            }
            .featured-article-content {
                padding: 1.25rem;
            }
        }

        /* Mobile Typography & Spacing Improvements */
        @media (max-width: 480px) {
            /* Increase meta text size for readability */
            .article-card-compact-meta {
                font-size: 0.75rem;
            }

            .article-card-meta {
                font-size: 0.875rem;
            }

            .latest-feed-meta {
                font-size: 0.75rem;
            }

            /* Scale article titles on small screens */
            .article-card-compact-body h3 {
                font-size: 1rem;
                line-height: 1.35;
            }

            .article-card h2 {
                font-size: 1.0625rem;
            }

            /* Better spacing on small screens */
            .article-card-compact-body {
                padding: 1rem;
            }

            .article-card-body {
                padding: 1rem;
            }

            /* Section title adjustments */
            .section-title {
                font-size: 1.125rem;
            }

            /* Better hero scaling */
            .hero {
                padding: 2rem 0 2.5rem;
            }

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

            /* Touch-friendly links */
            .section-view-all {
                padding: 0.5rem;
                margin: -0.5rem;
            }
        }

        /* Extra small screens (320px) */
        @media (max-width: 375px) {
            :root {
                --container-padding: 1rem;
            }

            .header-inner {
                padding: 0.75rem var(--container-padding);
                min-height: 60px;
            }

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

            .featured-article h2 {
                font-size: 1.125rem;
            }

            .featured-article-tldr {
                font-size: 0.875rem;
                -webkit-line-clamp: 2;
            }

            .featured-article-meta {
                font-size: 0.8125rem;
                gap: 0.75rem;
            }
        }

        /* Featured Row (Featured + Latest Feed) */
        .featured-row {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 1.5rem;
            margin-bottom: 3rem;
            align-items: stretch;
            max-width: 100%;
        }

        .featured-row .featured-article {
            margin-bottom: 0;
            height: 100%;
            min-width: 0; /* Prevent grid item overflow */
        }

        @media (max-width: 1100px) {
            .featured-row {
                grid-template-columns: 1fr;
            }
            .featured-row .featured-article {
                min-height: 300px;
            }
            .featured-row .latest-feed {
                display: none;
            }
        }

        @media (max-width: 600px) {
            .featured-row {
                margin-bottom: 2rem;
            }
            .featured-row .featured-article {
                min-height: 280px;
            }
        }

        /* Latest Feed Sidebar */
        .latest-feed {
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-xl);
            padding: 1rem;
            display: flex;
            flex-direction: column;
        }

        .latest-feed-title {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-text-secondary);
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--color-border);
        }

        .latest-feed-title svg {
            opacity: 0.6;
        }

        .latest-feed-list {
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
        }

        .latest-feed-item {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.5rem;
            border-radius: var(--radius-md);
            text-decoration: none;
            transition: background-color 0.15s ease;
        }

        .latest-feed-item:hover {
            background: var(--color-bg-tertiary);
        }

        .latest-feed-thumb {
            flex-shrink: 0;
            width: 48px;
            height: 48px;
            border-radius: var(--radius-sm);
            overflow: hidden;
            background: var(--color-bg-tertiary);
        }

        .latest-feed-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .latest-feed-thumb-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            font-weight: 600;
            color: white;
        }

        .latest-feed-content {
            flex: 1;
            min-width: 0;
        }

        .latest-feed-content h4 {
            font-size: 0.8125rem;
            font-weight: 500;
            line-height: 1.35;
            color: var(--color-text);
            margin: 0 0 0.125rem 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .latest-feed-meta {
            font-size: 0.6875rem;
            color: var(--color-text-muted);
        }

        /* Single Post Styles */
        .post-header {
            max-width: 1400px;
            margin: 0 auto 2rem;
            text-align: center;
            padding: 2rem 0 3rem;
        }

        .post-header h1 {
            font-size: clamp(1.75rem, 4vw, 2.5rem);
            font-weight: 700;
            line-height: 1.25;
            margin-bottom: 1rem;
            color: var(--color-text);
        }

        .post-meta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
            font-size: 0.9375rem;
            color: var(--color-text-secondary);
        }

        .post-meta-divider {
            width: 4px;
            height: 4px;
            background: var(--color-text-muted);
            border-radius: 50%;
        }

        /* Post Content */
        .post-content {
            max-width: 1400px;
            margin: 0 auto;
            font-size: 1.0625rem;
            line-height: 1.8;
        }

        .post-content h1,
        .post-content h2,
        .post-content h3,
        .post-content h4,
        .post-content h5,
        .post-content h6 {
            color: var(--color-text);
            font-weight: 600;
            line-height: 1.3;
            margin-top: 1.75rem;
            margin-bottom: 0.75rem;
        }

        .post-content h2 { font-size: 1.625rem; }
        .post-content h3 { font-size: 1.375rem; }
        .post-content h4 { font-size: 1.125rem; }

        /* Hide br tags that appear before headings */
        .post-content br + h2,
        .post-content br + h3,
        .post-content br + h4 {
            margin-top: 1rem;
        }
        .post-content br:has(+ h2),
        .post-content br:has(+ h3),
        .post-content br:has(+ h4) {
            display: none;
        }

        .post-content p {
            margin-bottom: 1.5rem;
            color: var(--color-text-secondary);
        }

        .post-content a {
            color: var(--color-primary);
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .post-content strong {
            font-weight: 600;
            color: var(--color-text);
        }

        .post-content ul,
        .post-content ol {
            margin-bottom: 1.5rem;
            padding-left: 1.5rem;
            color: var(--color-text-secondary);
        }

        .post-content ul {
            list-style-type: disc;
        }

        .post-content ol {
            list-style-type: decimal;
        }

        .post-content li {
            margin-bottom: 0.5rem;
            display: list-item;
        }

        /* Nested lists */
        .post-content ul ul,
        .post-content ol ul,
        .post-content ul ol,
        .post-content ol ol {
            margin-top: 0.5rem;
            margin-bottom: 0.5rem;
            padding-left: 1.25rem;
        }

        .post-content ul ul {
            list-style-type: circle;
        }

        .post-content ul ul ul {
            list-style-type: square;
        }

        .post-content li > ul,
        .post-content li > ol {
            margin-top: 0.375rem;
        }

        .post-content blockquote {
            margin: 2rem 0;
            padding: 1.5rem;
            background: var(--color-bg-secondary);
            border-left: 4px solid var(--color-primary);
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
            font-style: italic;
            color: var(--color-text-secondary);
        }

        .post-content pre {
            margin: 1.5rem 0;
            padding: 1.25rem;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            overflow-x: auto;
            font-family: var(--font-mono);
            font-size: 0.875rem;
            line-height: 1.6;
        }

        .post-content code {
            font-family: var(--font-mono);
            font-size: 0.875em;
            padding: 0.2em 0.4em;
            background: var(--color-bg-tertiary);
            border-radius: var(--radius-sm);
            color: var(--color-accent);
        }

        .post-content pre code {
            padding: 0;
            background: none;
            color: var(--color-text);
        }

        .post-content img {
            margin: 2rem auto;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
        }

        .post-content hr {
            margin: 3rem 0;
            border: none;
            height: 1px;
            background: var(--color-border);
        }

        /* Table Modal Trigger Button */
        .table-modal-trigger {
            margin: 1.5rem 0;
        }

        .table-modal-btn {
            display: flex;
            align-items: center;
            gap: 0.875rem;
            width: 100%;
            padding: 1rem 1.25rem;
            background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
        }

        .table-modal-btn:hover {
            border-color: var(--color-primary);
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .table-modal-btn svg {
            flex-shrink: 0;
            color: var(--color-primary);
        }

        .table-modal-btn-text {
            font-size: 0.9375rem;
            font-weight: 600;
            color: var(--color-text);
        }

        .table-modal-btn-meta {
            margin-left: auto;
            font-size: 0.8125rem;
            color: var(--color-text-muted);
        }

        /* Table Modal Overlay */
        .table-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease, visibility 0.2s ease;
        }

        .table-modal-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        .table-modal {
            background: var(--color-bg);
            border-radius: var(--radius-xl);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
            max-width: 95vw;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            transform: scale(0.95);
            transition: transform 0.2s ease;
        }

        .table-modal-overlay.open .table-modal {
            transform: scale(1);
        }

        .table-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--color-border);
            flex-shrink: 0;
        }

        .table-modal-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--color-text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .table-modal-title svg {
            color: var(--color-primary);
        }

        .table-modal-close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2rem;
            height: 2rem;
            background: var(--color-bg-secondary);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            cursor: pointer;
            color: var(--color-text-secondary);
            transition: all 0.15s ease;
        }

        .table-modal-close:hover {
            background: var(--color-bg-tertiary);
            color: var(--color-text);
            border-color: var(--color-text-muted);
        }

        .table-modal-body {
            overflow: auto;
            padding: 1.25rem;
        }

        .table-modal-body table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.875rem;
        }

        .table-modal-body th,
        .table-modal-body td {
            padding: 0.75rem 1rem;
            text-align: left;
            border-bottom: 1px solid var(--color-border);
            white-space: nowrap;
        }

        .table-modal-body th {
            background: var(--color-bg-secondary);
            font-weight: 600;
            color: var(--color-text);
            position: sticky;
            top: 0;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .table-modal-body td {
            color: var(--color-text-secondary);
        }

        .table-modal-body tbody tr:hover {
            background: var(--color-bg-secondary);
        }

        .table-modal-body tbody tr:hover td {
            color: var(--color-text);
        }

        /* First column sticky */
        .table-modal-body th:first-child,
        .table-modal-body td:first-child {
            position: sticky;
            left: 0;
            background: var(--color-bg);
            font-weight: 600;
            color: var(--color-text);
            z-index: 1;
        }

        .table-modal-body th:first-child {
            background: var(--color-bg-secondary);
            z-index: 2;
        }

        .table-modal-body tbody tr:hover td:first-child {
            background: var(--color-bg-secondary);
        }

        /* Quick Picks Section */
        .quick-picks {
            margin: 2rem 0;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
            border: 1px solid var(--color-border);
            border-radius: var(--radius-xl);
            padding: 1.5rem;
            position: relative;
            overflow: hidden;
        }

        .quick-picks::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--color-gradient-start), var(--color-gradient-end));
        }

        .quick-picks-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--color-border);
        }

        .quick-picks-header svg {
            color: var(--color-primary);
        }

        .quick-picks-header span {
            font-size: 0.875rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-text);
        }

        .quick-picks-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 0.75rem;
        }

        .quick-pick-item {
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            transition: all 0.2s ease;
        }

        .quick-pick-item:hover {
            border-color: var(--color-primary);
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .quick-pick-label {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            font-size: 0.6875rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-primary);
            background: rgba(59, 130, 246, 0.1);
            padding: 0.25rem 0.5rem;
            border-radius: var(--radius-sm);
            width: fit-content;
        }

        .quick-pick-product {
            font-size: 1rem;
            font-weight: 600;
            color: var(--color-text);
            line-height: 1.3;
        }

        .quick-pick-reason {
            font-size: 0.8125rem;
            color: var(--color-text-secondary);
            line-height: 1.4;
        }

        @media (max-width: 600px) {
            .quick-picks-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Score Cards - Review/Rating displays */
        .score-cards {
            display: grid;
            gap: 1rem;
            margin: 1.5rem 0;
        }

        .score-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 1.25rem 1rem;
            border-radius: var(--radius-lg);
            text-align: center;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .score-card:hover {
            transform: translateY(-2px);
        }

        .score-card-platform {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.75rem;
            opacity: 0.9;
        }

        .score-platform-icon {
            width: 1.25rem;
            height: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .score-platform-icon svg {
            width: 100%;
            height: 100%;
        }

        .score-card-score {
            font-size: 2rem;
            font-weight: 800;
            line-height: 1;
            margin-bottom: 0.5rem;
        }

        .score-card-rating {
            font-size: 0.85rem;
            font-weight: 500;
            opacity: 0.9;
        }

        .score-card-extra {
            font-size: 0.75rem;
            opacity: 0.7;
            margin-top: 0.5rem;
        }

        /* Score Card Colors */
        .score-card.score-excellent {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
            border: 1px solid rgba(34, 197, 94, 0.3);
            color: #22c55e;
        }

        .score-card.score-excellent .score-card-score {
            color: #16a34a;
        }

        .score-card.score-good {
            background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(34, 197, 94, 0.1));
            border: 1px solid rgba(74, 222, 128, 0.3);
            color: #4ade80;
        }

        .score-card.score-good .score-card-score {
            color: #22c55e;
        }

        .score-card.score-mixed {
            background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(234, 179, 8, 0.1));
            border: 1px solid rgba(234, 179, 8, 0.3);
            color: #ca8a04;
        }

        .score-card.score-mixed .score-card-score {
            color: #eab308;
        }

        .score-card.score-poor {
            background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(249, 115, 22, 0.1));
            border: 1px solid rgba(249, 115, 22, 0.3);
            color: #ea580c;
        }

        .score-card.score-poor .score-card-score {
            color: #f97316;
        }

        .score-card.score-bad {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #dc2626;
        }

        .score-card.score-bad .score-card-score {
            color: #ef4444;
        }

        /* Smart grid layouts based on card count */

        /* 1 card - centered, max width */
        .score-cards-1 {
            grid-template-columns: minmax(200px, 300px);
            justify-content: center;
        }

        /* 2 cards - side by side */
        .score-cards-2 {
            grid-template-columns: repeat(2, 1fr);
        }

        /* 3 cards - all in one row */
        .score-cards-3 {
            grid-template-columns: repeat(3, 1fr);
        }

        /* 4 cards - 2x2 grid or 4 in a row on wide screens */
        .score-cards-4 {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (min-width: 800px) {
            .score-cards-4 {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        /* 5 cards - 3 on top, 2 stretched below (using 6-column grid) */
        .score-cards-5 {
            grid-template-columns: repeat(6, 1fr);
            gap: 0.75rem;
        }

        .score-cards-5 .score-card {
            grid-column: span 2; /* Each card spans 2 of 6 columns = 3 cards per row */
        }

        .score-cards-5 .score-card:nth-child(4),
        .score-cards-5 .score-card:nth-child(5) {
            grid-column: span 3; /* Last 2 cards span 3 columns each = fills the row */
        }

        .score-cards-5 .score-card {
            padding: 1rem 0.75rem;
        }

        .score-cards-5 .score-card-score {
            font-size: 1.5rem;
        }

        .score-cards-5 .score-card-platform {
            font-size: 0.7rem;
        }

        /* 6 cards - 3x2 grid on all screens */
        .score-cards-6 {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (min-width: 600px) {
            .score-cards-6 {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (min-width: 900px) {
            .score-cards-6 {
                grid-template-columns: repeat(3, 1fr);
            }
            .score-cards-6 .score-card {
                padding: 1rem 0.75rem;
            }
            .score-cards-6 .score-card-score {
                font-size: 1.75rem;
            }
            .score-cards-6 .score-card-platform {
                font-size: 0.8rem;
            }
        }

        /* 7+ cards - compact auto-fit */
        .score-cards-7, .score-cards-8, .score-cards-9, .score-cards-10 {
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 0.5rem;
        }

        .score-cards-7 .score-card, .score-cards-8 .score-card,
        .score-cards-9 .score-card, .score-cards-10 .score-card {
            padding: 0.75rem 0.5rem;
        }

        .score-cards-7 .score-card-platform, .score-cards-8 .score-card-platform,
        .score-cards-9 .score-card-platform, .score-cards-10 .score-card-platform {
            font-size: 0.65rem;
            margin-bottom: 0.4rem;
            gap: 0.25rem;
        }

        .score-cards-7 .score-platform-icon, .score-cards-8 .score-platform-icon,
        .score-cards-9 .score-platform-icon, .score-cards-10 .score-platform-icon {
            width: 1rem;
            height: 1rem;
        }

        .score-cards-7 .score-card-score, .score-cards-8 .score-card-score,
        .score-cards-9 .score-card-score, .score-cards-10 .score-card-score {
            font-size: 1.25rem;
            margin-bottom: 0.25rem;
        }

        .score-cards-7 .score-card-rating, .score-cards-8 .score-card-rating,
        .score-cards-9 .score-card-rating, .score-cards-10 .score-card-rating {
            font-size: 0.7rem;
        }

        .score-cards-7 .score-card-extra, .score-cards-8 .score-card-extra,
        .score-cards-9 .score-card-extra, .score-cards-10 .score-card-extra {
            font-size: 0.65rem;
            margin-top: 0.25rem;
        }

        /* Mobile responsive - stack on small screens */
        @media (max-width: 480px) {
            .score-cards-2, .score-cards-3, .score-cards-4 {
                grid-template-columns: repeat(2, 1fr);
            }

            .score-cards-5 {
                grid-template-columns: repeat(2, 1fr);
            }

            .score-cards-5 .score-card {
                grid-column: span 1;
            }

            .score-cards-5 .score-card:nth-child(5) {
                grid-column: span 2; /* Last card spans full width */
            }

            .score-cards-6 {
                grid-template-columns: repeat(2, 1fr);
            }

            .score-card {
                padding: 1rem 0.75rem;
            }

            .score-card-score {
                font-size: 1.5rem;
            }
        }

        /* 404 Page */
        .error-page {
            text-align: center;
            padding: 4rem 1rem;
        }

        .error-code {
            font-size: 8rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1;
            margin-bottom: 1rem;
        }

        .error-page h1 {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: var(--color-text);
        }

        .error-page p {
            font-size: 1.125rem;
            color: var(--color-text-secondary);
            margin-bottom: 2rem;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
            color: white;
            font-weight: 600;
            font-size: 0.9375rem;
            border-radius: var(--radius-md);
            transition: all 0.2s ease;
            border: none;
            cursor: pointer;
        }

        .btn:hover {
            color: white;
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 4rem 2rem;
            color: var(--color-text-secondary);
        }

        .empty-state-icon {
            font-size: 4rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        .empty-state h3 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--color-text);
            margin-bottom: 0.5rem;
        }

        /* Utility Classes */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        .animate-fade-in-up {
            animation: fadeInUp 0.6s ease-out forwards;
        }

        .animate-fade-in {
            animation: fadeIn 0.4s ease-out forwards;
        }

        .hero {
            animation: fadeInUp 0.6s ease-out;
        }

        .featured-article {
            animation: fadeInUp 0.6s ease-out 0.1s backwards;
        }

        .article-card {
            animation: fadeInUp 0.5s ease-out backwards;
        }

        .article-card:nth-child(1) { animation-delay: 0.1s; }
        .article-card:nth-child(2) { animation-delay: 0.15s; }
        .article-card:nth-child(3) { animation-delay: 0.2s; }
        .article-card:nth-child(4) { animation-delay: 0.25s; }
        .article-card:nth-child(5) { animation-delay: 0.3s; }
        .article-card:nth-child(6) { animation-delay: 0.35s; }

        /* Enhanced Card Hover Effects */
        .article-card-gradient {
            transition: transform 0.4s ease;
        }

        .article-card:hover .article-card-gradient {
            transform: scale(1.05);
        }

        .featured-article-gradient {
            transition: transform 0.4s ease;
        }

        .featured-article:hover .featured-article-gradient {
            transform: scale(1.02);
        }

        /* Newsletter Section */
        .newsletter-section {
            background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
            border-radius: var(--radius-xl);
            padding: 3rem 2rem;
            text-align: center;
            margin-top: 4rem;
            position: relative;
            overflow: hidden;
        }

        .newsletter-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
            opacity: 0.5;
        }

        .newsletter-content {
            position: relative;
            z-index: 1;
        }

        .newsletter-section h2 {
            color: white;
            font-size: 1.75rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
        }

        .newsletter-section p {
            color: rgba(255, 255, 255, 0.9);
            font-size: 1.0625rem;
            margin-bottom: 1.5rem;
            max-width: 500px;
            margin-left: auto;
            margin-right: auto;
        }

        .newsletter-form {
            display: flex;
            gap: 0.75rem;
            max-width: 440px;
            margin: 0 auto;
        }

        @media (max-width: 520px) {
            .newsletter-form {
                flex-direction: column;
            }
        }

        .newsletter-input {
            flex: 1;
            padding: 0.875rem 1.25rem;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: var(--radius-md);
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 1rem;
            font-family: inherit;
            backdrop-filter: blur(4px);
            transition: all 0.2s ease;
        }

        .newsletter-input::placeholder {
            color: rgba(255, 255, 255, 0.6);
        }

        .newsletter-input:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.15);
        }

        .newsletter-btn {
            padding: 0.875rem 1.75rem;
            background: white;
            color: var(--color-primary);
            font-weight: 600;
            font-size: 1rem;
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .newsletter-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* Stats Bar */
        .stats-bar {
            display: flex;
            justify-content: center;
            gap: 3rem;
            padding: 2rem 0;
            margin-bottom: 1rem;
        }

        @media (max-width: 600px) {
            .stats-bar {
                gap: 1.5rem;
                flex-wrap: wrap;
            }
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
        }

        .stat-label {
            font-size: 0.875rem;
            color: var(--color-text-muted);
            font-weight: 500;
        }

        /* Decorative Elements */
        .decoration-grid {
            position: absolute;
            width: 200px;
            height: 200px;
            background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.5;
            pointer-events: none;
        }

        /* Scroll to Top */
        .scroll-top {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 44px;
            height: 44px;
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--color-text-secondary);
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            box-shadow: var(--shadow-md);
            z-index: 50;
        }

        .scroll-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .scroll-top:hover {
            border-color: var(--color-primary);
            color: var(--color-primary);
            transform: translateY(-2px);
        }

        /* Loading skeleton */
        .skeleton {
            background: linear-gradient(90deg, var(--color-bg-secondary) 25%, var(--color-bg-tertiary) 50%, var(--color-bg-secondary) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: var(--radius-md);
        }

        /* Category Navigation */
        .category-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 2rem;
            padding: 0.75rem;
            background: var(--color-bg-secondary);
            border-radius: var(--radius-lg);
            border: 1px solid var(--color-border);
        }

        .category-nav-item {
            display: inline-flex;
            align-items: center;
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--color-text-secondary);
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
            transition: all 0.2s ease;
            text-decoration: none;
        }

        .category-nav-item:hover {
            color: var(--color-text);
            border-color: var(--category-color, var(--color-primary));
            background: var(--color-bg);
        }

        .category-nav-item.active {
            color: white;
            background: var(--category-color, var(--color-primary));
            border-color: var(--category-color, var(--color-primary));
        }

        /* Category Header (when viewing a category) */
        .category-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 2rem;
            padding: 1.5rem;
            background: var(--color-bg-secondary);
            border-radius: var(--radius-lg);
            border: 1px solid var(--color-border);
        }

        .category-color-indicator {
            width: 6px;
            height: 100%;
            min-height: 50px;
            border-radius: var(--radius-sm);
            flex-shrink: 0;
        }

        .category-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--color-text);
            margin: 0;
        }

        .category-description {
            font-size: 0.9375rem;
            color: var(--color-text-secondary);
            margin: 0.25rem 0 0;
        }

        /* Category Badge on Article Cards */
        .article-category-badge {
            display: inline-block;
            padding: 0.25rem 0.625rem;
            font-size: 0.75rem;
            font-weight: 500;
            color: white;
            border-radius: var(--radius-sm);
            margin-bottom: 0.5rem;
            text-decoration: none;
        }

        .article-category-badge:hover {
            text-decoration: underline;
            color: white;
        }

        /* Smooth scroll for anchor navigation */
        html {
            scroll-behavior: smooth;
        }

        /* Nav link active state for anchor sections */
        .nav-link-section {
            position: relative;
        }

        .nav-link-section.active {
            color: var(--color-primary);
        }

        /* ============================================
           PRINT STYLES
           ============================================ */
        @media print {
            /* Reset colors for print */
            :root {
                --color-bg: #ffffff;
                --color-text: #000000;
                --color-text-secondary: #333333;
            }

            /* Hide non-essential elements */
            .site-header,
            .skip-link,
            .nav-toggle,
            .nav-links,
            .nav-overlay,
            .theme-toggle,
            .scroll-top,
            .reading-progress,
            .post-sidebar,
            .post-summary,
            .post-footer,
            .more-articles,
            .newsletter-section,
            .ed-newsletter,
            .ed-show-more,
            footer,
            .site-footer {
                display: none !important;
            }

            /* Full width content */
            body {
                background: white;
                color: black;
                font-size: 12pt;
                line-height: 1.5;
            }

            .main-content,
            .post-layout,
            .post-main {
                max-width: 100% !important;
                width: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            /* Article content optimization */
            .post-content {
                font-size: 11pt;
                line-height: 1.6;
            }

            .post-content h2 {
                font-size: 14pt;
                margin-top: 1.5em;
                page-break-after: avoid;
            }

            .post-content h3 {
                font-size: 12pt;
                page-break-after: avoid;
            }

            .post-content img {
                max-width: 100% !important;
                page-break-inside: avoid;
            }

            .post-content pre,
            .post-content code {
                background: #f5f5f5 !important;
                border: 1px solid #ddd !important;
                font-size: 9pt;
            }

            .post-content blockquote {
                border-left: 3px solid #333;
                padding-left: 1em;
                margin-left: 0;
            }

            /* Hero section for print */
            .post-hero-image,
            .post-hero-gradient {
                border-radius: 0;
                box-shadow: none;
            }

            .post-hero-overlay {
                position: relative;
                background: none;
                padding: 1em 0;
            }

            .post-hero-overlay h1 {
                color: black;
                font-size: 18pt;
            }

            /* Links */
            a {
                color: black;
                text-decoration: underline;
            }

            /* Show URLs after links */
            .post-content a[href^="http"]::after {
                content: " (" attr(href) ")";
                font-size: 9pt;
                color: #666;
            }

            /* Page breaks */
            h2, h3 {
                page-break-after: avoid;
            }

            p, li {
                orphans: 3;
                widows: 3;
            }

            /* Print header */
            @page {
                margin: 2cm;
            }
        }

/* PWA Styles */
    .pwa-offline-banner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: #f59e0b;
        color: #000;
        font-size: 0.8125rem;
        font-weight: 600;
        text-align: center;
    }
    .pwa-install-banner {
        position: fixed;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.875rem 1.25rem;
        background: var(--color-bg, #fff);
        border: 1px solid var(--color-border, #e5e7eb);
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        max-width: 400px;
        width: calc(100% - 2rem);
    }
    .pwa-install-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }
    .pwa-install-content strong {
        font-size: 0.9375rem;
        color: var(--color-text, #111);
    }
    .pwa-install-content span {
        font-size: 0.8125rem;
        color: var(--color-text-muted, #6b7280);
    }
    .pwa-install-btn {
        padding: 0.5rem 1rem;
        background: var(--color-primary, #6366f1);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.875rem;
        cursor: pointer;
        white-space: nowrap;
    }
    .pwa-install-dismiss {
        background: none;
        border: none;
        font-size: 1.25rem;
        color: var(--color-text-muted, #6b7280);
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }
