/* --- DYNAMIC THEME ENGINE --- */
:root {
    /* DEFAULT (DARK) VARIABLES */
    --bg-main: #000000;
    --bg-card: rgba(17, 17, 17, 0.7); /* Semi-transparent for glass effect */
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(0, 0, 0, 0.8);
    --accent-blue: #2997FF;
    --card-shadow: none;
    --hero-overlay: linear-gradient(to top, #000 0%, transparent 60%);
    --btn-text: #fff;
    --transition-speed: 0.5s;

    /* ADD THIS: Dark Mode Ambient Colors */
    --gradient-1: #000000;
    --gradient-2: #020617; /* Slate 900 */
    --gradient-3: #172554; /* Indigo 950 */

    /* ADD THIS: Light Mode Ambient Colors */
    --gradient-1: #ffffff;
    --gradient-2: #f0f9ff; /* Sky 50 */
    --gradient-3: #f8fafc; /* Slate 50 */
}

[data-theme="light"] {
    /* LIGHT MODE OVERRIDES */
    --bg-main: #F5F5F7;
    --bg-card: rgba(255, 255, 255, 0.75); /* Semi-transparent White */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.7);
    --accent-blue: #0071e3;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --hero-overlay: linear-gradient(to top, #F5F5F7 0%, transparent 60%);
    --btn-text: #fff;
    

    /* LIGHT GRADIENT PALETTE (Cloud/Sky) */
    --gradient-1: #ffffff;
    --gradient-2: #e0f2fe;    /* Sky 100 */
    --gradient-3: #f1f5f9;    /* Slate 100 */
}

/* --- BASE STYLES --- */
html {
    background-color: var(--bg-main); /* This ensures the 'Skeleton' matches the theme */
}

/* 2. DARK MODE (Explicit) */
html[data-theme="dark"] {
    --bg-main: #000000;
    --bg-card: rgba(17, 17, 17, 0.6);
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(0, 0, 0, 0.8);
    --accent-blue: #2997FF;
    --card-shadow: none;
    --hero-overlay: linear-gradient(to top, #000 0%, transparent 60%);
    --btn-text: #fff;
    
    /* DARK GRADIENT (Midnight) */
    --gradient-1: #000000;
    --gradient-2: #020617; /* Slate 950 */
    --gradient-3: #1e1b4b; /* Indigo 950 */
}

/* 3. LIGHT MODE (Explicit) */
html[data-theme="light"] {
    --bg-main: #F5F5F7;
    --bg-card: rgba(255, 255, 255, 0.6);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.7);
    --accent-blue: #0071e3;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --hero-overlay: linear-gradient(to top, #F5F5F7 0%, transparent 60%);
    --btn-text: #fff;

    /* LIGHT GRADIENT (Sky) */
    --gradient-1: #ffffff;
    --gradient-2: #e0f2fe; /* Sky 100 */
    --gradient-3: #f1f5f9; /* Slate 100 */
}


body {
    background-color: transparent; /* Allows gradient to show */
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: color var(--transition-speed) ease;
    position: relative; /* Ensures stacking context works */
}

/* NAVBAR (Z-Index Fixed) */
.glass-nav {
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.5s ease, border-color 0.5s ease;
    
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Super High Z-Index to guarantee it's on top of everything */
    z-index: 9999 !important; 
    
    /* Ensure clicks work */
    pointer-events: auto !important; 
}

/* Ensure buttons inside are clickable */
.glass-nav button, 
.glass-nav a {
    pointer-events: auto !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* BENTO CARDS */
.bento-card {
    
    /* Update this line to use a semi-transparent background */
    background: rgba(17, 17, 17, 0.8); /* For Dark Mode */
    backdrop-filter: blur(20px); /* This blurs the moving background behind the card */
    
    background: var(--bg-card);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

[data-theme="light"] .bento-card {
    background: rgba(255, 255, 255, 0.8); /* For Light Mode */
}

/* --- GLOBAL HOVER ENGINE (PREMIUM MOTION) --- */

.bento-card:hover {
    transform: scale(1.01);
    border-color: var(--accent-blue);
}


/* 1. PHOTO ZOOM (For all images inside Bento/Team cards) */
.bento-card img,
.team-card img,
.reveal-img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
    will-change: transform; /* optimizing performance */
    transform-origin: center center;
}

/* The Trigger */
.bento-card:hover img,
.team-card:hover img {
    transform: scale(1.06); /* 6% Zoom is the "Goldilocks" zone. Not too much, not too little. */
    filter: contrast(110%); /* Subtle pop in contrast on hover */
}

/* 2. WATERMARK BREATHING (For the Icon backgrounds in About page) */
.watermark-icon,
.watermark-pillar {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    will-change: transform;
}

/* Rotated Icons Zoom */
.bento-card:hover .watermark-icon {
    /* Keep the rotation (-10deg) but add scale */
    transform: rotate(-10deg) scale(1.15); 
    opacity: 0.08; /* Make it slightly more visible on hover */
}

/* Pillar Icon Zoom (Needs to stay upright) */
.bento-card:hover .watermark-pillar {
    /* Keep upright, just scale */
    transform: scale(1.1);
    opacity: 0.08;
}

/* 3. CARD LIFT (Subtle 3D feel for the container) */
.bento-card {
    /* Existing transition... */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-5px); /* Lift the card up physically */
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3); /* Add depth shadow below */
}

/* Light Mode Shadow Adjustment */
[data-theme="light"] .bento-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
}

/* TYPOGRAPHY UTILS */
.text-gradient {
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-sub { color: var(--text-secondary); }

/* BUTTONS & TOGGLES */
.btn-apple {
    background: var(--accent-blue);
    color: var(--btn-text);
    padding: 10px 20px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-apple:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.theme-toggle {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    color: var(--text-primary);
}
.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

/* HERO GRADIENT */
.hero-gradient { background: var(--hero-overlay); }

/* ANIMATIONS */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-hero { animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.3s; }
.delay-300 { animation-delay: 0.5s; }

/* --- INFINITE MARQUEE --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    /* Glass effect for the track */
    background: var(--bg-card); 
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
}

.marquee-track {
    display: inline-block;
    animation: marquee 40s linear infinite; /* Adjust speed here (40s = slow/classic) */
    will-change: transform;
}

/* The infinite loop calculation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Hover Effect: Pause on hover so people can read */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

/* Typography for the Marquee */
.marquee-item {
    display: inline-block;
    font-size: 3rem; /* Massive Text */
    font-weight: 800; /* Extra Bold */
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-secondary); /* Outline Style (Classic) */
    margin: 0 40px;
    letter-spacing: -2px;
    transition: all 0.3s ease;
}

/* Fill the text on hover for a cool interaction */
.marquee-item:hover {
    color: var(--text-primary);
    -webkit-text-stroke: 0px;
}

/* --- AMBIENT MESH BACKGROUND --- */
.ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Changed from -50 to -1 to ensure it stays visible */
    background: linear-gradient(
        -45deg, 
        var(--gradient-1), 
        var(--gradient-2), 
        var(--gradient-3), 
        var(--gradient-1)
    );
    background-size: 400% 400%; /* Make the gradient huge so we can scroll through it */
    animation: gradientShift 20s ease infinite; /* Slow, breathing movement */
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* The Animation Logic */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- FORM DROPDOWN FIX --- */
select option {
    /* Force solid colors because dropdowns don't support transparency well */
    background-color: var(--bg-main); 
    color: var(--text-primary);
    padding: 12px;
}

/* Specific Override for Dark Mode to ensure high contrast */
[data-theme="dark"] select option {
    background-color: #000000;
    color: #ffffff;
}

/* Specific Override for Light Mode */
[data-theme="light"] select option {
    background-color: #ffffff;
    color: #000000;
}

/* --- MERGED PAGE STYLES --- */

/* 1. SCROLL ANIMATIONS */
.reveal-base { opacity: 0; transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform, opacity; }
.reveal-up { transform: translateY(50px); }
.reveal-up.in-view { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translateX(50px); }
.reveal-left.in-view { opacity: 1; transform: translateX(0); }

/* 2. MARQUEE LOGOS */
.marquee-container { background: var(--bg-card); backdrop-filter: blur(10px); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); transition: background-color 0.5s ease; }
.marquee-logo { height: 50px; width: 140px; object-fit: contain; margin: 0 40px; opacity: 0.6; transition: all 0.4s ease; filter: grayscale(100%) brightness(0) invert(1); }
.logo-boost { transform: scale(1.6); margin: 0 60px; }
[data-theme="light"] .marquee-logo { filter: grayscale(100%) brightness(0); }
[data-theme="dark"] .marquee-container:hover { background-color: #ffffff; }
[data-theme="dark"] .marquee-container:hover .marquee-logo { filter: grayscale(0%) brightness(1) invert(0); opacity: 1; }
.marquee-container:hover .marquee-logo:hover { transform: scale(1.1); }

/* 3. MAGAZINE / FEATURED WORK */
.poster-card { position: relative; overflow: hidden; }
.poster-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); filter: brightness(0.7); }
.poster-card:hover .poster-bg { transform: scale(1.05); filter: brightness(0.9); }
.poster-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 3rem; z-index: 10; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%); }

.standard-card { background: var(--bg-card); border: 1px solid var(--border-color); overflow: hidden; transition: border-color 0.3s ease; }
.standard-card:hover { border-color: var(--accent-blue); }
.standard-img-wrapper { overflow: hidden; height: 300px; }
.standard-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.standard-card:hover .standard-bg { transform: scale(1.05); }

/* 4. ALBUM & GALLERY STYLES */
.vault-input { background: transparent; border: none; border-bottom: 2px solid var(--border-color); color: var(--text-primary); font-size: 1.5rem; font-weight: 700; text-align: center; width: 100%; max-width: 600px; padding: 1rem; outline: none; transition: border-color 0.3s ease; }
.vault-input:focus { border-color: var(--accent-blue); }

.album-header { position: relative; height: 50vh; display: flex; align-items: flex-end; overflow: hidden; }
.album-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; filter: brightness(0.4); z-index: 0; }
.album-info { position: relative; z-index: 10; width: 100%; padding-bottom: 3rem; }

.masonry-wrapper { display: flex; gap: 1.5rem; align-items: flex-start; }
.masonry-col { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
@media (max-width: 768px) { .masonry-wrapper { flex-direction: column; } }

.photo-item { position: relative; border-radius: 4px; overflow: hidden; cursor: zoom-in; background: var(--bg-card); width: 100%; opacity: 0; animation: fadeUp 0.8s ease forwards; }
.photo-img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.photo-item:hover .photo-img { transform: scale(1.05); }

/* 5. LIGHTBOX & MODAL */
[data-theme="light"] { --lb-bg: rgba(255,255,255,0.98); --lb-text: #000; --lb-btn-bg: rgba(0, 0, 0, 0.05); }
[data-theme="dark"] { --lb-bg: rgba(0,0,0,0.98); --lb-text: #fff; --lb-btn-bg: rgba(255, 255, 255, 0.1); }
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--lb-bg); z-index: 200; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-img-container { position: relative; max-width: 90vw; max-height: 80vh; }
.lightbox-img { max-width: 100%; max-height: 80vh; object-fit: contain; }

.project-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; display: flex; align-items: center; justify-content: center; padding: 20px; }
.project-modal.active { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(10px); }
.modal-content { position: relative; width: 100%; max-width: 1100px; height: 85vh; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 24px; overflow: hidden; transform: translateY(30px); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .modal-content { grid-template-columns: 1.2fr 0.8fr; } }
.project-modal.active .modal-content { transform: translateY(0); }

/* 6. SPLIT SCREEN */
.split-container { min-height: 80vh; width: 100%; display: flex; flex-direction: column; margin-top: 80px; }
@media (min-width: 768px) { .split-container { flex-direction: row; height: calc(100vh - 80px); } }
.split-col { position: relative; flex: 1; min-height: 50vh; overflow: hidden; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
@media (min-width: 768px) { .split-col { height: 100%; } }
.split-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease; filter: brightness(0.6); }
.split-col:hover .split-bg { transform: scale(1.05); filter: brightness(0.8); }
.split-content { position: relative; z-index: 10; text-align: center; transform: translateY(0); transition: transform 0.5s ease; }
.split-col:hover .split-content { transform: scale(1.02); }
.split-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 1rem; display: block; }
.split-title { font-size: 3rem; font-weight: 900; letter-spacing: -0.05em; color: white; margin-bottom: 1.5rem; line-height: 1; }
@media (min-width: 1024px) { .split-title { font-size: 5rem; } }
.split-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 1rem 2rem; border-radius: 99px; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.3); color: white; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.3s ease; opacity: 0; transform: translateY(20px); }
.split-col:hover .split-btn { opacity: 1; transform: translateY(0); background: white; color: black; }