@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Outfit', sans-serif;
    background-color: #0b0514;
    color: #ffffff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Glassmorphism utilities */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 15px 40px 0 rgba(168, 85, 247, 0.2);
}

.glass-nav {
    background: rgba(11, 5, 20, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Base custom animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Glowing text */
.text-glow {
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0b0514;
}

::-webkit-scrollbar-thumb {
    background: rgba(88, 28, 135, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.8);
}

/* Video Background Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(11, 5, 20, 0.4) 0%, rgba(11, 5, 20, 0.594) 100%);
    z-index: 1;
}

.hero-glow-bg {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.15), transparent 70%);
    z-index: 2;
    pointer-events: none;
}

/* Portfolio Scroll on Hover Effect */
.portfolio-card {
    position: relative;
    overflow: hidden;
}

.portfolio-img-container {
    height: 18rem; /* Equivalent to h-72 */
    overflow: hidden;
    position: relative;
    border-radius: 1rem 1rem 0 0;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transform 100%);
}

.portfolio-img-scroll {
    width: 100%;
    height: auto;
    object-position: top;
    transition: transform 12s ease-in-out;
    transform: translateY(0);
}

.portfolio-card:hover .portfolio-img-scroll {
    transform: translateY(calc(-100% + 18rem));
}

/* Scroll Reveal Animation */
.reveal-item {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1), transform 0.9s cubic-bezier(0.25, 1, 0.5, 1) !important;
}
.reveal-item.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Rain Canvas */
#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   LIGHT THEME OVERRIDES
   ========================================= */
html.light-mode {
    --bg-main: #f8fafc;
}

html.light-mode body {
    background-color: var(--bg-main) !important;
    color: #0f172a !important;
}

html.light-mode .text-white {
    color: #0f172a !important;
}

html.light-mode .text-gray-100,
html.light-mode .text-gray-200,
html.light-mode .text-gray-300,
html.light-mode .text-gray-400,
html.light-mode .text-gray-500 {
    color: #475569 !important;
}

html.light-mode .text-purple-300 {
    color: #7e22ce !important; /* Use a darker purple for contrast */
}

html.light-mode .bg-dark,
html.light-mode .bg-darker,
html.light-mode .bg-\[\#0A0611\] {
    background-color: var(--bg-main) !important;
}

html.light-mode .bg-primary\/20 {
    background-color: rgba(168, 85, 247, 0.15) !important;
    color: #7e22ce !important;
}

html.light-mode .bg-dark\/80 {
    background-color: rgba(248, 250, 252, 0.85) !important;
}

html.light-mode .from-dark {
    --tw-gradient-from: #f8fafc !important;
    --tw-gradient-to: rgba(248, 250, 252, 0) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.light-mode .bg-black\/30 {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

html.light-mode .hover\:bg-black\/50:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
}


html.light-mode .glass,
html.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

/* Fix navbar specifically */
html.light-mode .glass-nav {
    background: rgba(248, 250, 252, 0.85) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Translucent whites -> Translucent blacks */
html.light-mode .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
html.light-mode .hover\:bg-white\/5:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}
html.light-mode .hover\:bg-white\/10:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
}
html.light-mode .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}
html.light-mode .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}
html.light-mode .border-white\/20 {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Hero Background Overlays */
html.light-mode .hero-glow-bg,
html.light-mode .video-overlay {
    opacity: 0.05 !important;
    mix-blend-mode: multiply !important;
}

html.light-mode video {
    mix-blend-mode: normal !important;
    opacity: 0.15 !important;
    filter: invert(1) hue-rotate(180deg) grayscale(100%) !important;
}

html.light-mode #mobile-menu {
    background: #f8fafc !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html.light-mode #rain-canvas {
    opacity: 0.9 !important; 
    filter: invert(1) hue-rotate(180deg);
}

html.light-mode input, html.light-mode textarea {
    color: #0f172a !important;
}