/* =============================================
   Matrix Theme - Stylistic Variant
   Green on Black with Matrix Code Aesthetic
   ============================================= */

/* Smooth Transitions for Theme Switching */
body {
    transition: background-color 0.5s ease, color 0.3s ease;
}

body * {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Matrix Theme Variables Override */
body.theme-matrix {
    --primary-dark: #000000;
    --primary-light: #001a00;
    --accent-blue: #00ff00;
    --accent-purple: #00dd00;
    --accent-cyan: #00ffaa;
    --text-primary: #00ff00;
    --text-secondary: #00dd00;
    --border-color: rgba(0, 255, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 255, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 255, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 255, 0, 0.2);
    --shadow-xl: 0 20px 40px rgba(0, 255, 0, 0.3);
}

/* Matrix Background Effect */
body.theme-matrix {
    background: #000000;
    position: relative;
    overflow-x: hidden;
}

body.theme-matrix::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 0, 0.02) 25%, rgba(0, 255, 0, 0.02) 26%, transparent 27%, transparent 74%, rgba(0, 255, 0, 0.02) 75%, rgba(0, 255, 0, 0.02) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 0, 0.02) 25%, rgba(0, 255, 0, 0.02) 26%, transparent 27%, transparent 74%, rgba(0, 255, 0, 0.02) 75%, rgba(0, 255, 0, 0.02) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: matrix-grid-scroll 20s linear infinite;
}

@keyframes matrix-grid-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Matrix Rain Canvas */
body.theme-matrix #matrix-rain {
    display: block !important;
}

#matrix-rain {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
}

/* Ensure content is above canvas */
body.theme-matrix > *:not(#header-container) {
    position: relative;
    z-index: 1;
}

/* Keep header container at high z-index */
body.theme-matrix > #header-container {
    position: relative;
    z-index: 99999;
}

/* Matrix Text Glow Effects */
body.theme-matrix h1,
body.theme-matrix h2,
body.theme-matrix h3,
body.theme-matrix .project-title,
body.theme-matrix .blog-title {
    text-shadow: 
        0 0 10px rgba(0, 255, 0, 0.6),
        0 0 20px rgba(0, 255, 0, 0.4),
        0 0 30px rgba(0, 255, 0, 0.2);
    color: #00ff00 !important;
}

body.theme-matrix p,
body.theme-matrix .blog-description,
body.theme-matrix .project-tags,
body.theme-matrix .hero-subtitle,
body.theme-matrix .hero-description,
body.theme-matrix .scroll-text {
    color: #00dd00 !important;
}

body.theme-matrix .scroll-arrow {
    color: #00ff00 !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Matrix Card Styling */
body.theme-matrix .project-card,
body.theme-matrix .blog-card {
    background: rgba(0, 26, 0, 0.8) !important;
    border: 1px solid rgba(0, 255, 0, 0.3) !important;
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.1),
        inset 0 0 20px rgba(0, 255, 0, 0.02) !important;
}

body.theme-matrix .project-card:hover,
body.theme-matrix .blog-card:hover {
    border-color: rgba(0, 255, 0, 0.6) !important;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 30px rgba(0, 255, 0, 0.04) !important;
    transform: translateY(-8px) !important;
}

/* Matrix Tag Styling — keep Matrix colors but inherit unified sizing/anchor */
body.theme-matrix .project-tags span,
body.theme-matrix .tech-badge,
body.theme-matrix .blog-tag {
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: rgba(0, 255, 0, 0.4) !important;
    color: #00ff00 !important;
}

/* Ensure provider badges remain the same shape/size and stay anchored inside cards */
body.theme-matrix .provider-badge {
    background: rgba(0, 255, 0, 0.06) !important;
    border-color: rgba(0, 255, 0, 0.18) !important;
    color: #00ff00 !important;
}

body.theme-matrix .project-card .provider-badge,
body.theme-matrix .blog-card .provider-badge {
    margin-left: auto !important;
    order: 99 !important;
    height: var(--badge-height) !important;
    min-width: var(--badge-height) !important;
    align-self: center !important;
    flex: 0 0 auto !important;
}

/* Matrix: force anchoring with higher specificity to prevent accidental overrides */
body.theme-matrix .project-card > .project-info .project-tags > .provider-badge,
body.theme-matrix .project-card .project-tags > .provider-badge,
body.theme-matrix .blog-card .blog-tags > .provider-badge {
    order: 999 !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
    align-self: center !important;
}

/* Matrix — desktop: absolute anchor to match Professional theme layout */
@media (min-width: 640px) {
    body.theme-matrix .project-card, body.theme-matrix .blog-card { position: relative; }

    /* authoritative anchored-class for Matrix */
    body.theme-matrix .project-card .provider-badge--anchored,
    body.theme-matrix .blog-card .provider-badge--anchored {
        position: absolute !important;
        right: 1rem !important;
        bottom: 1.05rem !important;
        margin-left: 0 !important;
        box-shadow: 0 8px 22px rgba(0,255,0,0.06) !important;
    }

    body.theme-matrix .project-card .project-tags,
    body.theme-matrix .blog-card .blog-tags { padding-right: 6.5rem !important; }
}

@media (max-width: 639px) {
    body.theme-matrix .project-card .project-tags,
    body.theme-matrix .blog-card .blog-tags { padding-right: 0.5rem !important; }
    body.theme-matrix .project-card .provider-badge,
    body.theme-matrix .blog-card .provider-badge { position: static !important; flex-basis: 100% !important; justify-content: flex-end !important; }
}

body.theme-matrix .provider-badge .tag-icon { width: var(--badge-icon-size) !important; height: var(--badge-icon-size) !important; display: inline-block !important; visibility: visible !important; }

/* Explicit override for provider badges in Matrix theme to counter broader hiding rules */
body.theme-matrix .provider-badge svg.tag-icon[viewBox="0 0 16 16"],
body.theme-matrix .provider-badge svg.tag-icon {
    display: inline-block !important;
    visibility: visible !important;
    width: var(--badge-icon-size) !important;
    height: var(--badge-icon-size) !important;
    margin-right: 0.5rem !important;
}
body.theme-matrix .provider-badge .tag-icon path { fill: currentColor !important; display: inline !important; }

/* Mobile: ensure provider badge moves to its own right-aligned row when tags wrap */
@media (max-width:520px) {
    body.theme-matrix .project-tags .provider-badge,
    body.theme-matrix .blog-tags .provider-badge {
        order: 99 !important;
        flex-basis: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
        padding-right: 0.6rem !important;
    }
}

/* Hide default tag icon (angle brackets) */
body.theme-matrix .tag-icon[viewBox="0 0 16 16"] path[d^="M6.5"],
.tag-icon[viewBox="0 0 16 16"] path[d^="M6.5"] {
    display: none !important;
}

body.theme-matrix .tag-icon[viewBox="0 0 16 16"],
.tag-icon[viewBox="0 0 16 16"] {
    width: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
}

body.theme-matrix .project-tags span:hover,
body.theme-matrix .tech-badge:hover,
body.theme-matrix .blog-tag:hover {
    background: rgba(0, 255, 0, 0.2) !important;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3) !important;
}

/* Matrix Blog Card Metadata */
body.theme-matrix .blog-meta,
body.theme-matrix .blog-date,
body.theme-matrix .blog-read-time {
    color: #00dd00 !important;
    border-color: rgba(0, 255, 0, 0.4) !important;
}

body.theme-matrix .blog-read-time {
    background: rgba(0, 255, 0, 0.15) !important;
    border-color: rgba(0, 255, 0, 0.5) !important;
}

/* Small blog cards */
body.theme-matrix .blog-card--small {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 20, 0, 0.85));
    border: 1px solid rgba(0, 255, 0, 0.3);
}

body.theme-matrix .blog-card--small::before {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08), rgba(0, 200, 0, 0.04));
}

body.theme-matrix .blog-card--small:hover {
    border-color: rgba(0, 255, 0, 0.6);
    box-shadow: 0 12px 24px rgba(0, 255, 0, 0.15), 0 0 20px rgba(0, 255, 0, 0.1);
}

body.theme-matrix .blog-card--small .blog-title {
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

body.theme-matrix .blog-card--small:hover .blog-title {
    color: #00ff00;
    text-shadow: 0 0 12px rgba(0, 255, 0, 0.6);
}

body.theme-matrix .blog-card--small .blog-excerpt--small {
    color: rgba(0, 255, 0, 0.7);
}

body.theme-matrix .blog-card--small .blog-meta {
    color: rgba(0, 255, 0, 0.6);
}

body.theme-matrix .blog-older-section .section-header h3 {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

body.theme-matrix .blog-excerpt,
body.theme-matrix .project-description {
    color: #00dd00 !important;
}

body.theme-matrix .section-header p {
    color: #00dd00 !important;
}

/* Matrix Footer Styling */
body.theme-matrix .footer {
    background: rgba(0, 0, 0, 0.98) !important;
    border-top-color: rgba(0, 255, 0, 0.3) !important;
}

body.theme-matrix .footer-content h2 {
    background: linear-gradient(135deg, #00ff00, #00ffaa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

body.theme-matrix .footer-content p {
    color: #00dd00 !important;
}

body.theme-matrix .footer-link {
    color: #00ff00 !important;
}

body.theme-matrix .footer-link::after {
    background: linear-gradient(90deg, #00ff00, #00ffaa) !important;
}

body.theme-matrix .footer-link:hover {
    color: #00ffaa !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

body.theme-matrix .footer-credit {
    color: #00dd00 !important;
    border-top-color: rgba(0, 255, 0, 0.3) !important;
}

/* Matrix Scroll Indicator */
body.theme-matrix .scroll-indicator {
    border-color: rgba(0, 255, 0, 0.3) !important;
}

body.theme-matrix .scroll-text {
    color: #00dd00 !important;
}

body.theme-matrix .scroll-arrow {
    color: #00ff00 !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Matrix Loading States */
body.theme-matrix .blog-loader {
    background: rgba(0, 26, 0, 0.6) !important;
}

body.theme-matrix .blog-loader p {
    color: #00dd00 !important;
}

body.theme-matrix .spinner {
    border-color: rgba(0, 255, 0, 0.2) !important;
    border-top-color: #00ff00 !important;
}

body.theme-matrix .skeleton-card {
    background: rgba(0, 26, 0, 0.6) !important;
    border-color: rgba(0, 255, 0, 0.2) !important;
}

body.theme-matrix .skeleton-image,
body.theme-matrix .skeleton-line {
    background: linear-gradient(
        90deg,
        rgba(0, 255, 0, 0.05) 25%,
        rgba(0, 255, 0, 0.15) 50%,
        rgba(0, 255, 0, 0.05) 75%
    ) !important;
    background-size: 200% 100% !important;
}

/* Matrix Theme Toggle Button */
body.theme-matrix .theme-toggle {
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: rgba(0, 255, 0, 0.4) !important;
    color: #00ff00 !important;
}

body.theme-matrix .theme-toggle:hover {
    background: rgba(0, 255, 0, 0.2) !important;
    border-color: #00ff00 !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4) !important;
}

body.theme-matrix .theme-icon {
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.5));
}

/* Matrix Logo */
body.theme-matrix .logo-icon {
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.5));
}

body.theme-matrix .logo:hover .logo-text,
body.theme-matrix .logo:hover .logo-icon {
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
    filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.6));
}

/* Matrix Blog CTA */
body.theme-matrix .blog-cta {
    border-top-color: rgba(0, 255, 0, 0.3) !important;
}

/* Matrix Provider Badges */
body.theme-matrix .provider-badge {
    background: rgba(0, 255, 0, 0.08) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
    color: #00ff00 !important;
}

/* Matrix Icon Legend */
body.theme-matrix .icon-legend-toggle {
    border-color: rgba(0, 255, 0, 0.3) !important;
    color: #00dd00 !important;
}

body.theme-matrix .icon-legend-toggle:hover {
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: #00ff00 !important;
    color: #00ff00 !important;
}

body.theme-matrix .icon-legend-panel {
    background: rgba(0, 0, 0, 0.95) !important;
    border-color: rgba(0, 255, 0, 0.4) !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2) !important;
}

body.theme-matrix .icon-legend-item {
    color: #00dd00 !important;
}

body.theme-matrix .icon-legend-label {
    color: #00ff00 !important;
}

body.theme-matrix .icon-legend-note {
    color: #00dd00 !important;
}

/* Matrix Hero Enhancements */
body.theme-matrix .hero-title {
    text-shadow: 
        0 0 10px rgba(0, 255, 0, 0.6),
        0 0 20px rgba(0, 255, 0, 0.4),
        0 0 30px rgba(0, 255, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

body.theme-matrix .hero-subtitle,
body.theme-matrix .hero-description {
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

/* Matrix Warning/Alert Banner */
body.theme-matrix .blog-placeholder-warning {
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.08), rgba(0, 255, 0, 0.03)) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
    color: #00dd00 !important;
}

body.theme-matrix .blog-placeholder-warning .btn-link {
    color: #00ff00 !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

body.theme-matrix .blog-placeholder-warning .btn-link:hover {
    color: #00ffaa !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Matrix Nav Container */
body.theme-matrix .nav-container {
    border-bottom-color: rgba(0, 255, 0, 0.2) !important;
}

/* Matrix Section Background */
body.theme-matrix .projects-section,
body.theme-matrix .blog-section {
    background: transparent !important;
}

/* Matrix Tools Section */
body.theme-matrix .tools-section {
    background: rgba(0, 26, 0, 0.6) !important;
    border-top: 1px solid rgba(0, 255, 0, 0.2) !important;
}

body.theme-matrix .tools-loader {
    color: #00dd00 !important;
}

body.theme-matrix .tool-card {
    background: rgba(0, 26, 0, 0.75) !important;
    border: 1px solid rgba(0, 255, 0, 0.35) !important;
    color: #00ff00 !important;
}

body.theme-matrix .tool-card::before {
    background: linear-gradient(90deg, #00ff00, #00ffaa) !important;
}

body.theme-matrix .tool-card:hover {
    border-color: rgba(0, 255, 0, 0.65) !important;
    box-shadow: 0 10px 35px rgba(0, 255, 0, 0.25) !important;
}

body.theme-matrix .tool-title {
    color: #00ff00 !important;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.35);
}

body.theme-matrix .tool-card:hover .tool-title {
    color: #00ffaa !important;
}

body.theme-matrix .tool-description,
body.theme-matrix .tool-body-preview {
    color: #00cc88 !important;
}

body.theme-matrix .tool-category {
    background: rgba(0, 255, 0, 0.12) !important;
    color: #00ff00 !important;
    border: 1px solid rgba(0, 255, 0, 0.35) !important;
}

body.theme-matrix .tool-type {
    background: rgba(0, 255, 170, 0.12) !important;
    color: #00ffaa !important;
    border: 1px solid rgba(0, 255, 170, 0.35) !important;
}

body.theme-matrix .tool-badge {
    background: rgba(0, 255, 0, 0.18) !important;
    color: #00ff00 !important;
    border: 1px solid rgba(0, 255, 0, 0.4) !important;
}

body.theme-matrix .tool-cta {
    border-top-color: rgba(0, 255, 0, 0.25) !important;
    color: #00ffaa !important;
}

body.theme-matrix .tool-card:hover .tool-cta {
    color: #00ff00 !important;
}

/* Matrix Load-More Controls */
body.theme-matrix .btn-load-more {
    background: linear-gradient(180deg, #00ff00, #00cc66) !important;
    color: #000000 !important;
    box-shadow: 0 8px 20px rgba(0, 255, 0, 0.25) !important;
}

body.theme-matrix .btn-load-more:focus {
    outline: 3px solid rgba(0, 255, 0, 0.35) !important;
}

body.theme-matrix .btn-load-more .btn-count {
    color: rgba(0, 0, 0, 0.85) !important;
}

body.theme-matrix .load-more-info {
    color: #00dd00 !important;
}

body.theme-matrix .load-more-spinner {
    border-color: rgba(0, 0, 0, 0.25) !important;
    border-top-color: #000000 !important;
}

/* Matrix Project/Blog Grid */
body.theme-matrix .projects-grid,
body.theme-matrix .blog-grid {
    position: relative;
    z-index: 1;
}

/* Matrix Text Selection */
body.theme-matrix ::selection {
    background: rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

body.theme-matrix ::-moz-selection {
    background: rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

/* Matrix Scrollbar */
body.theme-matrix::-webkit-scrollbar {
    width: 12px;
}

body.theme-matrix::-webkit-scrollbar-track {
    background: #000000;
}

body.theme-matrix::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
    border-radius: 6px;
}

body.theme-matrix::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.5);
}

/* Matrix Focus Styles for Accessibility */
body.theme-matrix *:focus-visible {
    outline: 2px solid #00ff00 !important;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5) !important;
}

/* Matrix Skip Link */
body.theme-matrix .skip-link {
    background: #00ff00 !important;
    color: #000000 !important;
    text-shadow: none !important;
    border: 2px solid #00ff00 !important;
}

body.theme-matrix .skip-link:focus {
    outline-color: #00ffaa !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6) !important;
}

/* Matrix Blog/Project Description Text */
body.theme-matrix .blog-description,
body.theme-matrix .project-description {
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.2);
}

/* Matrix Date/Meta Information */
body.theme-matrix .blog-date,
body.theme-matrix .blog-read-time,
body.theme-matrix .blog-meta span {
    color: #00dd00 !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.2);
}

/* Matrix Blog Excerpt */
body.theme-matrix .blog-excerpt {
    color: #00dd00 !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.1);
}

/* Matrix Project Tags */
body.theme-matrix .project-tag {
    background: rgba(0, 255, 0, 0.08) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
    color: #00ff00 !important;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.3);
}

body.theme-matrix .project-tag:hover {
    background: rgba(0, 255, 0, 0.15) !important;
    border-color: #00ff00 !important;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3) !important;
}

/* Matrix Project Info Section */
body.theme-matrix .project-info,
body.theme-matrix .blog-content {
    background: rgba(0, 26, 0, 0.8) !important;
}

/* Matrix Heading Gradients Override */
body.theme-matrix .section-header h2,
body.theme-matrix .footer-content h2 {
    color: #00ff00 !important;
    -webkit-text-fill-color: #00ff00 !important;
}

/* Matrix Hero Section */
body.theme-matrix .hero {
    background: transparent !important;
    z-index: 1 !important;
}

body.theme-matrix .hero-content {
    position: relative;
    z-index: auto;
}

/* Matrix Button Styling */
body.theme-matrix .cta-button,
body.theme-matrix .back-link,
body.theme-matrix button {
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: #00ff00 !important;
    color: #00ff00 !important;
}

body.theme-matrix .cta-button:hover,
body.theme-matrix .back-link:hover,
body.theme-matrix button:hover {
    background: rgba(0, 255, 0, 0.2) !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5) !important;
}

body.theme-matrix .cta-button:active,
body.theme-matrix button:active {
    background: rgba(0, 255, 0, 0.25) !important;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4) !important;
    transform: translateY(0) !important;
}

body.theme-matrix .cta-button.primary {
    background: #00ff00 !important;
    color: #000000 !important;
    text-shadow: none !important;
}

body.theme-matrix .cta-button.primary:hover {
    background: #00dd00 !important;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.7) !important;
}

/* Matrix Link Styling */
body.theme-matrix a {
    color: #00ff00 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

body.theme-matrix a:hover {
    color: #00ffaa !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Matrix Section Styling */
body.theme-matrix .section,
body.theme-matrix .extension-page,
body.theme-matrix section {
    background: rgba(0, 26, 0, 0.6) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
}

body.theme-matrix .section-title {
    border-bottom-color: #00ff00 !important;
    color: #00ff00 !important;
}

/* Matrix Image Borders */
body.theme-matrix .project-image,
body.theme-matrix .blog-image,
body.theme-matrix .tool-image,
body.theme-matrix .screenshot,
body.theme-matrix .extension-logo {
    border-color: rgba(0, 255, 0, 0.5) !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2) !important;
}

/* Matrix Green Filter on Blog/Project Images */
body.theme-matrix .blog-image img,
body.theme-matrix .project-image img,
body.theme-matrix .tool-image img {
    filter: sepia(100%) hue-rotate(50deg) saturate(300%) brightness(0.9) contrast(1.1) !important;
    transition: filter 0.3s ease;
}

body.theme-matrix .blog-card:hover .blog-image img,
body.theme-matrix .project-card:hover .project-image img,
body.theme-matrix .tool-card:hover .tool-image img {
    filter: sepia(100%) hue-rotate(50deg) saturate(350%) brightness(1) contrast(1.15) !important;
}

/* Matrix Navbar */
body.theme-matrix .navbar {
    background: rgba(0, 0, 0, 0.95) !important;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3) !important;
    backdrop-filter: blur(10px);
}

body.theme-matrix .nav-link {
    color: #00ff00 !important;
}

body.theme-matrix .nav-link:hover {
    color: #00ffaa !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

body.theme-matrix .nav-link::after {
    background: linear-gradient(90deg, #00ff00, #00ffaa) !important;
}

body.theme-matrix .nav-link:active {
    color: #00ff00 !important;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
}

body.theme-matrix .logo-text {
    color: #00ff00 !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}

/* Matrix Feature Cards */
body.theme-matrix .feature-card {
    background: rgba(0, 255, 0, 0.05) !important;
    border-color: rgba(0, 255, 0, 0.4) !important;
}

body.theme-matrix .feature-card:hover {
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: rgba(0, 255, 0, 0.7) !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3) !important;
}

/* Matrix Privacy Highlights */
body.theme-matrix .privacy-highlight {
    background: rgba(0, 255, 0, 0.1) !important;
    border-left-color: #00ff00 !important;
}

body.theme-matrix .privacy-section {
    background: rgba(0, 255, 0, 0.08) !important;
    border-color: rgba(0, 255, 0, 0.5) !important;
}

/* Matrix FAQ */
body.theme-matrix .faq-question {
    color: #00ff00 !important;
}

body.theme-matrix .faq-answer {
    color: #00dd00 !important;
}

body.theme-matrix .faq-item {
    border-bottom-color: rgba(0, 255, 0, 0.2) !important;
}

/* Matrix Scanline Effect */
body.theme-matrix::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 255, 0, 0.02) 50%
    );
    background-size: 100% 4px;
    pointer-events: none !important;
    z-index: 10;
    opacity: 0.3;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Matrix Floating Green Clouds/Blobs */
body.theme-matrix .floating-shape {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.4), rgba(0, 255, 0, 0.1), transparent) !important;
    filter: blur(60px) !important;
}

body.theme-matrix .shape-1 {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.5), rgba(0, 255, 0, 0.15), transparent) !important;
}

body.theme-matrix .shape-2 {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.45), rgba(0, 255, 0, 0.12), transparent) !important;
}

body.theme-matrix .shape-3 {
    background: radial-gradient(circle, rgba(0, 255, 0, 0.4), rgba(0, 255, 0, 0.1), transparent) !important;
}

/* Matrix Code Characters (decorative) */
body.theme-matrix .hero::before {
    content: '10011010 11001001 10110010 01010101 11100110';
    position: absolute;
    top: 20%;
    right: -10%;
    font-family: 'Space Mono', monospace;
    font-size: 0.8em;
    color: rgba(0, 255, 0, 0.1);
    letter-spacing: 0.3em;
    writing-mode: vertical-rl;
    animation: matrix-fade 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes matrix-fade {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Disable Matrix effects on small screens for performance */
@media (max-width: 768px) {
    body.theme-matrix::before,
    body.theme-matrix::after,
    body.theme-matrix #matrix-rain {
        display: none !important;
    }
}

/* Matrix Theme - Blog Post & Page Content */
body.theme-matrix .page .section-header h1 {
    background: none !important;
    -webkit-text-fill-color: #00ff00 !important;
    color: #00ff00 !important;
    text-shadow: 
        0 0 10px rgba(0, 255, 0, 0.6),
        0 0 20px rgba(0, 255, 0, 0.4),
        0 0 30px rgba(0, 255, 0, 0.2);
}

body.theme-matrix .page-content h2,
body.theme-matrix .page-content h3,
body.theme-matrix .page-content h4 {
    color: #00ff00 !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    border-color: rgba(0, 255, 0, 0.3) !important;
}

body.theme-matrix .page-content p,
body.theme-matrix .page-content li {
    color: #00dd00 !important;
}

body.theme-matrix .page-content a {
    color: #00ffaa !important;
    border-bottom-color: rgba(0, 255, 170, 0.3) !important;
}

body.theme-matrix .page-content a:hover {
    color: #00ff00 !important;
    border-bottom-color: #00ff00 !important;
}

body.theme-matrix .page-content code {
    background: rgba(0, 255, 0, 0.1) !important;
    color: #00ffaa !important;
}

body.theme-matrix .page-content pre {
    background: rgba(0, 26, 0, 0.6) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.1),
        inset 0 0 20px rgba(0, 255, 0, 0.02) !important;
}

body.theme-matrix .page-content blockquote {
    border-left-color: #00ff00 !important;
    background: rgba(0, 255, 0, 0.05) !important;
    color: #00dd00 !important;
}

body.theme-matrix .page-content strong,
body.theme-matrix .page-content b {
    color: #00ff00 !important;
}

body.theme-matrix .page-content table th {
    background: rgba(0, 255, 0, 0.1) !important;
    color: #00ff00 !important;
}

body.theme-matrix .page-content table td {
    border-color: rgba(0, 255, 0, 0.2) !important;
}

body.theme-matrix .page .section-header {
    border-bottom-color: rgba(0, 255, 0, 0.3) !important;
}

body.theme-matrix .blog-date {
    color: #00dd00 !important;
}

/* Matrix Theme - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    body.theme-matrix::before,
    body.theme-matrix::after {
        animation: none !important;
    }
    
    body.theme-matrix #matrix-rain {
        display: none !important;
    }
}
