/* ============================================
   Saim App — Core Styles
   Next-Gen Technology Studio
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

::selection {
    background: rgba(0, 212, 255, 0.25);
    color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050510; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }

html { scroll-behavior: smooth; }

/* --- Gradient Animation --- */
@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animate-gradient { animation: gradient-shift 4s ease infinite; }

/* --- Custom Cursor --- */
#cursor-glow {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, rgba(0,212,255,0.8), transparent 70%);
    transform: translate(-50%, -50%);
    will-change: transform;
}

#cursor-ring {
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    will-change: transform;
}

body:hover #cursor-glow,
body:hover #cursor-ring { opacity: 1; }

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    #cursor-glow, #cursor-ring { display: none !important; }
}

/* --- Scroll Line Animation --- */
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.2; transform: scaleY(1); }
    50%      { opacity: 0.6; transform: scaleY(1.2); }
}
.scroll-line { animation: scroll-pulse 2s ease-in-out infinite; transform-origin: top; }

/* --- Navigation --- */
.nav-glass {
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-scrolled .nav-glass {
    background: rgba(5, 5, 16, 0.85);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00D4FF, #A855F7);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

/* --- Filter Buttons --- */
.filter-btn {
    color: rgba(255,255,255,0.4);
    background: transparent;
}

.filter-btn:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
}

.filter-btn.active {
    color: #00D4FF;
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.08);
}

/* --- Project Card Glow --- */
.card-glow {
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(0,212,255,0.06), transparent 40%);
}

/* --- Marquee --- */
.marquee-container {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
}

@keyframes marquee-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes marquee-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.marquee-track[data-direction="left"]  { animation: marquee-left  35s linear infinite; }
.marquee-track[data-direction="right"] { animation: marquee-right 35s linear infinite; }

.marquee-container:hover .marquee-track { animation-play-state: paused; }

/* --- Hero Particles (overlay quality) --- */
#hero-particles { opacity: 0.6; }

/* --- Glassmorphism Utilities --- */
.glass {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.glass-strong {
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Reveal States (before GSAP) --- */
.hero-reveal { opacity: 0; transform: translateY(40px); }
.section-reveal { opacity: 0; transform: translateY(60px); }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-reveal, .section-reveal { opacity: 1; transform: none; }
    .marquee-track { animation: none; }
    .scroll-line { animation: none; }
}
