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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background-color: #0b061d;
    --dark-background: #1a1c20;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-20px, -20px);
        filter: blur(5px);
        rotate: 10deg;
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
        filter: blur(0px);
        rotate: 0deg;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) translateZ(0) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) translateZ(10px) rotate(5deg);
    }

    50% {
        transform: translateY(-20px) translateZ(20px) rotate(-8deg);
    }

    75% {
        transform: translateY(-10px) translateZ(15px) rotate(3deg);
    }

    100% {
        transform: translateY(0px) translateZ(0) rotate(0deg);
    }
}

.hero-content {
    animation: slideIn 2.5s ease;
    text-align: center;
    color: white;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.3s backwards;
}

.btn-custom {
    background: white;
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    animation: fadeInUp 1s ease 0.6s backwards;
}

.btn-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services-section {
    padding: 6rem 0;
    background: var(--dark-background);
    position: relative;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
}

.service-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    animation: float 5s ease-in-out infinite;
    rotate: 9deg;
}


.service-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    margin: 1.5rem 0;
}

.service-features li {
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    display: flex;
    align-items: center;
}

.service-features i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--secondary-color);
}

.service-link i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Projects Section */
.projects-section {
    padding: 6rem 0;
}

.project-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .service-card {
        margin-bottom: 2rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f3f4f6;
        --light-text: #9ca3af;
        --background-color: #111827;
        --dark-background: #1f2937;
    }

    .navbar {
        background: rgba(17, 24, 39, 0.95);
    }

    .service-card {
        background: var(--dark-background);
    }

    .project-card {
        background: var(--dark-background);
    }
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform-origin: 0%;
    z-index: 1001;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

/* Section Transitions */
.section-transition {
    opacity: 0;
    transform: translateY(20px) translateZ(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-transition.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* Performance Optimizations */
.card,
.parallax-section,
.hero-section {
    will-change: transform;
    backface-visibility: hidden;
}

/* Fix for Safari */
@supports (-webkit-touch-callout: none) {
    .parallax-section {
        background-attachment: scroll;
    }
}

/* Fix for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--dark-bg);
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {

    .loading,
    .navbar,
    .scroll-progress,
    .btn-custom,
    .contact-form {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ddd;
    }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(79, 70, 229, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 3px solid var(--dark-bg);
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
    transform: scale(1.1);
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px) translateZ(0) rotateX(0deg) rotateY(0deg);
    }

    50% {
        transform: translateY(-20px) translateZ(20px) rotateX(5deg) rotateY(5deg);
    }

    100% {
        transform: translateY(0px) translateZ(0) rotateX(0deg) rotateY(0deg);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Enhanced Contact Form */
.contact-form {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transform-style: preserve-3d;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    padding: 1rem;
    border-radius: 0.75rem;
    transition: var(--transition);
    transform: translateZ(10px);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    transform: translateZ(20px);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* Enhanced Section Headers */
.section-header {
    position: relative;
    transform-style: preserve-3d;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(30px);
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}