/* =====================================================================
   THE SOVEREIGN CREATIVE ECOSYSTEM
   hazel-global-neo.css
   (Merged from hazel-core, hazel-neo, hazel-pop, neoB rogues, and dracula-gemini-gray)
   ===================================================================== */

/* Base / Dark Theme (Dracula) */
html[data-theme="dark"], :root {
    /* Hazel's Signature Colors - Dracula Gemini Gray Integration */
    --hazel-ink: #f8f8f2; /* Dracula light foreground for readability */
    --hazel-paper: #282a36; /* Dracula Gemini Gray background */
    --neobrutalist-black: #000000; /* Kept for those hard brutalist shadows */
    --garden-growth-green: #00ff41;
    --meta-link-cyan: #00f0ff;
    --neo-yellow: #ffde03;
    --neo-pink: #ff91e4;
    --neo-orange: #ff5c00;
    --neo-purple: #7000ff;
    --hazel-accent: #bd93f9; /* Dracula Purple */
}

/* Light Theme (Crisp Paper) */
html[data-theme="light"] {
    --hazel-ink: #111111; /* Dark ink for readability */
    --hazel-paper: #f4f7f6; /* A clean, slightly warm white/gray */
    --neobrutalist-black: #000000;
    --garden-growth-green: #00b32d;
    --meta-link-cyan: #008891; /* Darker cyan for readability on light background */
    --neo-yellow: #ffd000;
    --neo-pink: #ff7be0;
    --neo-orange: #e65300;
    --neo-purple: #5c00d1;
    --hazel-accent: #7000ff; /* Darker purple for light mode */
}

/* =====================================================================
   1. PROJECT FOUNDATIONS (Global Body)
   ===================================================================== */
body, body[data-theme="light"], body[data-theme="dark"], .bd-main {
    background-color: var(--hazel-paper) !important;
    color: var(--hazel-ink) !important;
    font-family: "Inter", sans-serif;
    line-height: 1.6;
}

/* Ensure Jupyter Book's specific background layers are also Dracula Gray */
.bd-page-width, .bd-article-container, .bd-header-article {
    background-color: var(--hazel-paper) !important;
}

/* =====================================================================
   2. NEO-BRUTALIST CHUNKY HEADERS 
   ===================================================================== */
.markdown-rendered h1, .markdown-rendered h2,
.bd-article h1, .bd-article h2 {
    font-weight: 900 !important;
    color: var(--neobrutalist-black) !important;
    background-color: var(--neo-yellow);
    display: inline-block;
    padding: 10px 15px;
    border: 3px solid var(--neobrutalist-black);
    box-shadow: 8px 8px 0px var(--neobrutalist-black);
    margin-bottom: 20px;
    margin-top: 20px;
}

/* =====================================================================
   3. NEO-BRUTALIST STICKER CALLOUTS
   ===================================================================== */
@keyframes sticker-pop {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.callout, div.admonition {
    border: 3px solid var(--neobrutalist-black) !important; 
    border-radius: 0px !important;       
    box-shadow: 6px 6px 0px var(--neobrutalist-black) !important;    
    background-color: var(--neo-pink) !important; 
    color: var(--neobrutalist-black) !important;
    opacity: 1 !important;
    margin: 1.5em 0;
    padding: 1em;
    animation: sticker-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.callout-title, p.admonition-title {
    font-weight: 900 !important;
    text-transform: uppercase;
    color: var(--neobrutalist-black) !important;
    background-color: transparent !important;
    margin-bottom: 0.5em;
}

.callout p, div.admonition p {
    color: var(--neobrutalist-black) !important;
}

/* =====================================================================
   4. INLINE LINKS (Clean & Readable)
   ===================================================================== */
/* Standard text links inside the article - NO chunky button backgrounds */
.bd-article a.internal-link, .bd-article a.reference.internal, .bd-article a.external {
    color: var(--meta-link-cyan) !important;
    text-decoration: none !important;
    font-weight: bold !important;
    border-bottom: 2px solid var(--meta-link-cyan) !important;
    background-color: transparent !important; /* Force transparent background */
    padding: 0 !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.bd-article a.internal-link:hover, .bd-article a.reference.internal:hover, .bd-article a.external:hover {
    color: var(--neo-yellow) !important;
    border-bottom: 2px solid var(--neo-yellow) !important;
    background-color: transparent !important;
}

/* =====================================================================
   4.5 INTERACTIVE BUTTONS (Only for actual buttons)
   ===================================================================== */
.button-default, button.btn, .bd-article a.btn {
    background-color: var(--meta-link-cyan) !important;
    color: var(--neobrutalist-black) !important;
    border: 3px solid var(--neobrutalist-black) !important;
    border-radius: 0px !important;
    box-shadow: 4px 4px 0px var(--neobrutalist-black) !important;
    padding: 5px 15px !important;
    transition: all 0.1s ease;
    font-weight: bold !important;
    display: inline-block;
    text-decoration: none !important;
}

.button-default:hover, button.btn:hover, .bd-article a.btn:hover {
    box-shadow: 2px 2px 0px var(--neobrutalist-black) !important;
    transform: translate(2px, 2px); 
}

/* =====================================================================
   5. THE SIDEBAR / FILE EXPLORER
   ===================================================================== */
.bd-sidebar, .bd-sidebar-primary, .bd-sidebar-secondary {
    background-color: var(--hazel-paper) !important;
    border-right: 2px solid var(--neobrutalist-black);
}

/* AGGRESSIVELY TARGET ALL SIDEBAR LINKS TO REMOVE BLUE BOXES */
.bd-sidebar a, .bd-sidebar a:hover, .bd-sidebar a:active, .bd-sidebar a:focus,
.bd-sidebar .nav-item > a, .bd-sidebar .nav-link, 
.bd-sidebar-secondary a, .bd-sidebar-secondary a:hover,
.bd-links a, .bd-links a:hover {
    background-color: transparent !important; 
    box-shadow: none !important;
    border: none !important;
    padding: 0.25rem 1rem !important; /* standard sidebar padding */
}

/* Sidebar Link Colors */
.bd-sidebar a {
    color: var(--hazel-ink) !important;
}

.bd-sidebar .nav-item:nth-child(3n+1) > a {
    color: var(--neo-orange) !important;
    font-weight: bold;
}
.bd-sidebar .nav-item:nth-child(3n+2) > a {
    color: var(--hazel-accent) !important; /* Using Dracula Purple here */
    font-weight: bold;
}

/* The active/current page in the sidebar */
.bd-sidebar .current > a, .bd-sidebar a.current {
    font-weight: 900 !important;
    color: var(--neo-yellow) !important;
    background-color: transparent !important;
    border-left: 4px solid var(--neo-yellow) !important;
}

/* =====================================================================
   6. NARRATIVE "META" TRIGGERS
   ===================================================================== */
.hazel-1975 .inline-title, 
.hazel-1955 .inline-title {
    display: none;
}

.page-footer {
    border-top: 1px dashed var(--hazel-ink);
    font-size: 0.8rem;
    margin-top: 4rem;
    opacity: 0.6;
}