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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   Fix double scrollbar
   ========================================= */

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* =========================================
   Core Utility Classes
   ========================================= */

@layer utilities {
    .glass-card {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .clip-path-circle-0 {
        clip-path: circle(0% at top right);
    }

    .clip-path-circle-100 {
        clip-path: circle(150% at top right);
    }
}

/* =========================================
   Scroll Reveal Animations
   ========================================= */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   3D Tilt Card Effects
   ========================================= */

.tilt-3d {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-shine {
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Glass card hover glow */
.glass-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* =========================================
   Section Styling
   ========================================= */

section {
    will-change: transform;
}

/* =========================================
   Gradient Text Glow
   ========================================= */

.text-glow {
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.3),
        0 0 80px rgba(168, 85, 247, 0.15);
}

/* =========================================
   Animated Icons
   ========================================= */

.group:hover svg {
    animation: icon-pulse 0.6s ease-in-out;
}

@keyframes icon-pulse {
    0% {
        transform: scale(1) rotate(0deg);
    }

    25% {
        transform: scale(1.15) rotate(-5deg);
    }

    50% {
        transform: scale(1.05) rotate(3deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* =========================================
   Navigation Bar Scroll Effect
   ========================================= */

nav {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.nav-scrolled .glass-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

nav.nav-scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* =========================================
   Profile Image 3D Ring
   ========================================= */

.profile-ring {
    position: relative;
}

.profile-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            #6366f1,
            #a855f7,
            #ec4899,
            #3b82f6,
            #6366f1);
    z-index: -1;
    animation: ring-spin 6s linear infinite;
    opacity: 0.7;
}

.profile-ring::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            #6366f1,
            #a855f7,
            #ec4899,
            #3b82f6,
            #6366f1);
    z-index: -2;
    filter: blur(20px);
    animation: ring-spin 6s linear infinite;
    opacity: 0.4;
}

@keyframes ring-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Scroll Indicator
   ========================================= */

.scroll-indicator {
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

/* =========================================
   Mobile Optimizations
   ========================================= */

@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .glass-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    section {
        transform: none !important;
    }

    .reveal-on-scroll {
        transform: translateY(20px);
    }

    .reveal-item {
        transform: translateY(15px);
    }

    /* Prevent about section horizontal overflow */
    main {
        overflow-x: hidden;
    }
}

/* =========================================
   Accessibility: Reduced Motion
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-on-scroll,
    .reveal-item {
        opacity: 1;
        transform: none;
    }
}