@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Base Styles */
:root {
    --primary: #6d28d9;
    --primary-dark: #5b21b6;
    --secondary: #8b5cf6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --gray-dark: #374151;
}

/* Dark Mode Colors */
.dark {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #a78bfa;
    --dark: #f9fafb;
    --light: #1f2937;
    --gray: #d1d5db;
    --gray-light: #374151;
    --gray-dark: #e5e7eb;
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #f9fafb;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    color: #e5e7eb;
    background-color: #111827;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

body.loaded .preloader {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.loader .logo {
    animation: pulse 2s infinite;
}

.animate-loader {
    animation: loader 1.5s ease-in-out infinite;
}

@keyframes loader {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Header Styles */
header {
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes blob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Stats Section */
[data-count] {
    transition: all 1s ease;
}

/* Portfolio Section */
.portfolio-item {
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-filter.active {
    background-color: var(--primary);
    color: white;
}

/* Testimonials */
.testimonial-slide {
    transition: opacity 0.5s ease;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-dot.active {
    background-color: white;
}

/* Contact Form */
#contact-form input,
#contact-form textarea {
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: all 0.3s ease;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

/* Utility Classes */
.shadow-lg {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}