/**
 * Bumbling Cyberpunk Matrix Theme - Main Design System
 */

/* -----------------------------------------------------------------
 * 1. DESIGN SYSTEM SYSTEM VARIABLES & DEFAULTS
 * -------------------------------------------------------------- */
:root {
    --bg-dark: #181b28;
    --bg-card: #222638;
    --bg-console: #1b1e2c;
    --text-primary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Neon Gas Glow Accents */
    --matrix-green: #00ff66;
    --matrix-green-glow: rgba(0, 255, 102, 0.35);
    
    /* Neon Blue/Green Crossover (Teal / Turquoise Highlight) */
    --cyber-cyan: #00ffcc; 
    --cyber-cyan-glow: rgba(0, 255, 204, 0.35);
    
    --cyber-magenta: #ff007f;
    --cyber-magenta-glow: rgba(255, 0, 127, 0.35);
    
    /* Crossover Gradient */
    --cyber-gradient: linear-gradient(135deg, var(--matrix-green) 0%, var(--cyber-cyan) 100%);
    
    /* Fonts */
    --font-display: 'Space Grotesk', 'Rajdhani', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Fira Code', 'Share Tech Mono', 'Courier New', Courier, monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Technical Grid Sizing */
    --grid-gap: 24px;
    --border-glow-width: 1px;
}

/* Base resets & theme foundations */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-primary);
    background-color: transparent;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border: 1px solid var(--matrix-green);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-green-glow);
}

/* Selection */
::selection {
    background: var(--matrix-green);
    color: var(--bg-dark);
    text-shadow: none;
}

/* Typographic Defaults */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #e2e8f0;
    letter-spacing: 0.05em;
}

a {
    color: var(--cyber-cyan);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
a:hover {
    color: var(--cyber-magenta);
    text-shadow: 0 0 6px var(--cyber-magenta-glow);
}

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

code, pre {
    font-family: var(--font-mono);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* -----------------------------------------------------------------
 * 2. OVERLAYS & CANVAS BACKGROUNDS
 * -------------------------------------------------------------- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    z-index: -1;
    opacity: 0.38;
    pointer-events: none;
    /* Soft vertical fade out gradient overlay at the bottom of the canvas */
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0) 100%);
}

/* CRT Scanline styling */
.crt-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    /* Removed horizontal lines, keeping only ultra-soft horizontal color-shift glow */
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.015), rgba(0, 255, 0, 0.005), rgba(0, 0, 255, 0.015));
    background-size: 6px 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.crt-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    background: radial-gradient(circle, transparent 70%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* CRT active body state */
body.crt-active .crt-scanlines {
    opacity: 0.35;
}
body.crt-active .crt-glow {
    opacity: 0.45;
}

body.crt-active {
    animation: crt-flicker 0.15s infinite;
}

@keyframes crt-flicker {
    0% { opacity: 0.992; }
    50% { opacity: 0.996; }
    100% { opacity: 0.992; }
}

/* -----------------------------------------------------------------
 * 3. GLOW EFFECTS & GENERAL TYPOGRAPHY
 * -------------------------------------------------------------- */
.text-glow-green {
    color: var(--matrix-green) !important;
    text-shadow: 0 0 5px var(--matrix-green-glow);
}
.text-glow-cyan {
    color: var(--cyber-cyan) !important;
    text-shadow: 0 0 5px var(--cyber-cyan-glow);
}
.text-glow-magenta {
    color: var(--cyber-magenta) !important;
    text-shadow: 0 0 5px var(--cyber-magenta-glow);
}

.blinking-fast {
    animation: blink 0.6s infinite steps(2, start);
}
.blinking-slow {
    animation: blink 1.5s infinite steps(2, start);
}

@keyframes blink {
    to { visibility: hidden; }
}

/* Glitch Typography effect */
.text-glitch {
    position: relative;
}
.text-glitch::before,
.text-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}
.text-glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--cyber-cyan);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.text-glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--cyber-magenta), 0 1px var(--cyber-cyan);
    clip: rect(85px, 450px, 140px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    10% { clip: rect(112px, 9999px, 76px, 0); }
    20% { clip: rect(85px, 9999px, 5px, 0); }
    30% { clip: rect(27px, 9999px, 115px, 0); }
    40% { clip: rect(73px, 9999px, 29px, 0); }
    50% { clip: rect(118px, 9999px, 142px, 0); }
    60% { clip: rect(9px, 9999px, 55px, 0); }
    70% { clip: rect(104px, 9999px, 92px, 0); }
    80% { clip: rect(42px, 9999px, 119px, 0); }
    90% { clip: rect(135px, 9999px, 63px, 0); }
    100% { clip: rect(15px, 9999px, 88px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(76px, 9999px, 116px, 0); }
    11% { clip: rect(23px, 9999px, 98px, 0); }
    22% { clip: rect(122px, 9999px, 14px, 0); }
    33% { clip: rect(54px, 9999px, 132px, 0); }
    44% { clip: rect(91px, 9999px, 44px, 0); }
    55% { clip: rect(5px, 9999px, 83px, 0); }
    66% { clip: rect(139px, 9999px, 102px, 0); }
    77% { clip: rect(48px, 9999px, 70px, 0); }
    88% { clip: rect(115px, 9999px, 127px, 0); }
    100% { clip: rect(29px, 9999px, 67px, 0); }
}

/* -----------------------------------------------------------------
 * 4. CYBER HUD & STATUS BAR (Top-Header)
 * -------------------------------------------------------------- */
.cyber-hud-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #030305;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    z-index: 100;
    position: relative;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-label {
    opacity: 0.5;
}

/* Mini cyber buttons */
.cyber-btn-mini {
    background: transparent;
    border: 1px solid var(--cyber-magenta);
    color: var(--cyber-magenta);
    padding: 2px 8px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    transition: all 0.2s ease;
}

.cyber-btn-mini:hover {
    background: var(--cyber-magenta-glow);
    box-shadow: 0 0 8px var(--cyber-magenta-glow);
}

.cyber-btn-mini.btn-disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
}
.cyber-btn-mini.btn-disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

/* -----------------------------------------------------------------
 * 5. HEADER, BRANDING & NAVIGATION
 * -------------------------------------------------------------- */
.site-header {
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 99;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-branding {
    flex: 1;
    min-width: 250px;
}

.site-title {
    font-size: 2.2rem;
    text-transform: uppercase;
    margin: 0;
    font-weight: 900;
}
.site-title a {
    color: #ffffff;
    letter-spacing: 0.1em;
}
.site-title a:hover {
    color: var(--matrix-green);
    text-shadow: 0 0 10px var(--matrix-green-glow);
}

.site-description {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin: 5px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cyber wire decorative divider */
.cyber-header-divider {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
}
.cyber-header-divider .line-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--matrix-green), var(--cyber-cyan), transparent);
    animation: line-slide 6s infinite linear;
}
@keyframes line-slide {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* Nav Menu */
.main-navigation {
    position: relative;
}

.primary-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.primary-menu-list a {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    padding: 10px 16px;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.primary-menu-list a::before {
    content: '[';
    margin-right: 5px;
    opacity: 0;
    color: var(--matrix-green);
    transition: opacity 0.2s ease;
}

.primary-menu-list a::after {
    content: ']';
    margin-left: 5px;
    opacity: 0;
    color: var(--matrix-green);
    transition: opacity 0.2s ease;
}

.primary-menu-list a:hover {
    color: var(--matrix-green);
    border: 1px solid var(--matrix-green);
    background: rgba(0, 255, 102, 0.05);
    box-shadow: 0 0 10px var(--matrix-green-glow);
}

.primary-menu-list a:hover::before,
.primary-menu-list a:hover::after {
    opacity: 1;
}

.primary-menu-list .current-menu-item a {
    border: 1px solid var(--cyber-cyan);
    color: var(--cyber-cyan);
    background: rgba(0, 255, 204, 0.05);
    box-shadow: 0 0 10px var(--cyber-cyan-glow);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
}

/* -----------------------------------------------------------------
 * 6. CORE GRID WRAPPER
 * -------------------------------------------------------------- */
.site-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-gap);
}

@media (min-width: 992px) {
    .grid-layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* -----------------------------------------------------------------
 * 7. CYBER CARD POST LISTINGS
 * -------------------------------------------------------------- */
.cyber-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.deck-main-header {
    margin-bottom: 25px;
    position: relative;
}
.deck-main-header .section-title {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.deck-main-header .prompt-prefix {
    opacity: 0.6;
}
.title-bar-glow {
    height: 1px;
    background: linear-gradient(90deg, var(--matrix-green), transparent);
    box-shadow: 0 0 5px var(--matrix-green);
}

.cyber-post-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Slashed Corner aesthetics using clip path */
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.cyber-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-left: 2px solid var(--matrix-green);
    pointer-events: none;
    opacity: 0.5;
}

/* Corner decorations */
.cyber-corner-tr {
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    border-top: 1px solid var(--cyber-cyan);
    border-right: 1px solid var(--cyber-cyan);
    pointer-events: none;
}
.cyber-corner-bl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 15px;
    height: 15px;
    border-bottom: 1px solid var(--cyber-magenta);
    border-left: 1px solid var(--cyber-magenta);
    pointer-events: none;
}

.cyber-post-card:hover {
    transform: translateY(-4px);
    border-color: var(--matrix-green);
    box-shadow: 0 10px 25px rgba(0, 255, 102, 0.15);
}

.cyber-post-card:hover .cyber-corner-tr {
    border-color: var(--matrix-green);
    transform: scale(1.1);
}
.cyber-post-card:hover .cyber-corner-bl {
    border-color: var(--matrix-green);
    transform: scale(1.1);
}

/* Header Meta & Categories */
.post-categories {
    margin-bottom: 12px;
}
.post-categories a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    background: rgba(0, 255, 204, 0.1);
    color: var(--cyber-cyan);
    border: 1px solid var(--cyber-cyan);
    padding: 3px 10px;
    margin-right: 6px;
    display: inline-block;
    transition: all 0.2s ease;
}
.post-categories a:hover {
    background: var(--cyber-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 8px var(--cyber-cyan-glow);
}

.entry-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
}
.entry-title a {
    color: #ffffff;
}
.entry-title a:hover {
    color: var(--matrix-green);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    margin-bottom: 20px;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

.meta-value {
    color: #ffffff;
}

/* Post Thumbnails */
.post-thumbnail-container {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.cyber-glitch-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 350px;
    filter: sepia(0.3) hue-rotate(90deg) brightness(0.85); /* Matrix green filter */
    transition: all 0.4s ease;
}

.cyber-post-card:hover .cyber-glitch-image {
    filter: none;
    transform: scale(1.02);
}

.thumbnail-neon-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--cyber-cyan);
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0, 255, 204, 0.1);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}
.cyber-post-card:hover .thumbnail-neon-border {
    opacity: 0.7;
    border-color: var(--matrix-green);
    box-shadow: inset 0 0 15px rgba(0, 255, 102, 0.2);
}

.entry-summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Entry footer */
.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.post-tags-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
}
.tags-label {
    opacity: 0.5;
}
.tag-chip {
    color: var(--text-muted);
}
.tag-chip a {
    color: var(--text-primary);
}
.tag-chip a:hover {
    color: var(--cyber-magenta);
}

/* Custom Cyber Buttons */
.cyber-btn {
    background: transparent;
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    padding: 10px 24px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.cyber-btn-small {
    padding: 8px 18px;
    font-size: 0.75rem;
}

.cyber-btn:hover {
    background: var(--cyber-gradient);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--cyber-cyan-glow);
    border-color: transparent;
}

/* -----------------------------------------------------------------
 * 8. SINGLE POST TEMPLATE STYLING
 * -------------------------------------------------------------- */
#read-progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
}
#read-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--matrix-green);
    box-shadow: 0 0 8px var(--matrix-green);
    transition: width 0.1s ease;
}

.cyber-single-post {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.single-header {
    margin-bottom: 30px;
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 15px;
}

.single-title {
    font-size: 2.5rem;
    font-weight: 900;
}

.header-laser-line {
    height: 2px;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-magenta), transparent);
    box-shadow: 0 0 6px var(--cyber-cyan-glow);
    margin-top: 15px;
}

.single-post-thumbnail {
    position: relative;
    margin-bottom: 35px;
    border: 1px solid rgba(255,255,255,0.05);
}
.single-post-thumbnail img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

/* Rich text structure within article */
.entry-content {
    font-size: 1.12rem;
    line-height: 1.85;
}
.entry-content p {
    margin-bottom: 1.5em;
    color: var(--text-primary);
}

.entry-content blockquote {
    border-left: 3px solid var(--cyber-magenta);
    background: rgba(255, 0, 127, 0.03);
    margin: 30px 0;
    padding: 20px 30px;
    font-style: italic;
    color: #ffffff;
    box-shadow: inset 0 0 10px rgba(255, 0, 127, 0.05);
}
.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content pre {
    background: var(--bg-dark);
    border: 1px solid rgba(0, 255, 102, 0.2);
    padding: 20px;
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 4px;
}

.entry-content code {
    background: #000;
    color: var(--matrix-green);
    padding: 2px 6px;
    font-size: 0.9em;
}

/* Author ID Card */
.author-id-card {
    background: var(--bg-console);
    border: 1px solid var(--cyber-cyan);
    margin: 50px 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.id-card-header {
    background: rgba(0, 255, 204, 0.08);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 204, 0.15);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.id-card-body {
    padding: 25px;
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.author-avatar {
    position: relative;
    border-radius: 50%;
}
.author-avatar img {
    border-radius: 50%;
    border: 2px solid var(--cyber-cyan);
}
.avatar-neon-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--cyber-cyan);
    pointer-events: none;
    opacity: 0.5;
}

.author-details {
    flex: 1;
    min-width: 250px;
}

.author-name {
    margin-bottom: 2px;
    font-size: 1.3rem;
}
.author-role {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-top: 0;
    margin-bottom: 10px;
}
.author-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Post navigation */
.cyber-post-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0;
    margin: 40px 0;
}
.cyber-post-nav .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cyber-nav-btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}
.cyber-nav-btn.next-btn {
    text-align: right;
    align-items: flex-end;
}
.nav-dir {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 5px;
}
.cyber-nav-btn a {
    font-family: var(--font-display);
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
}
.cyber-nav-btn a:hover {
    color: var(--matrix-green);
}

/* -----------------------------------------------------------------
 * 9. WIDGETS & SIDEBAR
 * -------------------------------------------------------------- */
.sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cyber-widget {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 25px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.cyber-widget::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-bottom: 2px solid var(--cyber-cyan);
    border-right: 2px solid var(--cyber-cyan);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}
.terminal-prompt {
    font-family: var(--font-mono);
    font-weight: bold;
}

/* Widget Lists */
.cyber-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cyber-widget li {
    padding: 10px 0;
    border-bottom: 1px dotted rgba(255,255,255,0.05);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.cyber-widget li:last-child {
    border-bottom: none;
}

.cyber-widget li a {
    color: var(--text-primary);
}
.cyber-widget li a:hover {
    color: var(--matrix-green);
    padding-left: 4px;
}

/* System Diagnostics fallbacks */
.cyber-deck-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding-bottom: 4px;
}
.stat-lbl {
    opacity: 0.5;
}

/* Search input style */
.search-form {
    display: flex;
    position: relative;
}

.search-form input[type="search"] {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 15px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    width: 100%;
    transition: all 0.2s ease;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 10px var(--cyber-cyan-glow);
}

.search-form button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    color: var(--text-primary);
    padding: 0 15px;
    cursor: pointer;
}
.search-form button:hover {
    background: var(--matrix-green);
    color: var(--bg-dark);
}

/* -----------------------------------------------------------------
 * 10. COMMENTS & COMMENT FEEDBACKS
 * -------------------------------------------------------------- */
.cyber-comments-section {
    margin-top: 60px;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.comments-laser-line {
    height: 1px;
    background: linear-gradient(90deg, var(--matrix-green), transparent);
    margin-bottom: 30px;
}

.cyber-comment-list {
    list-style: none;
    padding-left: 0;
    margin: 0 0 50px 0;
}

.cyber-comment-node {
    margin-bottom: 30px;
}

.cyber-comment-node.parent {
    /* Indent nested reply cards */
}
.cyber-comment-node .children {
    list-style: none;
    padding-left: 20px;
    margin-top: 20px;
    border-left: 1px solid rgba(0, 255, 204, 0.15);
}

.cyber-comment-body {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 25px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.comment-border-tech {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 3px;
    background: var(--cyber-cyan);
}

.cyber-comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.cyber-comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-avatar-wrapper {
    position: relative;
}
.comment-avatar-wrapper img {
    border-radius: 50%;
    border: 1px solid var(--matrix-green);
    display: block;
}
.avatar-green-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--matrix-green-glow);
    pointer-events: none;
}

.comment-author-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
}
.author-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    opacity: 0.5;
    margin-left: 5px;
}

.cyber-comment-metadata {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.cyber-comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.cyber-reply-action {
    display: flex;
    justify-content: flex-end;
}
.comment-reply-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--matrix-green);
    border: 1px solid var(--matrix-green);
    padding: 4px 12px;
    background: transparent;
    transition: all 0.2s ease;
}
.comment-reply-link:hover {
    background: var(--matrix-green);
    color: var(--bg-dark);
    box-shadow: 0 0 8px var(--matrix-green-glow);
}

/* Comment Form styling */
.cyber-comment-form {
    background: var(--bg-console);
    border: 1px solid rgba(255, 0, 127, 0.2);
    padding: 30px;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
}

.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .comment-form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.comment-form-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.field-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.cyber-comment-form input[type="text"],
.cyber-comment-form input[type="email"],
.cyber-comment-form input[type="url"],
.cyber-comment-form textarea {
    background: #020204;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.cyber-comment-form textarea {
    resize: vertical;
}

.cyber-comment-form input:focus,
.cyber-comment-form textarea:focus {
    outline: none;
    border-color: var(--cyber-magenta);
}

.input-glow-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cyber-magenta);
    box-shadow: 0 0 5px var(--cyber-magenta);
    transition: width 0.3s ease;
}
.comment-form-field input:focus ~ .input-glow-line,
.comment-form-field textarea:focus ~ .input-glow-line {
    width: 100%;
}

/* -----------------------------------------------------------------
 * 11. SHORTS & DYNAMIC CUSTOM BOXES
 * -------------------------------------------------------------- */
.cyber-console-box {
    background: var(--bg-console);
    border: 1px solid var(--matrix-green);
    margin: 25px 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.console-box-header {
    background: rgba(0, 255, 102, 0.06);
    border-bottom: 1px solid rgba(0, 255, 102, 0.15);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.console-box-dot {
    width: 8px;
    height: 8px;
    background: var(--matrix-green);
    border-radius: 50%;
}
.console-box-title {
    font-weight: bold;
    flex: 1;
}
.console-box-status {
    margin-left: auto;
    font-size: 0.75rem;
}

.console-box-content {
    padding: 20px;
}

/* Type variations */
.console-alert {
    border-color: var(--cyber-magenta);
}
.console-alert .console-box-header {
    background: rgba(255, 0, 127, 0.06);
    border-bottom-color: rgba(255, 0, 127, 0.15);
}
.console-alert .console-box-dot {
    background: var(--cyber-magenta);
}

.console-info {
    border-color: var(--cyber-cyan);
}
.console-info .console-box-header {
    background: rgba(0, 255, 204, 0.06);
    border-bottom-color: rgba(0, 255, 204, 0.15);
}
.console-info .console-box-dot {
    background: var(--cyber-cyan);
}

/* -----------------------------------------------------------------
 * 12. 404 & ERROR SCREENS
 * -------------------------------------------------------------- */
.error-404-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    text-align: center;
}

.glitch-title-container {
    margin-bottom: 40px;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.1em;
    color: #ffffff;
}

.crashed-indicator {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-top: 10px;
    text-transform: uppercase;
}

.error-console {
    max-width: 600px;
    width: 100%;
    text-align: left;
}

.terminal-log-output {
    margin-bottom: 25px;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    font-size: 0.8rem;
}
.term-lbl {
    opacity: 0.5;
}

.recovery-links {
    list-style: none;
    padding: 0;
    margin: 15px 0 25px 0;
}
.recovery-links li {
    margin-bottom: 10px;
}
.rec-bullet {
    margin-right: 8px;
}

.terminal-search-recovery .search-label {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* -----------------------------------------------------------------
 * 13. FOOTER
 * -------------------------------------------------------------- */
.site-footer {
    background: #030305;
    padding: 60px 0 30px 0;
    position: relative;
    z-index: 90;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.cyber-footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
    position: relative;
}
.cyber-footer-divider .line-glow-magenta {
    height: 100%;
    background: var(--cyber-magenta);
    box-shadow: 0 0 5px var(--cyber-magenta);
    width: 150px;
    margin: 0 auto;
}

/* Diagnostics terminal logs console */
.footer-diagnostics-console {
    background: var(--bg-console);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 40px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.console-header {
    background: #08080c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.terminal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.terminal-dot.green { background: var(--matrix-green); }
.terminal-dot.yellow { background: var(--cyber-cyan); }
.terminal-dot.red { background: var(--cyber-magenta); }

.console-title {
    margin-left: 10px;
    opacity: 0.5;
}

.console-body {
    padding: 15px;
    max-height: 180px;
    overflow-y: auto;
    color: var(--text-primary);
    cursor: text;
}
.console-body p {
    margin: 0 0 6px 0;
}
.log-timestamp {
    opacity: 0.4;
}

.console-prompt-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.typing-cursor::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--matrix-green);
    animation: blink 0.8s infinite steps(2, start);
    vertical-align: middle;
}
.console-prompt-line.console-focused .typing-cursor::after {
    background: var(--cyber-cyan);
}

.site-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-brand {
    font-weight: bold;
}

.footer-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}
.footer-menu-list a {
    color: var(--text-muted);
}
.footer-menu-list a:hover {
    color: var(--cyber-cyan);
}

/* -----------------------------------------------------------------
 * 14. RESPONSIVE BREAKPOINTS
 * -------------------------------------------------------------- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .site-branding {
        text-align: center;
    }
    
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin: 10px auto;
        position: relative;
        z-index: 102;
    }
    
    .menu-toggle .menu-icon,
    .menu-toggle::before,
    .menu-toggle::after {
        content: '';
        width: 100%;
        height: 2px;
        background: var(--matrix-green);
        transition: all 0.3s ease;
    }
    .menu-toggle::before {
        transform-origin: top left;
    }
    .menu-toggle::after {
        transform-origin: bottom left;
    }
    
    .menu-toggle.is-open .menu-icon {
        opacity: 0;
    }
    .menu-toggle.is-open::before {
        transform: rotate(45deg) translate(2px, 2px);
    }
    .menu-toggle.is-open::after {
        transform: rotate(-45deg) translate(2px, -2px);
    }
    
    .primary-menu-container {
        display: none;
        width: 100%;
        background: var(--bg-console);
        border: 1px solid var(--matrix-green);
        padding: 20px;
        margin-top: 15px;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 101;
    }
    .primary-menu-container.is-open {
        display: block;
    }
    
    .primary-menu-list {
        flex-direction: column;
        gap: 10px;
    }
    .primary-menu-list a {
        display: block;
        padding: 12px;
    }
    
    .cyber-hud-status-bar {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .cyber-single-post {
        padding: 20px;
    }
    
    .single-title {
        font-size: 1.8rem;
    }
    
    .site-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-menu-list {
        justify-content: center;
    }
}
