/* ==========================================================================
   MINIMAL BLOB INDEX - OBSIDIAN NEON BALANCED EDITION
   --------------------------------------------------------------------------
   [base-styles]    - Structural resets, viewport setup, and core body setup
   [header-styles]  - Complete layout framework for site menus, logo, and mobile hamburger 
   [text-styles]    - Site-wide typography layout, linking rules, and metadata wrappers
   [contact-styles] - Self-contained custom design parameters for submission forms
   [beta-styles]    - Floating contextual critique panels for beta layouts
   [footer-styles]  - Site-wide neon trailing signature layout
   ========================================================================== */

:root {
    /* Extreme Deep Cavities - Swapped layout depths for a deeper body cavity */
    --bg-wine-dark:     #050001; /* Darker midnight backdrop for the main body canvas */
    --bg-wine-medium:   #0a0002; /* Near-black void for Headers, Footers, and Cards */
    --bg-wine-inkwell:  #020000; /* Absolute deep void fill for text inputs */

    /* Strict 80s Neon Spectrum - Re-balanced for Sharp Contrast */
    --neon-purple:      #d600ff; /* EXCLUSIVE BRANDING: "LilyRexX Creations" and Footer Copyright */
    --neon-pink:        #ff00aa; /* SECTION TITLES (h2), Borders, and Outlines */
    --neon-cyan:        #00f3ff; /* STORY TITLES (h4), Interactive Hovers, and Form Labels */
    --neon-yellow:      #ffea00; /* Main Navigation Links */
    --neon-green:       #00f74a; /* Radioactive Green for Metadata Content & Success States */
    --neon-orange:      #f78000; /* Intense Neon Orange for Metadata Labels (.title) */
}

/* ==========================================================================
   [base-styles]
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    background-color: var(--bg-wine-dark); /* Swapped to the absolute darker void */
    color: #f0f0f0;
}

/* Flexible positioning block separating top fixed content from layout roots */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pushes basic document contents safely below fixed top navigation bands */
main.container {
    flex: 1 0 auto;
    padding-top: 8.5rem; /* INCREASED: Prevents fixed header from cutting off page titles */
    flex-direction: column;
    align-items: stretch;
}

/* ==========================================================================
   [header-styles]
   ========================================================================== */

/* Sticky alignment frame locked to the viewport apex */
.site-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-wine-medium); /* Swapped to medium wine */
    padding: 1rem 0;
    border-bottom: 2px solid var(--neon-pink); /* Hot Pink divider ribbon */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 10px rgba(255, 0, 170, 0.2); 
}

.header-container {
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Cursive artistic neon branding emblem text */
.logo-group h1 {
    font-family: "Brush Script MT", "Lucida Handwriting", cursive;
    font-size: 3rem;
    color: var(--neon-purple); 
    text-shadow: 0 0 4px var(--neon-purple), 0 0 10px rgba(214, 0, 255, 0.6);
    letter-spacing: 2px;
    margin: 0;
}

.logo img {
    height: 4.5rem;
    max-width: 100%;
    width: auto;
    display: block;
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--neon-yellow); 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.main-nav a:hover {
    color: var(--neon-cyan); 
    text-shadow: 0 0 8px var(--neon-cyan); 
}

/* Responsive state toggles for mobile presentation layers */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: var(--neon-yellow);
    box-shadow: 0 0 5px var(--neon-yellow);
    border-radius: 2px;
}

/* Desktop layout compaction rules forcing responsive menu collapse below 800px width */
@media (max-width: 800px) {
    .logo-group h1 {
        display: none;
    }

    .header-container {
        position: relative;
        flex-wrap: wrap;
        justify-content: center;
        padding: 1rem;
    }

    .logo-group {
        margin: 0 auto;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 1.5rem;
        top: 2.25rem;
    }

    .main-nav {
        display: none;
        width: 100%;
        margin-top: 1.5rem;
    }

    .menu-toggle:checked ~ .main-nav {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   [text-styles]
   ========================================================================== */

/* Global link anchors */
a {
    color: var(--neon-yellow);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover, a:active {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

/* Section Title Hubs ("Stories", "Welcome!") */
h2 {
    color: var(--neon-pink);
    font-size: 2.8rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem; /* NEW: Pulled up closer to the first story */
    text-shadow: 0 0 2px var(--neon-pink), 0 0 6px rgba(255, 0, 170, 0.3);
}

/* Card Indexing Wrappers (Simple, Image, and Gallery) */
.simple-card, .image-card, .gallery-card {
    width: 100%;
    margin-bottom: 2.5rem; /* NEW: Perfectly spaces the gap between individual story blocks */
}

/* Ensures the last item on a short page pushes the footer down to preserve the sticky fix */
.simple-card:last-of-type, 
.image-card:last-of-type, 
.gallery-card:last-of-type, 
main.container > p:last-of-type {
    margin-bottom: auto; 
    padding-bottom: 2rem;
}

/* Image Card: Sidebar layout for thumbnails */
.image-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.image-card .card-thumb {
    flex-shrink: 0;
    width: 180px;
}

.image-card .card-thumb img {
    width: 100%;
    height: auto;
    border: 2px solid var(--neon-pink);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 0, 170, 0.3);
}

.image-card .card-content {
    flex: 1;
}

.image-card h4 {
    margin-top: 0;
}

/* Gallery Card: Grid layout for multiple images */
.gallery-card .card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 1rem 0;
}

.gallery-card .card-gallery img {
    width: 100%;
    height: auto;
    border: 1px solid var(--neon-cyan);
    border-radius: 3px;
}

/* Toned-down Cyan story titles */
h4 {
    color: var(--neon-cyan); 
    font-size: 1.6rem;
    margin-top: 0.5rem; /* NEW: Snapped much closer to elements above it */
    margin-bottom: 0.25rem; /* NEW: Tighter spacing directly above summary text */
    text-shadow: 0 0 2px rgba(0, 243, 255, 0.4);
}

h4 a {
    color: inherit;
    text-decoration: none;
    text-shadow: inherit;
}

/* Description paragraph formatting below titles */
main.container p {
    color: #e0e0e0;
    margin-bottom: 0.75rem; /* NEW: Drastically tightened the gap above metadata tags */
}

/* Custom list categorization tags wrapper */
.meta {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    margin-top: 0px;
    line-height: 1.6; /* NEW: Keeps row wraps uniform and neat */
}

/* Title categories - Intense Radioactive Orange labels */
.title {
    color: var(--neon-orange); 
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-right: 4px;
}

/* Target properties inside your metadata block rows - Sharp Radioactive Green content fill */
.content {
    color: var(--neon-green); 
    margin-right: 1.2rem;
}

/* Ensure links nested inside meta rules inherit the clean radioactive green style */
.content a {
    color: var(--neon-green);
    text-decoration: underline;
}
.content a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* Subtle radioactive divider for tag lists */
.pipe-accent {
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 4px var(--neon-orange);
}

@media (max-width: 700px) {
    .image-card {
        flex-direction: column;
    }
    .image-card .card-thumb {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   [contact-styles]
   ========================================================================== */

.contact-container {
    width: 100%;
    max-width: 950px;
    margin: 40px auto;
    background-color: var(--bg-wine-medium); /* Matches the framing container card depth */
    border: 2px solid var(--neon-pink); 
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.95);
    font-family: inherit;
    box-sizing: border-box;
}

.contact-container h2 {
    color: var(--neon-pink); 
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 0 0 4px rgba(255, 0, 170, 0.4);
}

.contact-categories-title {
    color: var(--neon-cyan); 
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.checkbox-subgroup-title {
    color: var(--neon-yellow);
    font-size: 1rem;
    font-weight: bold;
    margin: 15px 0 8px 0;
    border-bottom: 1px solid rgba(255, 234, 0, 0.1);
    padding-bottom: 3px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.category-item {
    display: flex;
    align-items: center;
    position: relative;
}

/* Hides base forms inputs to facilitate custom box injection maps */
.category-item .css-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0; width: 0;
}

.category-item label {
    display: flex !important;
    align-items: center;
    color: var(--neon-cyan) !important;
    cursor: pointer;
    font-size: 1rem !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    user-select: none;
}

/* Structural layouts generating the blank checkable grid square boundaries */
.category-item label::before {
    content: "";
    display: inline-block;
    width: 18px; height: 18px;
    margin-right: 10px;
    background-color: var(--bg-wine-inkwell); 
    border: 2px solid var(--neon-cyan);
    border-radius: 3px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    color: var(--neon-green); 
    font-weight: bold;
}

/* Injects the selection validation star into active checkboxes */
.category-item .css-checkbox:checked + label::before {
    content: "★";
    background-color: var(--bg-wine-inkwell); 
    border-color: var(--neon-pink); 
    box-shadow: 0 0 6px var(--neon-green);
}

.contact-container > label,
.conditional-panel > label,
#core-identity-block > label {
    display: block;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 15px;
}

.contact-subtext {
    display: block;
    color: var(--neon-yellow);
    font-style: italic;
    font-size: 0.9rem;
    margin-top: -6px;
    margin-bottom: 12px;
}

/* Input structures handling form data gathering tracking rules */
.contact-container input[type="text"],
.contact-container input[type="date"],
.contact-container select,
.contact-container textarea {
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-wine-inkwell); 
    color: #ffffff;
    border: 1px solid rgba(255, 0, 170, 0.25); 
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Flat grey design tracking locked state interactions */
.contact-container input:disabled,
.contact-container select:disabled,
.contact-container textarea:disabled {
    background-color: rgba(2, 0, 0, 0.6);
    border-color: #333333;
    color: #555555;
    cursor: not-allowed;
}

/* Focus highlighting adding cyan canvas borders when typing text fields */
.contact-container input:focus,
.contact-container select:focus,
.contact-container textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.5);
}

.contact-container textarea {
    height: 140px;
    resize: none;
}

/* Sub-panels tucked hidden from visual view until explicit checkbox triggers click */
.conditional-panel {
    display: none; 
    border-left: 3px solid var(--neon-pink);
    padding-left: 15px;
    margin-bottom: 20px;
    margin-top: 15px;
}

/* Main validation submission action execution triggers - High-contrast Pink Brick */
#contact-submit-btn {
    background-color: var(--neon-pink); 
    color: var(--neon-yellow); 
    border: 2px solid var(--neon-pink);
    padding: 14px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    display: block;
    width: 100%;
    margin-top: 25px;
    box-shadow: 0 0 8px rgba(255, 0, 170, 0.2);
    transition: all 0.3s ease;
}

/* Inverts hover accents directly when processing button tracking sweeps */
#contact-submit-btn:hover:not(:disabled) {
    background-color: var(--neon-cyan); 
    color: var(--bg-wine-dark); 
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px var(--neon-cyan);
}

#contact-submit-btn:disabled {
    background-color: #333333;
    color: #666666;
    border-color: #333333;
    cursor: not-allowed;
    box-shadow: none;
}

#form-status-display {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--neon-green); 
    text-shadow: 0 0 6px var(--neon-green);
}

/* Appends glowing indicators on required layout variables automatically */
.required-label::before {
    content: "* ";
    color: var(--neon-pink);
    font-weight: bold;
    display: inline-block;
    margin-right: 4px;
    text-shadow: 0 0 5px var(--neon-pink);
}

/* ==========================================================================
   [beta-styles]
   ========================================================================== */

/* Outer anchor system pinning input modules contextually right next to paragraphs */
.review-wrapper {
    position: relative;
    margin-bottom: 0.8rem;
    width: 100%;
}

/* Hides functional checkbox driving paragraph critique panels */
.review-toggle {
    position: absolute;
    overflow: hidden;
    clip: rect(0 0 0 0);
    height: 1px; width: 1px;
    margin: -1px; padding: 0; border: 0;
}

/* Positions standard paragraph lines side-by-side with text-level stars cleanly */
.review-wrapper p {
    display: block;
    margin-top: -36px !important;
    margin-left: 35px !important;
    margin-bottom: 0 !important;
}

/* Overlay dropdown window enclosing the critique comment components */
.comment-popup {
    display: none;
    background-color: var(--bg-wine-medium);
    border: 2px solid var(--neon-pink);
    border-radius: 6px;
    padding: 10px;
    width: 90%;
    max-width: 320px;
    top: 25px; left: 0; margin-left: 0;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.95);
    position: absolute;
    z-index: 100;
}

/* Repositions popup balance specifically tracking broad scale layouts */
@media (min-width: 801px) {
    .comment-popup {
        margin-left: 32px;
    }
}

/* Exposes target feedback modules instantly when relevant selectors flag active */
.review-toggle:checked + .comment-popup {
    display: block !important;
}

.review-toggle:checked + label + .comment-popup {
    display: block !important;
}

/* Input textareas nested inside paragraph evaluation panels */
.comment-textarea {
    width: 93%;
    height: 65px;
    background-color: var(--bg-wine-inkwell);
    color: white;
    border: 1px solid var(--neon-pink);
    padding: 6px;
    border-radius: 4px;
    resize: none;
    font-family: sans-serif;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 6px var(--neon-cyan);
}

/* Submit evaluation components firing paragraph-level review arrays */
.comment-submit-btn {
    background-color: var(--neon-pink);
    color: var(--neon-yellow);
    border: none;
    padding: 4px 12px;
    margin-top: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: block;
    margin-left: auto;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    background-color: var(--neon-cyan);
    color: var(--bg-wine-dark);
}

.comment-submit-btn:disabled {
    background-color: #333333;
    color: #666666;
    cursor: not-allowed;
}

/* ==========================================================================
   [footer-styles]
   ========================================================================== */

/* Main baseline site footer platform boundaries */
.site-footer {
    flex-shrink: 0;
    background-color: var(--bg-wine-medium); /* Swapped to medium wine */
    padding: 1.5rem 0;
    border-top: 2px solid var(--neon-pink);
    margin-top: 4rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.9);
}

.site-footer .container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    max-width: none;
    padding: 0 1rem;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    align-self: flex-end;
}

.social-links img {
    height: 1.8rem;
    width: auto;
    transition: filter 0.3s ease;
}

.social-links a:hover img {
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

/* Footer text - Completely flat Cyber Purple with 0 glow to tie back to h1 */
.site-footer p {
    color: var(--neon-purple); 
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-shadow: none; 
    margin-bottom: 0;
    text-align: center;
}

/* ==========================================================================
   [lightbox-styles] - General Purpose Click-to-Expand
   ========================================================================== */

.lightbox-toggle {
    display: none;
}

.card-thumb label {
    cursor: zoom-in;
    display: block;
}

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox-toggle:checked ~ .lightbox-overlay {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 85vh;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 2rem; right: 2rem;
    color: var(--neon-yellow);
    font-size: 2.5rem;
    cursor: pointer;
    font-weight: bold;
    text-shadow: 0 0 8px var(--neon-yellow);
}