/* =========================================
   CYBERPUNK / DIGITAL GLITCH EFFECTS (MULTI-COLOR)
   ========================================= */

@keyframes static-shred {
    /* Cycle between White (text), Majo Green (terminal), and Grey (text-muted) */
    0%   { clip-path: inset(0 0 0 0); transform: translate(0, 0); color: var(--text); }
    10%  { clip-path: inset(10% 0 85% 0); transform: translate(-5px, 0); color: var(--terminal); /* Majo Green Shift */ }
    20%  { clip-path: inset(85% 0 10% 0); transform: translate(5px, 0); color: var(--text-muted); /* Grey Shift */ }
    30%  { clip-path: inset(40% 0 40% 0); transform: translate(-5px, 0); color: var(--text); /* White Shift */ }
    40%, 60% { clip-path: inset(0 0 0 0); transform: translate(0, 0); color: var(--text); /* Stable White */ }
    70%  { clip-path: inset(0 0 50% 0); transform: translate(3px, 0); color: var(--terminal); /* Majo Green Shift */ }
    80%  { clip-path: inset(50% 0 0 0); transform: translate(-3px, 0); color: var(--text-muted); /* Grey Shift */ }
    90%  { clip-path: inset(20% 0 20% 0); transform: translate(0, 0); color: var(--terminal); /* Majo Green Shift */ }
}

/* Utility Class (Kept as requested, though logo uses customized version below) */
.digital-fade {
    font-family: var(--font-mono); 
    font-size: 0.85rem; 
    color: #666;
    padding-left: 20px; 
    border-left: 1px solid #ccc;
    cursor: help; 
    white-space: nowrap;
    position: relative;
    display: inline-block;
}

.digital-fade:hover {
    color: #000;
    animation: static-shred 0.9s steps(2, end) infinite;
    border-left: 2px solid #000;
}

/* =========================================
   1. VARIABLES & RESET (Deep Binary Dark)
   ========================================= */
:root {
    /* THE DEEP MIDNIGHT PALETTE (Ketu/Rahu Alignments) */
    --bg: #0d1117;           /* Deepest Void (Background) */
    --surface: #161b22;      /* Dark Slate (Cards/Sections) */
    --text: #e6edf3;         /* Soft Off-White (Primary Text) */
    --text-muted: #8b949e;   /* Steel Grey (Secondary Text) */
    
    /* ACCENTS & HIGHLIGHTS */
    --accent: #38bdf8;       /* Binary Cyan (Primary Focus) */
    --terminal: #2ea043;     /* Majo Green (Success/Terminal) */
    --border: #30363d;       /* Subtle Deep Border */
    
    /* Fonts - Technical & Sharp */
    --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Fira Sans', sans-serif; 
    --font-mono: 'IBM Plex Mono', 'Roboto Mono', monospace; 
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-primary);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { 
    color: var(--text); 
    text-decoration: none; 
    transition: all 0.2s ease; 
}
a:hover { 
    color: var(--accent); 
    opacity: 1; 
}

.wrapper {
    width: 92%;           
    max-width: 1400px;    
    margin: 0 auto;
    position: relative;
}

/* =========================================
   2. HEADER (Clean Terminal Style)
   ========================================= */
.header {
    padding: 80px 0 50px 0; 
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 40px; 
}

.brand-container { 
    width: 100%;
    display: flex;
    flex-direction: row; 
    align-items: center; 
    flex-wrap: wrap;     
    gap: 25px;           
}

/* The Logo: sh377c0d3 (UPDATED WITH MULTI-COLOR GLITCH) */
.brand-original {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: lowercase; 
    font-size: 5rem; 
    line-height: 1;
    letter-spacing: -3px;
    
    /* Default state: transparent with white outline */
    color: transparent; 
    -webkit-text-stroke: 1.5px var(--text); 
    text-shadow: 2px 2px 0px rgba(56, 189, 248, 0.15); /* Subtle Cyan Shadow initially */
    
    display: inline-block;
    position: relative;
    cursor: help;
    transition: all 0.2s;
}

.brand-original:hover {
    /* Remove stroke so filled colors are clear */
    -webkit-text-stroke: 0; 
    
    /* Add Chromatic Aberration shadow (Majo Green left, Grey right) */
    text-shadow: -3px 0 1px var(--terminal), 3px 0 1px var(--text-muted);
    
    /* Run the multi-color shred animation */
    animation: static-shred 0.7s steps(2, end) infinite;
}

/* The Separator: | */
.brand-separator {
    font-size: 4rem;
    font-weight: 300;
    color: var(--border); 
    line-height: 0.8;
    margin-top: -10px; 
}

/* --- UPDATED: FATTY TEXT WITH CYAN BORDER --- */
.typing-badge {
    font-family: var(--font-mono);
    
    /* 1. Make it FATTY */
    font-weight: 900; 
    font-size: 1.4rem; 
    
    /* 2. The Inner Color (Dark to blend with bg) */
    color: var(--bg); 
    
    /* 3. The Border (Cyan Stroke) */
    -webkit-text-stroke: 1px var(--accent);
    
    letter-spacing: 0.5px;
    margin-top: 5px;
    display: inline-block;
    
    /* Glow Effect */
    filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.5));
}

/* Navigation Tabs */
.desktop-nav { 
    display: flex; 
    gap: 60px; 
    align-items: center;
    padding-left: 5px; 
}

.desktop-nav a { 
    font-family: var(--font-mono); 
    font-size: 1.1rem; 
    font-weight: 500;
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent; 
    transition: all 0.2s ease;
}

.desktop-nav a:hover { 
    color: var(--accent); 
    border-bottom: 2px solid var(--accent);
    text-decoration: none;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* --- HIDE MOBILE ELEMENTS ON DESKTOP --- */
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.hamburger-line { display: block; width: 25px; height: 2px; background: var(--text); margin: 6px 0; }
.mobile-menu { display: none; }

/* =========================================
   3. POST LIST & CARDS
   ========================================= */
.content-grid { display: block; padding-bottom: 80px; }

.post-item {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.1;
    color: var(--text);
}
.post-title a:hover { color: var(--accent); } 

.meta-row {
    display: flex; align-items: center; gap: 15px; margin-bottom: 20px;
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
}

.date-box {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 2px 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.author-name { font-weight: 600; color: var(--text); }
.summary-text { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 20px; max-width: 800px; }

.read-more-btn {
    display: inline-block;
    border: 1px solid var(--accent);
    padding: 8px 20px;
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent);
    transition: 0.2s;
}
.read-more-btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Empty State */
.empty-state {
    border: 1px dashed var(--border);
    background: var(--surface);
    padding: 60px; text-align: center; border-radius: 4px;
}
.status-badge {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-muted);
    padding: 4px 12px; font-family: var(--font-mono); font-size: 0.75rem; border-radius: 50px;
}

/* =========================================
   4. CVE BINARY TREE
   ========================================= */
.tree-forest { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 40px 0; }
.tree-structure { display: flex; flex-direction: column; align-items: center; position: relative; width: 100%; margin-bottom: 80px; }

.node-year-root {
    width: 100px; height: 100px;
    border: 2px solid var(--accent); background: var(--bg); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--accent);
    z-index: 10; box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

.connector-trunk { width: 2px; height: 60px; background: var(--border); margin: 0 auto; }

.node-leaves-container { display: flex; justify-content: center; gap: 40px; padding-top: 30px; position: relative; }
.node-leaves-container::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    height: 2px; background: var(--border); width: calc(100% - 250px); max-width: 80%;
}
.node-leaves-container:has(> .node-leaf-wrapper:only-child)::before { display: none; }
.node-leaves-container:has(> .node-leaf-wrapper:only-child) .node-leaf-wrapper::before { top: -92px; height: 92px; }

.node-leaf-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; }
.node-leaf-wrapper::before { content: ''; position: absolute; top: -32px; height: 32px; width: 2px; background: var(--border); }

.node-leaf {
    width: 260px; padding: 20px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 4px;
    text-align: left; transition: all 0.3s ease; display: block; position: relative; z-index: 5;
}
.node-leaf:hover {
    transform: translateY(-5px); 
    border-color: var(--accent); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.pending-node { border: 1px dashed var(--border); background: transparent; opacity: 0.7; text-align: center; }
.leaf-id { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); margin-bottom: 8px; letter-spacing: 1px; }
.leaf-title { display: block; font-weight: 700; font-size: 1rem; color: var(--text); line-height: 1.3; }

/* =========================================
   5. CONTENT & CODE
   ========================================= */
.content { font-size: 1.1rem; max-width: 800px; }
.content p { margin-bottom: 1.5em; color: var(--text); opacity: 0.9; }
.content h2 { font-size: 1.8rem; margin-top: 2em; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.content img { max-width: 100%; height: auto; border: 1px solid var(--border); margin: 30px 0; cursor: zoom-in; }

.content pre {
    background: #010409 !important; /* Pure Black for contrast */
    padding: 20px; border-radius: 4px; overflow-x: auto;
    border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.9rem; color: #d1d5db;
}
.content code {
    font-family: var(--font-mono); background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: var(--accent);
}

/* =========================================
   6. UTILITIES & FOOTER
   ========================================= */
.lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 9998; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-image { position: fixed; top: 50%; left: 50%; max-width: 95%; max-height: 95%; transform: translate(-50%, -50%) scale(0.9); z-index: 9999; opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1); border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.lightbox-image.active { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }

.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.footer-inner { display: flex; justify-content: space-between; }
.status-indicator { display: inline-block; width: 6px; height: 6px; background: var(--terminal); border-radius: 50%; margin-right: 8px; box-shadow: 0 0 5px var(--terminal); }

/* =========================================
   7. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .header { align-items: flex-start; gap: 20px; padding-top: 40px; }
    .brand-container { flex-direction: column; align-items: flex-start; gap: 10px; }
    .brand-original { font-size: 3.5rem; }
    .brand-separator { display: none; } 
    .typing-badge { margin-left: 0; font-size: 1rem; }
    
    .desktop-nav { display: none; }
    
    .hamburger-btn { display: block; position: absolute; top: 50px; right: 0; z-index: 10000; }
    
    .mobile-menu {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh; 
        background: var(--bg); z-index: 9999;
        flex-direction: column; justify-content: center; align-items: center; gap: 30px;
        display: none; 
    }
    .mobile-menu.is-open { display: flex; }

    .mobile-links a { font-size: 1.5rem; display: block; margin-bottom: 20px; font-family: var(--font-mono); color: var(--text); }
    .mobile-close { position: absolute; top: 30px; right: 30px; background: none; border: none; color: var(--text); font-size: 2rem; cursor: pointer; }

    .node-leaves-container { flex-direction: column; align-items: center; gap: 30px; }
    .node-leaves-container::before { display: none; }
    .node-leaf-wrapper::before { height: 30px; top: -30px; }
    .node-leaf { width: 100%; max-width: 300px; }
}

/* =========================================
   9. ABOUT PAGE DASHBOARD
   ========================================= */
.about-dashboard { display: grid; grid-template-columns: 280px 1fr; gap: 60px; margin-top: 40px; }

.profile-glitch-box {
    width: 100%; height: 200px; background: var(--surface); 
    border: 1px solid var(--border);
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 30px; position: relative; overflow: hidden;
}
.profile-glitch-box::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, transparent 50%, rgba(56, 189, 248, 0.05) 50%);
    background-size: 100% 4px; pointer-events: none;
}
.glitch-text { font-family: var(--font-mono); color: var(--accent); animation: blink 2s infinite; font-size: 0.8rem; letter-spacing: 2px; text-shadow: 0 0 5px rgba(56, 189, 248, 0.5); }

.matrix-header { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; font-family: var(--font-mono); letter-spacing: 1px; }
.social-links { display: flex; flex-direction: column; gap: 10px; }

.social-btn {
    display: block; padding: 12px 15px;
    background: var(--surface); border: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 0.9rem; color: var(--text);
    transition: all 0.2s; text-transform: uppercase;
}
.social-btn .prefix { color: var(--text-muted); margin-right: 10px; }
.social-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateX(5px); background: var(--bg); box-shadow: 0 2px 8px rgba(56, 189, 248, 0.1); }

.terminal-text p { margin-bottom: 20px; font-size: 1.1rem; line-height: 1.7; color: var(--text); }
.section-header { 
    margin-top: 60px; margin-bottom: 30px; 
    font-family: var(--font-mono); color: var(--text); font-size: 1.2rem;
    border-bottom: 1px solid var(--border); padding-bottom: 10px;
}

.repo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.repo-card {
    background: var(--surface); border: 1px solid var(--border);
    padding: 25px; display: flex; flex-direction: column;
    transition: all 0.2s; height: 100%; text-decoration: none; position: relative; 
}
.repo-card:hover { border-color: var(--accent); transform: translateY(-5px); background: var(--bg); box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); }

.repo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-family: var(--font-mono); }
.repo-name { font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.repo-star { color: #e3b341; font-size: 0.85rem; background: rgba(227, 179, 65, 0.1); padding: 2px 8px; border-radius: 4px; }
.repo-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; line-height: 1.5; }
.repo-lang { font-size: 0.75rem; font-family: var(--font-mono); font-weight: bold; color: var(--text); }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (max-width: 900px) {
    .about-dashboard { grid-template-columns: 1fr; gap: 40px; }
    .about-sidebar { order: 2; }
    .about-content { order: 1; }
    .profile-glitch-box { display: none; } 
}