/* Enhanced Custom Styles with Alaia Animations & Codespot Shapes */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Stroke Text Effect (Arthur Jackson Style) */
.stroke-text {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1.4px #ffffff;
    color: #ffffff;
}

/* Typewriter Effect for Hero */
.typewriter-text {
    display: inline-block;
    min-height: 1.2em;
}

.typewriter-cursor {
    display: inline-block;
    color: #00e1ff; /* UPDATED to Cyan */
    animation: blink 0.7s infinite;
    font-weight: 100;
}

@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav Link Underline Animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00e1ff; /* UPDATED to Cyan */
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Floating Shapes Animation (Codespot Style) - 5 Shapes */
.hero-shapes .shape {
    position: absolute;
    opacity: 0.6;
    animation: floatShape 12s ease-in-out infinite;
}

.hero-shapes .shape-1 {
    animation-delay: 0s;
    animation-duration: 15s;
}

.hero-shapes .shape-2 {
    animation-delay: 3s;
    animation-duration: 18s;
}

.hero-shapes .shape-3 {
    animation-delay: 6s;
    animation-duration: 20s;
}

.hero-shapes .shape-4 {
    animation-delay: 9s;
    animation-duration: 16s;
}

.hero-shapes .shape-5 {
    animation-delay: 12s;
    animation-duration: 22s;
}

@keyframes floatShape {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg) scale(1.1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-20px, -50px) rotate(180deg) scale(0.9);
        opacity: 0.5;
    }
    75% {
        transform: translate(-40px, -20px) rotate(270deg) scale(1.05);
        opacity: 0.3;
    }
}

/* Rotating Text Animation */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Tab Button Active State */
.tab-btn.active {
    background-color: #00e1ff; /* UPDATED to Cyan */
    border-color: #00e1ff; /* UPDATED to Cyan */
    color: #0a0a0a;
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    background-color: rgba(0, 225, 255, 0.1); /* UPDATED to Cyan */
    border-color: #00e1ff; /* UPDATED to Cyan */
}

/* Filter Button Active State */
.filter-btn.active {
    background-color: #00e1ff; /* UPDATED to Cyan */
    border-color: #00e1ff; /* UPDATED to Cyan */
    color: #0a0a0a;
    font-weight: 600;
}

.filter-btn:hover:not(.active) {
    background-color: rgba(0, 225, 255, 0.1); /* UPDATED to Cyan */
    border-color: #00e1ff; /* UPDATED to Cyan */
}

/* Skill Bar Animation */
.skill-bar {
    transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Donut Chart Animation */
.donut-ring {
    transition: stroke-dashoffset 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Project Card Hover */
.project-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 225, 255, 0.2); /* UPDATED to Cyan */
}

/* Stats Card Pulse Glow */
@keyframes pulse-glow {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 225, 255, 0.2); /* UPDATED to Cyan */
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 225, 255, 0.4); /* UPDATED to Cyan */
    }
}

.stats-card:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* Technology Logo Hover Effects */
.tech-logo:hover i {
    transform: scale(1.2) rotateY(360deg);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #00e1ff; /* UPDATED to Cyan */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00b8cc; /* UPDATED to Dark Cyan */
}

/* Selection */
::selection {
    background-color: #00e1ff; /* UPDATED to Cyan */
    color: #0a0a0a;
}

/* Focus States */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

input:focus,
textarea:focus {
    border-color: #00e1ff !important; /* UPDATED to Cyan */
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00e1ff, #00b8cc); /* UPDATED to Cyan */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animation */
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s infinite;
}

/* Preloader Hide */
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Card Glow Effect */
.card-glow:hover {
    box-shadow: 0 0 30px rgba(0, 225, 255, 0.3); /* UPDATED to Cyan */
}

/* Back to Top Button */
#back-to-top {
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Smooth Transitions for All Interactive Elements */
a,
button,
input,
textarea,
select {
    transition: all 0.3s ease;
}

/* Accessibility - Skip Link */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Enhanced AOS Animations (Alaia Style) */
[data-aos="fade-up"] {
    transform: translate3d(0, 40px, 0);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translate3d(-40px, 0, 0);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translate3d(40px, 0, 0);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Performance Optimization - Will Change */
.project-card,
.tech-logo,
.btn-ripple,
.tab-btn,
.filter-btn {
    will-change: transform;
}

/* Dark Mode Optimizations */
@media (prefers-color-scheme: dark) {
    body {
        color-scheme: dark;
    }
}

/* Print Styles */
@media print {
    .no-print,
    nav,
    #back-to-top,
    #preloader,
    #scroll-progress {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .border-white\/10 {
        border-color: rgba(255, 255, 255, 0.3) !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-shapes .shape {
        animation: none;
    }
}

/* Mobile Specific Optimizations */
@media (max-width: 768px) {
    /* Larger touch targets */
    .filter-btn,
    .tab-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }
    /* Optimize animations for mobile */
    .project-card:hover {
        transform: translateY(-4px);
    }
    /* Better mobile menu spacing */
    #mobile-menu a {
        padding: 1rem;
        display: block;
    }
}

/* Tablet Specific */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Optimize for tablet */
    .hero-shapes .shape {
        opacity: 0.4;
    }
}

/* Large Screens */
@media (min-width: 1920px) {
    /* Better utilization of large screens */
    .max-w-7xl {
        max-width: 1600px;
    }
}