/* 
    GMD Solutions v2.0 - Kinetic Intelligence Design System
    Inspired by RouteProfitIQ Aesthetic
*/

:root {
    --bg-dark: #0B0C10;
    --bg-darker: #050505;
    --primary: #2DD4BF; /* Teal Glow */
    --secondary: #6366F1; /* Indigo Pulsar */
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --glass-bg: rgba(31, 31, 36, 0.4);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glow-opacity: 0.15;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

/* 
   New Scene Wrapper 
   Moves perspective off body to isolate FIXED elements (modals)
*/
#scene-wrapper {
    perspective: 2000px;
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.glass:not(.no-tilt) {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.no-tilt {
    transform: none !important;
    transition: none !important;
}

/* 3D Buffer for Tilt Effects */
.tilt-buffer {
    padding-left: 5%;
    padding-right: 5%;
    overflow: visible !important;
}

@media (max-width: 768px) {
    .tilt-buffer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.glass-heavy {
    background: rgba(11, 12, 16, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(45, 212, 191, 0.1);
}

.glass-dark {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.mobile-link {
    transition: all 0.3s ease;
}

.mobile-link:hover {
    color: var(--primary);
    letter-spacing: 0.1em;
}

/* Typography */
.font-display {
    font-family: 'Space Grotesk', sans-serif;
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #FFF 0%, var(--primary) 50%, var(--secondary) 100%);
}

/* Kinetic Glows */
.glow-radial {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: var(--glow-opacity);
    pointer-events: none;
}

.glow-teal { background: var(--primary); width: 600px; height: 600px; }
.glow-indigo { background: var(--secondary); width: 500px; height: 500px; }

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Interactive Elements */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    background: rgba(41, 42, 46, 0.7);
    border-color: rgba(45, 212, 191, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(45, 212, 191, 0.1);
}

/* Swiper Customization */
.main-swiper {
    --swiper-theme-color: var(--primary);
    --swiper-navigation-size: 24px;
}

.swiper-slide {
    overflow: hidden;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.2) !important;
    width: 60px !important;
    height: 4px !important;
    border-radius: 2px !important;
    opacity: 1 !important;
    transition: all 0.5s ease !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary) !important;
    box-shadow: 0 0 20px var(--primary-low);
}

.swiper-button-next, .swiper-button-prev {
    background: rgba(11, 12, 16, 0.5);
    backdrop-filter: blur(8px);
    width: 55px !important;
    height: 55px !important;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    color: var(--primary) !important;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 1.2rem !important;
    font-weight: bold;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: var(--primary);
    color: var(--bg-dark) !important;
    box-shadow: 0 0 25px var(--primary-low);
    border-color: var(--primary);
}

/* Modal System */
#portfolio-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#portfolio-modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

#portfolio-modal:not(.hidden) {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

#portfolio-modal .glass {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: visible;
}

#portfolio-modal .modal-scroll-area {
    overflow-y: auto;
    flex: 1;
    padding: 2rem;
}

@media (min-width: 768px) {
    #portfolio-modal .modal-scroll-area {
        padding: 4rem;
    }
}

#portfolio-modal .close-btn {
    position: sticky;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    align-self: flex-end;
    margin-right: 1.5rem;
    margin-bottom: -3rem;
}

/* Modal Reveal Animation Fix (Strict Scale) */
#portfolio-modal .reveal {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#portfolio-modal:not(.hidden) .reveal {
    opacity: 1;
    transform: scale(1);
}

/* Utilities */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

#portfolio-modal .modal-scroll-area::-webkit-scrollbar {
    width: 4px;
}
