@font-face {
    font-family: 'Sprite Graffiti';
    src: url('../fonts/SpriteGraffiti-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- GLOBAL CSS --- */
body {
    background-color: #e5e5e5;
    color: #111111;
    overflow-x: hidden;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    cursor: none;
    transition: background-color 1.2s cubic-bezier(0.16, 1, 0.3, 1), background 1.2s cubic-bezier(0.16, 1, 0.3, 1), color 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Page specific overrides for default bg/text */
body.dark-theme {
    background-color: #111111;
    color: #ffffff;
}

body.contact-theme {
    background-color: #e5e5e5;
    color: #111111;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Social Hover Contrast States */
body.contact-theme.hover-active * { transition: color 0.4s ease; }
body.contact-theme.hover-active #contact-label { color: rgba(255,255,255,0.7) !important; }
body.contact-theme.hover-active #contact-email { color: white !important; -webkit-text-stroke: 0px transparent !important; }
body.contact-theme.hover-active #contact-phone { color: rgba(255,255,255,0.9) !important; }
body.contact-theme.hover-active .social-hover-link { color: rgba(255,255,255,0.5) !important; border-color: transparent !important; }
body.contact-theme.hover-active .social-hover-link:hover { color: white !important; }

* {
    cursor: none !important;
}
@media (pointer: coarse) {
    #custom-cursor { display: none !important; }
    * { cursor: auto !important; }
}

::selection {
    background: #ff0000;
    color: #ffffff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #121212; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ff0000; }

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- PREMIUM PRELOADER --- */
#premium-preloader {
    position: fixed;
    inset: 0;
    background-color: #111111;
    z-index: 9999999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 2rem;
    pointer-events: none;
}

/* Premium Text Selection */
::selection {
    background-color: #111111;
    color: #ffffff;
}
::-moz-selection {
    background-color: #111111;
    color: #ffffff;
}

.preloader-counter {
    color: #f5f5f5;
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 15vw, 10rem);
    line-height: 1;
    font-weight: 400;
}

@media (max-width: 768px) {
    #premium-preloader {
        align-items: center;
        justify-content: center;
        padding: 0;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}



/* --- CLEAN NAVBAR CSS --- */
.clean-nav {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.25rem; z-index: 100; mix-blend-mode: difference; color: white;
    pointer-events: none;
}
@media (min-width: 768px) {
    .clean-nav {
        padding: 2rem 2.5rem;
    }
}
.clean-nav-logo {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
    text-decoration: none; pointer-events: auto; transition: opacity 0.3s ease;
}
.clean-nav-logo:hover { opacity: 0.7; }
.clean-menu-btn {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
    background: none; border: none; cursor: pointer; pointer-events: auto; padding: 0.5rem;
    transition: opacity 0.3s ease;
}
.clean-menu-btn:hover { opacity: 0.7; }

.clean-menu-overlay {
    position: fixed; inset: 0; background-color: #111111;
    display: none; align-items: center; justify-content: center;
    z-index: 99; flex-direction: column;
}
.clean-menu-links {
    list-style: none; padding: 0; margin: 0; text-align: center;
}
.clean-menu-link {
    display: block; font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 7rem); line-height: 1.2;
    color: #f5f5f5; text-decoration: none; letter-spacing: -0.02em;
    transition: color 0.3s ease, -webkit-text-stroke 0.3s ease; opacity: 0; transform: translateY(40px);
}
.clean-menu-link:hover { 
    color: transparent; -webkit-text-stroke: 1px #f5f5f5;
}



/* --- PAGE TRANSITION --- */
.page-transition-overlay {
    position: fixed; 
    top: -10vh; left: 0; 
    width: 100vw; height: 120vh; /* Extra height to prevent mobile browser URL bar gaps */
    background-color: #000000;
    z-index: 999999; pointer-events: none;
    transform: translateY(0%);
}



/* Work Index Hover Styles */
.project-title {
    font-family: 'Scope One', serif;
    color: #ffffff;
    transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.project-row:hover .project-title {
    color: #111111;
}
.project-row {
    transition: padding-left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.project-row:hover {
    padding-left: 0.5rem;
}

/* Footer Interactive Text Styles */
.footer-link {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.4);
    transition: color 0.4s cubic-bezier(0.25, 1, 0.5, 1), -webkit-text-stroke 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
}
.footer-link:hover {
    color: #111111;
    -webkit-text-stroke: 0px transparent;
}

/* Contact Section Interactive Text Styles */
.contact-email-link {
    color: #111111;
    text-decoration: none;
    transition: color 0.4s ease, -webkit-text-stroke 0.4s ease;
    position: relative;
    z-index: 10;
}
.contact-email-link:hover {
    color: transparent;
    -webkit-text-stroke: 2px #111111;
}

/* --- IMAGE TRAIL CSS --- */
.content {
    width: 100%; height: 100%; position: absolute; z-index: 20;
    background: transparent; overflow: hidden; top: 0; left: 0;
}
.content__img {
    width: 120px; aspect-ratio: 1.1; border-radius: 12px;
    position: absolute; top: 0; left: 0; opacity: 0; overflow: hidden;
    will-change: transform, filter; pointer-events: none;
}
.content__img-inner {
    background-position: 50% 50%; width: calc(100% + 20px); height: calc(100% + 20px);
    background-size: cover; position: absolute; top: calc(-1 * 20px / 2); left: calc(-1 * 20px / 2);
}

/* --- REVEAL ANIMATIONS (work page addition) --- */
.reveal-work {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-work.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- DYNAMIC THEME (Light BG) --- */
body.theme-light {
    color: #111111 !important;
}
body.theme-light .text-white { color: #111111 !important; }
body.theme-light .text-white\/40 { color: rgba(17, 17, 17, 0.4) !important; }
body.theme-light .text-white\/50 { color: rgba(17, 17, 17, 0.5) !important; }
body.theme-light .text-white\/60 { color: rgba(17, 17, 17, 0.6) !important; }
body.theme-light .text-white\/70 { color: rgba(17, 17, 17, 0.7) !important; }
body.theme-light .border-white\/10 { border-color: rgba(17, 17, 17, 0.1) !important; }
body.theme-light .border-white\/30 { border-color: rgba(17, 17, 17, 0.3) !important; }
body.theme-light .bg-black\/20 { background-color: rgba(255, 255, 255, 0.2) !important; }
body.theme-light .hover\:bg-white:hover { background-color: #111111 !important; color: #ffffff !important; }
body.theme-light .project-title { color: #111111 !important; }
body.theme-light .project-row:hover .project-title { color: rgba(17,17,17,0.5) !important; }


/* Dynamic Contact Page Dark Background Inversion */
body.dark-bg, body.dark-bg a, body.dark-bg h3 { color: white !important; transition: color 0.5s ease; }
body.dark-bg i.dark-bg-icon { color: white !important; }
body.dark-bg .dark-bg-label { color: rgba(255,255,255,0.7) !important; }
body.dark-bg .dark-bg-input { color: white !important; border-color: rgba(255,255,255,0.3) !important; }
body.dark-bg .dark-bg-input::placeholder { color: rgba(255,255,255,0.3) !important; }
body.dark-bg .dark-bg-input:focus { border-color: rgba(255,255,255,0.8) !important; }
body.dark-bg .dark-bg-button { background-color: white !important; color: #111111 !important; }
body.dark-bg .dark-bg-button:hover { background-color: rgba(255,255,255,0.8) !important; }

/* Black Glow Animation */
@keyframes black-glow {
    0% {
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 0, 0, 0.05);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 0, 0, 0.4), 0 0 45px rgba(0, 0, 0, 0.3), 0 0 60px rgba(0, 0, 0, 0.2);
    }
    100% {
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 0, 0, 0.05);
    }
}

.text-glow-black {
    animation: black-glow 3s infinite ease-in-out;
}

/* ✅ SMOOTH MOBILE SCROLL COLOR CHANGE */
/* hover-bg gets a long, luxurious transition for silky smooth color changes */
#hover-bg {
    transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Mobile project rows - smooth title color transition */
@media (max-width: 1023px) {
    .project-title {
        transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    /* Each project row slides into focus visually */
    .project-row {
        transition: opacity 0.4s ease;
    }
}

