/* ===== HAZY THEME SYSTEM ===== */
:root {
    /* ===== CORE COLOR PALETTE ===== */
    /* Primary Brand Colors - Cinematic Golden */
    --hazy-gold: #d4af37;
    --hazy-gold-dark: #b8860b;
    --hazy-gold-darker: #8b6914;
    --hazy-gold-light: #f4e4bc;
    --hazy-gold-lighter: #fff8dc;
    --hazy-gold-accent: #ffd700;
    --hazy-gold-warm: #daa520;
    --hazy-gold-rich: #b8860b;
    --hazy-gold-soft: #f0e68c;
    
    /* ===== BACKGROUND SYSTEM ===== */
    /* Solid Backgrounds */
    --bg-primary: #000;
    --bg-secondary: #1a1a1a;
    
    /* Transparent Backgrounds - Easy to adjust opacity */
    --bg-overlay-light: rgba(0, 0, 0, 0.7);
    --bg-overlay-medium: rgba(0, 0, 0, 0.8);
    --bg-overlay-heavy: rgba(0, 0, 0, 0.85);
    --bg-overlay-very-heavy: rgba(0, 0, 0, 0.9);
    --bg-overlay-extreme: rgba(0, 0, 0, 0.95);
    
    /* Special Backgrounds */
    --bg-crt-overlay: rgba(20, 20, 30, 0.2);
    --bg-crt-dark: rgba(18, 16, 16, 0);
    --bg-crt-black: rgba(0, 0, 0, 0.25);
    
    /* ===== TEXT SYSTEM ===== */
    --text-primary: #fff;
    --text-secondary: var(--hazy-gold);
    --text-tertiary: var(--hazy-gold-dark);
    
    /* ===== BORDER SYSTEM ===== */
    --border-primary: var(--hazy-gold);
    --border-thickness: 2px;
    --border-radius-small: 4px;
    --border-radius-medium: 8px;
    
    /* ===== SHADOW SYSTEM ===== */
    /* Golden Shadows - Easy to adjust intensity */
    --shadow-gold-subtle: rgba(212, 175, 55, 0.1);
    --shadow-gold-light: rgba(212, 175, 55, 0.2);
    --shadow-gold-medium: rgba(212, 175, 55, 0.3);
    --shadow-gold-strong: rgba(212, 175, 55, 0.5);
    --shadow-gold-glow: rgba(212, 175, 55, 0.8);
    
    /* Neutral Shadows */
    --shadow-neutral: rgba(0, 0, 0, 0.08);
    
    /* ===== SPACING SYSTEM ===== */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    
    /* ===== TYPOGRAPHY SYSTEM ===== */
    --font-family-primary: 'JetBrains Mono', 'Courier New', monospace;
    --font-size-xs: 0.9rem;   /* 14.4px */
    --font-size-sm: 1rem;     /* 16px */
    --font-size-md: 1.1rem;   /* 17.6px */
    --font-size-lg: 1.5rem;   /* 24px */
    --font-size-xl: 2.5rem;   /* 40px */
    --font-size-2xl: 3rem;    /* 48px */
    
    /* ===== ANIMATION SYSTEM ===== */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* ===== Z-INDEX SYSTEM ===== */
    --z-base: 1;
    --z-overlay: 2;
    --z-modal: 1000;
    --z-loading: 1000;
    
    /* ===== LAYOUT SYSTEM ===== */
    --container-max-width: 800px;
    --sidebar-width: 280px;
    --lightbox-sidebar-width: 400px;
}

/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    background: var(--bg-primary) url('Index1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-image var(--transition-slow);
}

/* ===== CRT EFFECT SYSTEM ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        var(--bg-crt-dark) 50%,
        var(--bg-crt-black) 50%
    );
    background-size: 100% 4px;
    z-index: var(--z-overlay);
    pointer-events: none;
    animation: flicker 0.15s infinite linear;
}

@keyframes flicker {
    0% { opacity: 0.278; }
    5% { opacity: 0.347; }
    10% { opacity: 0.236; }
    15% { opacity: 0.906; }
    20% { opacity: 0.181; }
    25% { opacity: 0.838; }
    30% { opacity: 0.655; }
    35% { opacity: 0.678; }
    40% { opacity: 0.265; }
    45% { opacity: 0.846; }
    50% { opacity: 0.701; }
    55% { opacity: 0.838; }
    60% { opacity: 0.655; }
    65% { opacity: 0.678; }
    70% { opacity: 0.265; }
    75% { opacity: 0.846; }
    80% { opacity: 0.701; }
    85% { opacity: 0.838; }
    90% { opacity: 0.655; }
    95% { opacity: 0.678; }
    100% { opacity: 0.265; }
}

/* ===== UTILITY CLASSES ===== */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(120deg, 
        var(--hazy-gold), 
        var(--hazy-gold-warm), 
        var(--hazy-gold-dark), 
        var(--hazy-gold-rich), 
        var(--hazy-gold-accent), 
        var(--hazy-gold-soft),
        var(--hazy-gold)
    );
    background-size: 200% 200%;
    animation: gradientShift 18s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.lore-dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-crt-overlay);
    z-index: var(--z-base);
    pointer-events: none;
}

/* ===== LAYOUT COMPONENTS ===== */
/* Container System */
.container, .blog-main, .gallery-main {
    position: relative;
    z-index: var(--z-base);
    text-align: center;
    max-width: var(--container-max-width);
    padding: var(--spacing-xl);
}

/* Sidebar System */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-overlay-heavy);
    border-right: var(--border-thickness) solid var(--border-primary);
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-xl) var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    z-index: var(--z-overlay);
}

/* ===== COMPONENT STYLES ===== */
/* Title System */
.title, .blog-title, .gallery-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
    font-family: var(--font-family-primary);
}

.title {
    text-shadow: 0 0 10px var(--hazy-gold), 0 0 20px var(--hazy-gold-accent);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { 
        text-shadow: 0 0 10px var(--hazy-gold), 0 0 20px var(--hazy-gold), 0 0 30px var(--shadow-gold-glow); 
    }
    to { 
        text-shadow: 0 0 20px var(--hazy-gold), 0 0 30px var(--hazy-gold-accent), 0 0 40px var(--shadow-gold-glow), 0 0 50px var(--hazy-gold-warm); 
    }
}

/* Menu System */
.menu {
    background: var(--bg-overlay-medium);
    border: var(--border-thickness) solid var(--border-primary);
    border-radius: var(--border-radius-medium);
    padding: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    box-shadow: 0 0 20px var(--shadow-gold-medium);
}

.menu-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

.menu-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.menu-item {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-medium);
    border: 1px solid transparent;
    border-radius: var(--border-radius-small);
}

.menu-item:hover {
    background: linear-gradient(90deg, var(--shadow-gold-subtle), var(--shadow-gold-light));
    border-color: var(--hazy-gold-accent);
    transform: translateX(10px);
    box-shadow: 0 0 15px var(--shadow-gold-medium);
}

.menu-item.selected {
    background: linear-gradient(90deg, var(--shadow-gold-light), var(--shadow-gold-medium));
    border-color: var(--hazy-gold-accent);
    box-shadow: 0 0 15px var(--shadow-gold-strong), inset 0 0 10px var(--shadow-gold-subtle);
}

.menu-item::before {
    content: '>';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.menu-item:hover::before,
.menu-item.selected::before {
    opacity: 1;
}

/* Button System */
.back-btn {
    display: inline-block;
    background: var(--text-primary);
    color: var(--text-secondary);
    font-family: var(--font-family-primary);
    font-weight: bold;
    border: none;
    border-radius: var(--border-radius-small);
    padding: var(--spacing-sm) var(--spacing-lg);
    text-decoration: none;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 8px var(--shadow-neutral);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.back-btn:hover {
    background: var(--text-secondary);
    color: var(--text-primary);
}

/* Navigation System */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.sidebar-nav li {
    font-size: var(--font-size-sm);
}

.sidebar-nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 2px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-nav a:hover {
    background: var(--text-secondary);
    color: var(--text-primary);
}

/* ===== PAGE LAYOUTS ===== */
/* Blog Layout */
.blog-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    background: none;
    position: relative;
    z-index: var(--z-base);
}

.blog-main {
    flex: 1;
    padding: var(--spacing-2xl) var(--spacing-xl);
    background: var(--bg-overlay-light);
    color: var(--text-primary);
    min-height: 100vh;
    text-align: left;
    z-index: var(--z-overlay);
}

.blog-content {
    font-size: var(--font-size-md);
    line-height: 1.7;
    font-family: var(--font-family-primary);
}

/* Gallery Layout */
.gallery-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    background: none;
    position: relative;
    z-index: var(--z-base);
}

.gallery-main {
    flex: 1;
    padding: var(--spacing-xl);
    background: var(--bg-overlay-light);
    color: var(--text-primary);
    min-height: 100vh;
    z-index: var(--z-overlay);
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    text-align: initial;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}

.gallery-item {
    background: linear-gradient(135deg, var(--bg-overlay-medium), var(--shadow-gold-subtle));
    border: var(--border-thickness) solid var(--hazy-gold);
    border-radius: var(--border-radius-medium);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-medium);
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--hazy-gold-accent);
    box-shadow: 0 10px 25px var(--shadow-gold-medium), 0 0 20px var(--shadow-gold-glow);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-title {
    padding: var(--spacing-md);
    font-family: var(--font-family-primary);
    color: var(--text-secondary);
    font-weight: bold;
}

/* ===== LIGHTBOX SYSTEM ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-overlay-extreme);
    z-index: var(--z-modal);
    display: none;
    flex-direction: row;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.lightbox-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-sidebar {
    width: var(--lightbox-sidebar-width);
    background: linear-gradient(180deg, var(--bg-overlay-very-heavy), var(--shadow-gold-subtle));
    border-left: var(--border-thickness) solid var(--hazy-gold);
    padding: var(--spacing-2xl) var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    font-family: var(--font-family-primary);
    z-index: calc(var(--z-modal) + 1);
}

.art-title {
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    font-family: var(--font-family-primary);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.art-date {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    font-family: var(--font-family-primary);
    margin-bottom: var(--spacing-xl);
}

.art-description {
    font-size: var(--font-size-md);
    line-height: 1.7;
    color: var(--text-primary);
    font-family: var(--font-family-primary);
}

/* ===== LOADING SYSTEM ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-loading);
    transition: opacity var(--transition-slow);
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-size: var(--font-size-lg);
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: "Loading."; }
    40% { content: "Loading.."; }
    60% { content: "Loading..."; }
    80%, 100% { content: "Loading"; }
}

/* ===== DECORATIVE ELEMENTS ===== */
.ascii-cloud {
    position: absolute;
    left: -200px;
    top: 0;
    color: var(--hazy-gold-light);
    opacity: 0.6;
    font-family: var(--font-family-primary);
    font-size: 2.2rem;
    pointer-events: none;
    user-select: none;
    white-space: pre;
    z-index: 0;
    filter: drop-shadow(0 2px 8px var(--shadow-gold-medium));
    transition: opacity 1.5s, left 12s linear;
}

/* ===== CINEMATIC GOLDEN ACCENTS ===== */
.golden-accent {
    color: var(--hazy-gold-accent);
    text-shadow: 0 0 8px var(--shadow-gold-glow);
}

.golden-border {
    border-color: var(--hazy-gold);
    box-shadow: 0 0 15px var(--shadow-gold-medium);
}

.golden-highlight {
    background: linear-gradient(45deg, var(--hazy-gold-subtle), var(--shadow-gold-light));
    border: 1px solid var(--hazy-gold-light);
}

.golden-text {
    color: var(--hazy-gold);
    text-shadow: 0 0 5px var(--shadow-gold-light);
}

.golden-glow {
    box-shadow: 0 0 20px var(--shadow-gold-glow);
}

.golden-gradient-bg {
    background: linear-gradient(135deg, var(--hazy-gold-subtle), var(--shadow-gold-light), var(--hazy-gold-subtle));
}

/* ===== PAGE-SPECIFIC OVERRIDES ===== */
body.lore-page {
    background: var(--bg-secondary) !important;
}

body.lore-page::before {
    display: none !important;
}

/* ===== INSTRUCTIONS ===== */
.instructions {
    margin-top: var(--spacing-xl);
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN SYSTEM ===== */
@media (max-width: 1200px) {
    .lightbox {
        flex-direction: column;
    }
    
    .lightbox-sidebar {
        width: 100%;
        border-left: none;
        border-top: var(--border-thickness) solid var(--border-primary);
        padding: var(--spacing-xl);
    }
}

@media (max-width: 900px) {
    .blog-layout, .gallery-layout {
        flex-direction: column;
        width: 100vw;
        max-width: 100vw;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: var(--border-thickness) solid var(--border-primary);
        flex-direction: row;
        align-items: flex-start;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    .blog-main, .gallery-main {
        padding: var(--spacing-md);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .title {
        font-size: var(--font-size-lg);
    }
    
    .menu-title {
        font-size: var(--font-size-md);
    }
} 