/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: white;
    overflow-x: hidden;
}

/* Custom Properties */
:root {
    --neon-blue: #00f3ff;
    --neon-purple: #8b5cf6;
    --neon-green: #10b981;
    --neon-pink: #f472b6;
    --dark-bg: #0a0a0a;
    --dark-card: #111111;
    --dark-border: #1f1f1f;
    --text-muted: #8b8b8b;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--neon-blue); }
    100% { box-shadow: 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue); }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Utility Classes */
.max-w-7xl {
    max-width: 1280px;
}

.max-w-6xl {
    max-width: 1152px;
}

.max-w-4xl {
    max-width: 896px;
}

.max-w-2xl {
    max-width: 672px;
}

.max-w-3xl {
    max-width: 768px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-14 {
    margin-top: 3.5rem;
}

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

.text-left {
    text-align: left;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

.z-10 {
    z-index: 10;
}

.w-full {
    width: 100%;
}

.h-64 {
    height: 16rem;
}

.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.hidden {
    display: none;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-x-6 > * + * {
    margin-left: 1.5rem;
}

.space-x-8 > * + * {
    margin-left: 2rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

.overflow-hidden {
    overflow: hidden;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.border-t {
    border-top-width: 1px;
    border-top-style: solid;
}

.border-gray-600 {
    border-color: var(--gray-600);
}

.border-gray-700 {
    border-color: var(--gray-700);
}

.pt-6 {
    padding-top: 1.5rem;
}

.object-cover {
    object-fit: cover;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-16 {
    width: 4rem;
}

.h-16 {
    height: 4rem;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.w-32 {
    width: 8rem;
}

.h-32 {
    height: 8rem;
}

.top-20 {
    top: 5rem;
}

.left-10 {
    left: 2.5rem;
}

.bottom-20 {
    bottom: 5rem;
}

.right-10 {
    right: 2.5rem;
}

.top-1\/2 {
    top: 50%;
}

.left-1\/4 {
    left: 25%;
}

.rotate-45 {
    transform: rotate(45deg);
}

.rotate-12 {
    transform: rotate(12deg);
}

.rounded-full {
    border-radius: 9999px;
}

.resize-none {
    resize: none;
}

/* Typography */
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-md {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.leading-tight {
    line-height: 1.25;
}

.leading-relaxed {
    line-height: 1.625;
}

/* Colors */
.text-white {
    color: white;
}

.text-black {
    color: black;
}

.text-gray-300 {
    color: var(--gray-300);
}

.text-gray-400 {
    color: var(--gray-400);
}

.hover\:text-neon-blue:hover {
    color: var(--neon-blue);
}

.hover\:text-white:hover {
    color: white;
}

/* Custom Styles */
.glass-card {
    background: rgba(17, 17, 17, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateZ(5px) scale(1.02);
}

.neon-border {
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.tech-grid {
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

.gradient-text {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-button {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.tech-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.4);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border: 1px solid rgba(0, 243, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.delay-1 { 
    animation-delay: 0.2s; 
}

.delay-2 { 
    animation-delay: 0.4s; 
}

.delay-3 { 
    animation-delay: 0.6s; 
}

.code-snippet {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 243, 255, 0.3);
    font-family: Monaco, 'Fira Code', 'Roboto Mono', monospace;
    color: var(--neon-blue);
}

.font-code {
    font-family: Monaco, 'Fira Code', 'Roboto Mono', monospace;
}

.nav-blur {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 243, 255, 0.2);
}

.testimonial-card {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.contact-form input, 
.contact-form textarea {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.contact-form input::placeholder, 
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.star-rating {
    color: #fbbf24;
}

.transition-colors {
    transition: color 0.3s ease;
}

.transition-all {
    transition: all 0.3s ease;
}

.duration-300 {
    transition-duration: 300ms;
}

.focus\:outline-none:focus {
    outline: none;
}

/* Navigation */
nav a {
    text-decoration: none;
    color: inherit;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

a.text-neon-blue {
    color: var(--neon-blue);
}

/* Background Gradients */
.bg-gradient-to-b {
    background: linear-gradient(to bottom, var(--dark-bg), var(--dark-card));
}

/* Mobile Menu Button */
#mobile-menu-button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Responsive Design */
@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .sm\:flex-row {
        flex-direction: row;
    }
    
    .sm\:text-left {
        text-align: left;
    }
}

@media (min-width: 768px) {
    .md\:text-6xl {
        font-size: 3.75rem;
        line-height: 1;
    }
    
    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .md\:flex {
        display: flex;
    }
    
    .md\:hidden {
        display: none;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\:p-4 {
        padding: 1rem;
    }
    
    .md\:p-12 {
        padding: 3rem;
    }
    
    .md\:w-\[223px\] {
        width: 223px;
    }
    
    .md\:gap-12 {
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .glass-card:hover {
        transform: none;
    }
    
    .tech-button:hover {
        transform: none;
    }
    
    .project-card:hover {
        transform: none;
    }
    
    .testimonial-card:hover {
        transform: none;
        box-shadow: none;
    }
}


/* Enhanced Animation Classes */

/* Base state for fade-in elements */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Visible state */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay classes */
.delay-1.visible {
    transition-delay: 0.2s;
}

.delay-2.visible {
    transition-delay: 0.4s;
}

.delay-3.visible {
    transition-delay: 0.6s;
}

/* Card hover animations */
.project-card,
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card.hover-effect {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 243, 255, 0.3);
}

.testimonial-card.hover-effect {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.25);
}

/* Animate-in class for section reveals */
.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:not(.animate-in),
.testimonial-card:not(.animate-in) {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

/* Loading state */
body:not(.loaded) {
    overflow-x: hidden;
}

body.loaded {
    overflow-x: hidden;
}

/* Hero content animation */
.hero-content {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced floating elements */
.floating-element {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Smooth navbar transition */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Counter animation */
.glass-card .gradient-text {
    transition: color 0.3s ease;
}

.glass-card.counted .gradient-text {
    animation: counterPulse 0.6s ease-out;
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Advanced scroll-triggered animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Section-specific animations */
#projects .project-card {
    transition-delay: 0s;
}

#projects .project-card:nth-child(2) {
    transition-delay: 0.1s;
}

#projects .project-card:nth-child(3) {
    transition-delay: 0.2s;
}

#projects .project-card:nth-child(4) {
    transition-delay: 0.3s;
}

/* Parallax performance optimization */
.floating-element,
.project-card,
.testimonial-card {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .project-card,
    .testimonial-card,
    .floating-element,
    .hero-content {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .fade-in {
        opacity: 1;
    }
}

/* Enhanced glass effect on scroll */
.glass-card.enhanced {
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Smooth tech button animation */
.tech-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tech-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tech-button:hover::before {
    left: 100%;
}

/* Advanced neon glow animation */
.neon-border.enhanced {
    animation: neonPulse 3s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0% {
        box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.6), 0 0 30px rgba(0, 243, 255, 0.3);
    }
}