/* --- 1. DARK MODE VARIABLES (DEFAULT) --- */
:root {
    --bg-main: #0a0a0a;
    --text-hero: #ffffff;
    --text-desc: #a1a1aa;
    --grid-color: rgba(255, 255, 255, 0.04);
    --code-base: #5c6370;
    --readability-glow: rgba(10, 10, 10, 0.95);
    
    /* Dark Mode Syntax Colors (IDE Style) */
    --syn-comment: #5c6370;
    --syn-string: #98c379;
    --syn-tag: #61afef;
    --syn-keyword: #c678dd;
    --syn-function: #e5c07b;
    --syn-attr: #d19a66;
}

/* --- 2. LIGHT MODE VARIABLES --- */
[data-theme="light"] {
    --bg-main: #f4f5f7;
    --text-hero: #111111;
    --text-desc: #4b5563;
    --grid-color: rgba(0, 0, 0, 0.04);
    --code-base: #586069;
    --readability-glow: rgba(255, 255, 255, 0.95);
    
    /* Light Mode Syntax Colors */
    --syn-comment: #9ca3af;
    --syn-string: #d73a49;
    --syn-tag: #22863a;
    --syn-keyword: #6f42c1;
    --syn-function: #005cc5;
    --syn-attr: #e36209;
}

/* --- 3. BASE STYLES & SMOOTH TRANSITIONS --- */
body {
    margin: 0;
    background-color: var(--bg-main); 
    color: var(--text-desc); 
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px;
    
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* --- 4. EXPOSED BACKGROUND CODE --- */
#raw-source-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    font-size: 1.25rem; 
    opacity: 0.85; 
    filter: blur(5px); 
    padding: 2rem;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    pointer-events: none;
    overflow: hidden;
    color: var(--code-base); 
    transition: color 0.5s ease;
}

/* Syntax Highlight Classes */
.syn-comment { color: var(--syn-comment); transition: color 0.5s ease; }
.syn-string { color: var(--syn-string); font-weight: bold; transition: color 0.5s ease; }
.syn-tag { color: var(--syn-tag); font-weight: bold; transition: color 0.5s ease; }
.syn-keyword { color: var(--syn-keyword); font-weight: bold; transition: color 0.5s ease; }
.syn-function { color: var(--syn-function); font-weight: bold; transition: color 0.5s ease; }
.syn-attr { color: var(--syn-attr); transition: color 0.5s ease; }

/* --- 5. FOREGROUND TEXT --- */
.transparent-shell {
    width: 100%;
    max-width: 900px;
    margin-top: 8rem; 
    z-index: 10;
    text-align: center;
}

h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: 3.8rem; 
    margin: 0 0 1rem 0;
    line-height: 1.4; 
    color: var(--text-hero);
    text-shadow: 0 0 40px var(--readability-glow), 0 0 20px var(--readability-glow), 0 0 10px var(--readability-glow);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.hero-desc {
    color: var(--text-desc); 
    font-family: sans-serif; 
    line-height: 1.6; 
    max-width: 600px;
    font-size: 1.15rem;
    text-shadow: 0 0 20px var(--readability-glow); 
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* --- 6. THEME TOGGLE BUTTON --- */
.theme-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(128, 128, 128, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--grid-color);
    color: var(--text-hero);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(128, 128, 128, 0.2);
}
