@font-face {
    font-family: 'Belligoes';
    src: url('assets/fonts/Belligoes-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JSLBlackletter';
    src: url('assets/fonts/JBLACK.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 
Theme Name: Agnidhra Life OS (Safe Mode)
Author: DeepMind Antigravity
Description: Minimal, robust stylesheet to restore functionality.
Version: 5.0.0 (Rollback)
*/

:root {
    /* -- CORE RETRO-MODERN VARIABLES (Gruvbox/Phosphor) -- */
    --tech-bg-dark: #1d2021;
    /* Gruvbox Hard Dark */
    --tech-panel-bg: rgba(29, 32, 33, 0.9);
    /* Slightly Lighter */

    /* PHOSPHOR ACCENTS */
    --tech-cyan: #83a598;
    /* Muted Cyan (Gruvbox Blue/Green mix) */
    --tech-gold: #fabd2f;
    /* Bright Amber */
    --tech-green: #b8bb26;
    /* Retro Terminal Green */
    --tech-red: #fb4934;
    /* Soft Red */

    --tech-text-main: #ebdbb2;
    /* Cream White */
    --tech-text-muted: #a89984;
    /* Dim Grey */

    --font-display: 'Orbitron', sans-serif;
    /* Bezel Fonts */
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Space Mono', monospace;
    /* FULL MONOSPACE COMMITMENT */
    --font-brand: 'JSLBlackletter', cursive;

    --crt-flicker: 0.03s;
}

/* --- RESET & SCROLL FIXES --- */
html {
    box-sizing: border-box;
    overflow-y: scroll !important;
    height: auto !important;
    min-height: 100%;
}

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

body {
    margin: 0;
    padding: 0;
    background-color: var(--tech-bg-dark);
    color: var(--tech-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    position: relative;
    /* SCANLINE OVERLAY BASE */
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.06),
            rgba(0, 255, 0, 0.02),
            rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    text-shadow: 0 0 2px rgba(235, 219, 178, 0.3);
    /* TEXT BLOOM */
}

/* GLOBAL CRT OVERLAY (The "Bulgy Monitor" Effect) */
/* GLOBAL CRT OVERLAY (The "Bulgy Monitor" Effect) */
html::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483647;
    /* Max Z-Index to ensure it's on top */
    /* THE BULGE: Deep inset shadow + Rounded Bezel */
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9);
    /* border-radius: 20px; Removed per user request to make it flat */
    /* The Physical Monitor Frame */

    /* GLASS REFLECTION */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.4) 100%);

    pointer-events: none;
    /* Click-through */
}

/* MOVING SCANLINES */
html::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2147483646;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    /* animation: scanline 10s linear infinite; Disabled for performance */
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

/* RETRO TEXT BLOOM */
p,
li,
td,
span,
div {
    text-shadow: 0 0 1px rgba(235, 219, 178, 0.2);
}

/* UTILITY: DISABLE BREATHING ANIMATION (For Bloodwork) */
.retro-static {
    animation: none !important;
    border-color: rgba(34, 211, 238, 0.2) !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important;
}

/* --- LAYOUT CONTAINERS --- */
.tech-app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-content-wrapper {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}


/* --- DASHBOARD WIDGETS (RETRO BEZEL STYLE) --- */
.glass-widget {
    background: rgba(40, 40, 40, 0.6);
    /* Dark Glass */
    backdrop-filter: blur(10px);

    /* BEZEL BORDER */
    border: 2px solid rgba(250, 189, 47, 0.2);
    /* Dim Amber */
    border-radius: 4px;
    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    /* Inner Depth */

    transition: all 0.3s ease;
    clip-path: none;
    /* Removed sharp cuts for boxy retro feel */
    position: relative;
}

.glass-widget:hover {
    border-color: var(--tech-gold);
    box-shadow:
        0 0 15px rgba(250, 189, 47, 0.3),
        inset 0 0 10px rgba(250, 189, 47, 0.1);
    transform: translateY(-1px);
}

/* --- HEADER (RETRO GLASS) --- */
.app-header {
    background: rgba(29, 32, 33, 0.8);
    /* Gruvbox Dark Glass */
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(184, 187, 38, 0.3);
    /* Dim Green Border */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 0 2rem;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.app-header:hover {
    background: rgba(29, 32, 33, 0.95);
    border-bottom-color: var(--tech-green);
    /* Lit Green */
    box-shadow: 0 0 20px rgba(184, 187, 38, 0.15);
}

/* BRAND LOGO */
.tech-brand-link {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tech-text-main);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding-left: 0;
    text-shadow: 0 0 5px rgba(235, 219, 178, 0.3);
}

/* REPLACING GLITCH WITH STEADY TERMINAL BLINK */
.glitch-text::after {
    content: "_";
    display: inline-block;
    color: var(--tech-green);
    animation: blink-caret 1s step-end infinite;
    text-shadow: 0 0 5px var(--tech-green);
    margin-left: 5px;
}

/* Remove old pseudo-elements to kill the shake */
.glitch-text::before {
    display: none;
}

@keyframes blink-caret {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}


/* Glitch Keyframes */
@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 15px, 0);
    }

    20% {
        clip: rect(65px, 9999px, 69px, 0);
    }

    40% {
        clip: rect(12px, 9999px, 85px, 0);
    }

    60% {
        clip: rect(95px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(5px, 9999px, 35px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 90px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(80px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 95px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 20px, 0);
    }

    60% {
        clip: rect(75px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(25px, 9999px, 15px, 0);
    }

    100% {
        clip: rect(55px, 9999px, 50px, 0);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(1deg);
    }

    10% {
        transform: skew(-1deg);
    }

    20% {
        transform: skew(0.5deg);
    }

    30% {
        transform: skew(-0.5deg);
    }

    40% {
        transform: skew(2deg);
    }

    50% {
        transform: skew(-2deg);
    }

    60% {
        transform: skew(0deg);
    }

    100% {
        transform: skew(0deg);
    }
}

.tech-social-btn.hover-youtube:hover {
    color: #ef4444;
    text-shadow: 0 0 10px #ef4444;
}

.tech-social-btn.hover-steam:hover {
    color: #171a21;
    /* Dark for Steam, or maybe blue? Steam is dark/blue. */
    color: #66c0f4;
    text-shadow: 0 0 10px #66c0f4;
}

/* DOT REMOVED AS PER USER REQUEST */
/* .tech-brand-link::before { display: none; } REMOVED TO ALLOW GLITCH */


/* NAVIGATION LINKS */
.tech-nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tech-nav-links a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--tech-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tech-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--tech-cyan);
    box-shadow: 0 0 8px var(--tech-cyan);
    transition: width 0.3s ease;
}

.tech-nav-links a:hover {
    color: var(--tech-gold);
    text-shadow: 0 0 8px rgba(250, 189, 47, 0.6);
}

/* ACTIVE LINK INDICATOR (Retro Block) */
.tech-nav-links .current-menu-item a::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: var(--tech-gold);
    box-shadow: 0 0 5px var(--tech-gold);
    margin-top: 4px;
}

.tech-nav-links a:hover::after {
    width: 100%;
}

/* USER BADGE */
.tech-user-badge {
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.05);
    padding: 6px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--tech-cyan);
    letter-spacing: 1px;
    transition: all 0.3s;
}

.tech-user-badge:hover {
    background: rgba(34, 211, 238, 0.15);
    border-color: var(--tech-cyan);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.user-status-dot {
    width: 6px;
    height: 6px;
    background: var(--tech-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--tech-green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 0 var(--tech-green);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 8px var(--tech-green);
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 0 var(--tech-green);
    }
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    /* Let individual pages handle padding */
}

/* --- TYPOGRAPHY & LINKS --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: #fff;
    margin-top: 0;
}

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

a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--tech-cyan);
}

/* --- COMPONENTS --- */
/* --- COMPONENTS --- */
/* --- CYBERPUNK COMPONENT CORE --- */
/* Shared Styles for Panels & Widgets */
.tech-panel,
.glass-widget {
    background: rgba(10, 15, 20, 0.65);
    /* Dark Glass */
    border: 1px solid rgba(34, 211, 238, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);

    /* Hybrid Clip-Path: 10px Cut Corners */
    clip-path: polygon(15px 0, 100% 0,
            100% calc(100% - 15px), calc(100% - 15px) 100%,
            0 100%, 0 15px);

    transition: all 0.3s ease;
    /* animation: cyber-breathe 4s infinite ease-in-out; Disabled for static flat look */
}

/* Breathing Neon Glow */
@keyframes cyber-breathe {

    0%,
    100% {
        border-color: rgba(34, 211, 238, 0.2);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    }

    50% {
        border-color: rgba(34, 211, 238, 0.5);
        box-shadow: 0 0 25px rgba(34, 211, 238, 0.15),
            inset 0 0 10px rgba(34, 211, 238, 0.05);
    }
}

/* --- ANIMATED BORDER HOVER EFFECT --- */
@keyframes border-crawl {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

/* Hover states removed to fix blinking on cards */

/* 
   Glitch Snap: 
   1. Brief clip-path distortion
   2. Quick translate shake
   3. Settles to stable state
*/
@keyframes glitch-snap {
    0% {
        transform: translate(0);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    }

    20% {
        transform: translateY(-1px);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    }

    40% {
        transform: translateY(0px);
        clip-path: polygon(0 2%, 100% 2%, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    }

    60% {
        transform: translateY(-1px);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    }

    100% {
        transform: translateY(-2px);
        /* Stable Hover State */
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    }
}

/* Corner Accents for both */
.tech-panel::before,
.glass-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--tech-cyan);
    box-shadow: 0 0 5px var(--tech-cyan);
}

/* Hover animation removed */

.tech-panel::after,
.glass-widget::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 2px;
    background: var(--tech-cyan);
    box-shadow: 0 0 8px var(--tech-cyan);
    z-index: 2;
}

/* Glitch Text (Medieval Branding) */
.glitch-text {
    position: relative;
    display: inline-block;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.brand-font {
    font-family: var(--font-brand) !important;
    text-transform: none !important;
    font-size: 2.2rem !important;
}

/* Navigation */
.tech-nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tech-nav-links a {
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--tech-text-muted);
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
}

.tech-nav-links a:hover,
.tech-nav-links .current-menu-item a {
    color: var(--tech-cyan);
    text-shadow: 0 0 8px var(--tech-cyan);
}

.tech-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--tech-cyan);
    transition: width 0.3s;
}

.tech-nav-links a:hover::after {
    width: 100%;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: var(--tech-cyan);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--tech-cyan);
}

/* Biohacking Grid (Fallback) */
.bio-grid-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* NEW: 3-Column Layout for Biohacking (Cardio | Graph | Metabolic) */
.bio-dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .bio-dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* Reorder for mobile: Graph first? Or Stats first? 
       HTML Order: Cardio -> Graph -> Metabolic.
       Default Stack: Cardio -> Graph -> Metabolic.
    */
    .bio-dashboard-grid>div:nth-child(2) {
        order: -1;
        /* Make Graph appear first on mobile if desired, or keep as is */
    }
}

/* --- CHARTS GRID --- */
.bio-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns */
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1000px) {
    .bio-charts-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

.chart-container {
    background: rgba(10, 10, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    padding: 20px;
    min-height: 300px;
    backdrop-filter: blur(5px);

    /* ANGLED CORNERS */
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%, 0 20px);
}

/* ADDING DECORATIVE CORNERS VIA PSEUDO-ELEMENTS (Simulation wrapper needed for clip-path borders, 
   but for now we use internal borders or box-shadow hacks won't work with clip-path.
   Instead, we use a ::before for a "tech line" overlay) 
*/
.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-left: 2px solid var(--tech-cyan);
    border-right: 2px solid var(--tech-cyan);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.chart-container::after {
    content: 'CHART_MODULE_V1';
    position: absolute;
    bottom: 5px;
    right: 25px;
    font-size: 0.6rem;
    color: var(--tech-cyan);
    opacity: 0.5;
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

/* Utility */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-cyan {
    color: var(--tech-cyan);
}

.text-green {
    color: var(--tech-green);
}

.text-red {
    color: var(--tech-red);
}

/* KILL SWITCH FOR OVERLAYS (Scanlines only) */
.scanline-overlay,
.mouse-trail {
    pointer-events: none !important;
    display: none !important;
}

/* Hardware Link Style */
a[href*="bloodwork"] {
    position: relative;
    overflow: hidden;
}

a[href*="bloodwork"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

/* Cyberpunk Headers */
.cyber-header {
    font-family: var(--font-display);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    letter-spacing: 1px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cyber-header::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: currentColor;
    margin-left: auto;
    box-shadow: 0 0 5px currentColor;
}

/* ECG Header Specifics */
.ecg-header {
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Utilities */
.text-gold {
    color: var(--tech-gold);
}

.text-purple {
    color: #a855f7;
}

.text-muted {
    color: #8b949e;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-sm {
    font-size: 0.8rem;
}

a[href*="bloodwork"]:hover::before {
    left: 100%;
}

/* --- NOTES FLOATING WINDOW (Obsidian Style) --- */
.note-floating-window {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 350px;
    max-height: calc(100vh - 120px);
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.window-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.window-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.window-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-pill {
    background: rgba(34, 211, 238, 0.1);
    color: var(--tech-cyan);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    padding: 4px;
}

.btn-icon:hover {
    color: #fff;
}

.btn-primary {
    background: var(--tech-cyan);
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    display: block;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* --- CYTOSCAPE GRAPH NODES (HTML Labels) --- */
.note-card-node {
    width: 280px;
    height: auto;
    background: rgba(13, 17, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #c9d1d9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
    /* Essential for interaction */
    backdrop-filter: blur(5px);
}

.note-card-node:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
    z-index: 1000;
}

/* Card Header */
.note-card-node .card-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-card-node .card-icon {
    font-size: 1.2rem;
}

.note-card-node .card-title {
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

/* Card Body */
.note-card-node .card-body {
    padding: 10px 12px;
    font-size: 0.75rem;
    color: #8b949e;
    line-height: 1.4;
    max-height: 60px;
    /* Limit height */
    overflow: hidden;
    text-align: left;
}

/* Card Footer */
.note-card-node .card-footer {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
}

.note-card-node .card-tag {
    color: var(--tech-cyan);
    background: rgba(34, 211, 238, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- NODE THEMES --- */
.note-card-node.card-gold {
    border-color: var(--tech-gold);
}

.note-card-node.card-gold .card-title {
    color: var(--tech-gold);
}

.note-card-node.card-purple {
    border-color: #a855f7;
}

.note-card-node.card-purple .card-title {
    color: #a855f7;
}

.note-card-node.card-blue {
    border-color: var(--tech-cyan);
}

/* Dimmed State (Focus Mode) */
.dimmed-cy {
    opacity: 0.2;
    pointer-events: none;
}

/* --- DASHBOARD WIDGETS --- */
.glass-widget {
    background: rgba(13, 17, 23, 0.85);
    /* Darker/More Opaque */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 1px solid var(--tech-cyan);
}

.glass-widget:hover {
    /* Set to static */
}

/* --- FOOTER --- */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--tech-text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(13, 17, 23, 0.95);
    width: 100%;
}

/* --- WP BLOCK TABLES (Cyberpunk Style) --- */
.wp-block-table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.wp-block-table thead th {
    background: rgba(34, 211, 238, 0.1);
    color: var(--tech-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(34, 211, 238, 0.3);
}

.wp-block-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--tech-text-muted);
}

.wp-block-table tbody tr:hover {
    background: rgba(34, 211, 238, 0.05);
}

.wp-block-table tbody tr:hover td {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Striped Style */
.is-style-stripes tbody tr:nth-child(odd) {
    background-color: rgba(34, 211, 238, 0.05) !important;
    color: var(--tech-text-main) !important;
}

/* Ensure even rows are transparent */
.is-style-stripes tbody tr:nth-child(even) {
    background-color: transparent !important;
}

/* --- DASHBOARD IDENTITY (HACKY STYLE) --- */
.dashboard-identity-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.whoami-prompt {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    /* Clean Console Size */
    color: #39ff14;
    /* Terminal Green */
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
    letter-spacing: 1px;
    margin: 0 0 30px 0;
}

.whoami-prompt::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

.identity-name {
    font-family: var(--font-display);
    font-size: 3rem;
    margin: 0 0 15px 0;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.identity-role {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--tech-cyan);
    margin-bottom: 40px;
    letter-spacing: 1px;
    opacity: 1;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(34, 211, 238, 0.3);
    padding-bottom: 5px;
    display: inline-block;
}

.cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
    text-align: left;
    width: 100%;
    max-width: 1000px;
    font-size: 0.8rem;
    color: #e0e0e0;
}

.cert-item {
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
    line-height: 1.4;
}

.cert-item:hover {
    color: var(--tech-green);
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
}

.cert-icon {
    color: var(--tech-green);
    text-shadow: 0 0 5px var(--tech-green);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- DASHBOARD WIDGET TYPOGRAPHY --- */
.widget-clock-time {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    line-height: 1;
}

.widget-date-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SLEEP ARCHITECTURE GRAPH --- */
.sleep-bar-track {
    width: 100%;
    height: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    /* Apple Style Rounding */
    overflow: hidden;
    display: flex;
    margin-bottom: 20px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Segments */
.sb-segment {
    height: 100%;
    transition: width 1s ease-out;
}

.seg-awake {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    z-index: 4;
}

.seg-rem {
    background: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
    z-index: 3;
}

.seg-core {
    background: #3b82f6;
    z-index: 2;
}

.seg-deep {
    background: #1e40af;
    z-index: 1;
}

.sleep-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.sl-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.bg-red {
    background: #ef4444;
    box-shadow: 0 0 5px #ef4444;
}

.bg-purple {
    background: #a855f7;
    box-shadow: 0 0 5px #a855f7;
}

.bg-blue {
    background: #3b82f6;
    box-shadow: 0 0 5px #3b82f6;
}

.bg-navy {
    background: #1e40af;
    box-shadow: 0 0 5px #1e40af;
}

.sl-val {
    font-weight: bold;
    color: #fff;
}

.text-navy {
    color: #60a5fa;
}

/* Lighter for text visibility */

.recent-activity-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recent-activity-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
}

.recent-activity-item-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
}

.recent-activity-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.6;
}

/* --- TECH GLITCH ACCENTS & NEON DRAWING --- */
.glitch-panel {
    background: rgba(5, 10, 15, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.1);
    /* Subtle faint border init */
    position: relative;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    transition: all 0.2s ease;

    /* PREPARE BORDER DRAWING GRADIENTS (Hidden initially) */
    /* Order: Top-Left, Top-Right, Right-Top, Right-Bottom, Bottom-Right, Bottom-Left, Left-Bottom, Left-Top */
    background-image:
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan)),
        linear-gradient(var(--tech-cyan), var(--tech-cyan));

    background-repeat: no-repeat;

    /* Initial Sizes (0 width/height) */
    background-size:
        0% 2px, 0% 2px,
        /* Top L/R */
        2px 0%, 2px 0%,
        /* Right T/B */
        0% 2px, 0% 2px,
        /* Bottom R/L */
        2px 0%, 2px 0%;
    /* Left B/T */

    /* Positions (Corners) */
    background-position:
        top left, top right,
        top right, bottom right,
        bottom right, bottom left,
        bottom left, top left;
}

/* HOVER STATE */
/* HOVER STATE */
.glitch-panel:hover {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.15), inset 0 0 20px rgba(34, 211, 238, 0.05);
    background-color: rgba(5, 10, 15, 0.98);
    border-color: rgba(0, 255, 255, 0.1);
    /* Keep base border faint */

    /* DRAW BORDERS TO CENTER (51% to ensure overlap) */
    background-size:
        51% 2px, 51% 2px,
        2px 51%, 2px 51%,
        51% 2px, 51% 2px,
        2px 51%, 2px 51%;

    transition: background-size 0.6s ease-out, box-shadow 0.6s ease;

    /* REFINED GLITCH ANIMATION - SLOWER & SMOOTHER (0.8s) */
    /* animation: glitch-snap-final 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; Removed via user request */
}

/* SCANLINES */
.glitch-panel::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 1;
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    opacity: 0.6;
}

/* BETTER GLITCH KEYFRAMES - LESS AGGRESSIVE */
@keyframes glitch-snap-final {
    0% {
        transform: translateY(0);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
        text-shadow: none;
    }

    20% {
        transform: translateY(-1px);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
        text-shadow: 1px 0 #ef4444, -1px 0 #22d3ee;
    }

    40% {
        transform: translateY(0px);
        clip-path: polygon(0 2%, 100% 2%, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
        text-shadow: -1px 0 #ef4444, 1px 0 #22d3ee;
    }

    60% {
        transform: translateY(-1px);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
        text-shadow: 1px 0 #ef4444, -1px 0 #22d3ee;
        filter: brightness(1.1) contrast(1.05);
    }

    100% {
        transform: translateY(-2px);
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
        text-shadow: none;
        filter: none;
    }
}

/* --- SCI-FI TABLES (Bio-Stack) --- */
.sci-fi-table {
    width: 100%;
    border-collapse: separate;
    /* Allows border-radius */
    border-spacing: 0 4px;
    /* Gap between rows */
    margin-top: 10px;
    font-size: 0.85rem;
}

.sci-fi-table th {
    text-align: left;
    text-transform: uppercase;
    font-family: var(--font-display);
    /* Terminus/Header font */
    color: var(--tech-text-muted);
    padding: 10px 15px;
    letter-spacing: 1px;
    font-size: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.sci-fi-table td {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 15px;
    font-family: var(--font-mono);
    color: var(--tech-text-main);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sci-fi-table tr td:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    color: var(--tech-cyan);
    /* Highlight First Column */
    font-weight: bold;
}

.sci-fi-table tr td:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.sci-fi-table tr:hover td {
    background: rgba(250, 189, 47, 0.1);
    /* Amber Hover */
    border-top: 1px solid rgba(250, 189, 47, 0.3);
    border-bottom: 1px solid rgba(250, 189, 47, 0.3);
    color: #fff;
}

/* Status Pills */
.status-pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.status-pill.active {
    background: rgba(184, 187, 38, 0.2);
    color: var(--tech-green);
    border: 1px solid rgba(184, 187, 38, 0.4);
}

.status-pill.paused {
    background: rgba(251, 73, 52, 0.2);
    color: var(--tech-red);
}

/* --- ADVANCED UI UPGRADE ("Iron Man HUD") --- */

/* 1. HOLO-TILT ENGINE SUPPORT */
.glass-widget,
.tech-panel {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* Transition handled by JS for enter/leave */
    will-change: transform;
}

/* 2. LIVING GRID (Parallax Background) */
@keyframes grid-drift {
    0% {
        background-position: 0% 0%, 0% 0%;
    }

    100% {
        background-position: 100px 100px, 40px 40px;
    }
}

/* Body animation removed by user request */

/* 3. BIOS BOOT SEQUENCE (Entry Animation) */
@keyframes bios-boot {
    0% {
        opacity: 0;
        transform: scale(0.98) translateY(20px);
        filter: blur(10px);
    }

    40% {
        opacity: 0.4;
        transform: scale(1.01) translateY(-5px);
        filter: blur(0px);
    }

    70% {
        opacity: 0.8;
        transform: scale(1.0) translateY(2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Apply Boot Sequence to Major Containers */
.app-content-wrapper>div,
.bio-dashboard-grid>div,
.bio-charts-grid>div {
    animation: bios-boot 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

/* Stagger Animations */
.app-content-wrapper>div:nth-child(1) {
    animation-delay: 0.1s;
}

.app-content-wrapper>div:nth-child(2) {
    animation-delay: 0.2s;
}

.app-content-wrapper>div:nth-child(3) {
    animation-delay: 0.3s;
}

.bio-dashboard-grid>div:nth-child(1) {
    animation-delay: 0.2s;
}

.bio-dashboard-grid>div:nth-child(2) {
    animation-delay: 0.3s;
}

.bio-dashboard-grid>div:nth-child(3) {
    animation-delay: 0.4s;
}

.bio-charts-grid>div:nth-child(1) {
    animation-delay: 0.3s;
}

.bio-charts-grid>div:nth-child(2) {
    animation-delay: 0.4s;
}

.bio-charts-grid>div:nth-child(3) {
    animation-delay: 0.5s;
}

.bio-charts-grid>div:nth-child(4) {
    animation-delay: 0.6s;
}

/* 4. OPTIMIZED LIST SCROLLING (Smooth Inertia) */
html {
    scroll-behavior: smooth;
}

/* 5. FINAL MOBILE OVERHAUL */
@media (max-width: 768px) {
    /* Reduce Header Size */
    .app-header {
        padding: 10px !important;
        height: auto !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .brand-font {
        font-size: 1.2rem !important; /* Smaller logo */
        text-align: center;
        width: 100%;
    }
    
    .tech-nav-links {
        gap: 8px 12px !important; /* Tighter navigation */
        justify-content: center;
        padding: 0 !important;
    }

    .tech-nav-links a {
        font-size: 0.7rem !important;
        letter-spacing: 0.5px !important;
    }

    /* Force all grids to 1 column */
    .dashboard-grid, 
    .cert-grid, 
    .bio-dashboard-grid, 
    .bio-charts-grid, 
    .gaming-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Fix Identity Card Overlap */
    .identity-name {
        font-size: 1.4rem !important; /* Much smaller name */
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .identity-role {
        font-size: 0.7rem !important;
        margin-bottom: 20px !important;
    }

    .cert-item {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        margin-bottom: 5px;
    }

    .dashboard-identity-card {
        padding: 20px !important;
        min-height: auto !important;
    }

    /* Fix Widget Spacing */
    .glass-widget {
        margin-bottom: 15px !important;
        padding: 15px !important;
    }

    .widget-clock-time {
        font-size: 1.8rem !important;
    }
    
    /* Ensure nothing overflows horizontally */
    body, html {
        overflow-x: hidden !important;
        width: 100vw;
    }
}
