/* Fade in animation */
@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-fade-1 {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-fade-2 {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.hero-fade-3 {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}


/* Text gradient shine animation */
@keyframes textShine {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.gradient-text {
    position: relative;
    display: inline-block;
    color: #1c1917;
}

.dark .gradient-text {
    color: #ffffff;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .gradient-text {
        background-image: linear-gradient(90deg, #7182ff 0%, #3cff52 50%, #7182ff 100%);
        background-size: 200% auto;
        background-position: 0% center;
        color: transparent !important;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: textShine 3s ease-in-out infinite;
        -webkit-animation: textShine 3s ease-in-out infinite;
    }
}
body { 
    font-family: 'Inter', sans-serif; 
}

/* Ultra bold hero text */
.hero-fade-1 span {
    font-variation-settings: 'wght' 900;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
}

html { 
    scroll-behavior: smooth; 
}

/* Animation States */
.enhanced-fade { 
    opacity: 0; 
}


/* Interactive Elements */
.hover-card { 
    transition: all 0.4s ease-out; 
}


/* Tabular Numbers for Metrics */
.tabular-nums {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* Enhanced Focus States */
.focus-ring:focus {
    outline: 2px solid #78716c;
    outline-offset: 2px;
}

/* Neon glow effect for newsletter input */
.cyberpunk-focus:focus {
    outline: none;
    box-shadow: 0 0 25px rgba(113, 130, 255, 0.6),
                0 0 50px rgba(113, 130, 255, 0.4),
                0 0 75px rgba(60, 255, 82, 0.3),
                inset 0 0 15px rgba(113, 130, 255, 0.2);
    border-color: transparent;
    background: linear-gradient(rgba(28, 25, 23, 0.9), rgba(28, 25, 23, 0.9)),
                linear-gradient(90deg, #7182ff, #3cff52);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}



/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
}


/* Portfolio Section Styles */
#portfolio img {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#portfolio span.flex {
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#portfolio span.flex:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Ensure portfolio images don't get blurry on scale */
#portfolio img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth text rendering for animations */
.hero-fade-1 span,
.hero-fade-2,
.hero-fade-3 span {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Navigation link styles for underline effect */
nav a {
    overflow: hidden;
}

/* Magnetic button effect */
button {
    position: relative;
    transform-origin: center;
    will-change: transform;
}

/* Loading screen styles */
#loading-screen {
    pointer-events: auto;
    z-index: 100;
}

/* Initial state for page load */
body {
    overflow-x: hidden;
}

/* Custom cursor styles - Updated for dark mode visibility */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #1c1917;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
    mix-blend-mode: difference;
}

@media (prefers-color-scheme: dark) {
    .custom-cursor {
        border-color: #fafafa;
    }
}

.custom-cursor-dot {
    width: 4px;
    height: 4px;
    background: #1c1917;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

@media (prefers-color-scheme: dark) {
    .custom-cursor-dot {
        background: #fafafa;
    }
}

.custom-cursor.hover {
    transform: scale(2.5);
    opacity: 0.5;
}

/* Hide default cursor - desktop only */
@media (hover: hover) and (pointer: fine) {
    * {
        cursor: none !important;
    }
}

/* Hide custom cursor on mobile */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
}


/* Geometric patterns */
.geometric-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.05;
    pointer-events: none;
}

.geometric-pattern::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(28, 25, 23, .05) 35px, rgba(28, 25, 23, .05) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(28, 25, 23, .05) 35px, rgba(28, 25, 23, .05) 70px);
    animation: geometricShift 20s linear infinite;
}

@keyframes geometricShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(70px, 70px); }
}

/* Smooth scroll behavior */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}



/* Mobile-specific fixes */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
    }
    
    /* Prevent body scroll lock */
    body {
        position: relative;
        height: auto !important;
        overflow-y: auto !important;
    }
    
    /* Fix for iOS bounce-back */
    main {
        position: relative;
        min-height: 100vh;
    }
}