@import '/static/css/root.css';


/* Keyframes for slide-in from the left */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Keyframes for slide-in from the right */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Keyframes for fade-in with a delay */
@keyframes fadeInDelayed {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Keyframes for typing effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Keyframes for blink cursor effect */
@keyframes blinkCursor {
    50% {
        border-right-color: transparent;
    }
}

/* Scroll button animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    40% {
        transform: translateY(-10px) scale(1.1);
        opacity: 0.8;
    }
    60% {
        transform: translateY(-5px) scale(1.05);
        opacity: 0.9;
    }
}

.scroll-button {
    animation: fadeInBlur 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    animation-delay: 1s;
}

.scroll-button .mouse {
    animation: bounce 2s ease-in-out infinite;
    animation-delay: 2s;
}

/* Keyframes for fade-in animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Keyframes for card reveal animations */
@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes staggeredReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* INDEX PAGE ANIMATIONS */

/* Hero Section Animations */
@keyframes fadeInBlur {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

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

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animate the logo */
.logo-container .logo {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 1.5s steps(20, end),
             blinkCursor 0.75s step-end infinite;
    border-right: 2px solid var(--color-primary);
    animation-fill-mode: forwards;
    animation-delay: 0.2s;
}

/* Animate the header text */
.header-text h1 p {
    background: linear-gradient(120deg, var(--color-primary), #6366f1);
    background-size: 200% auto;
    background-clip: text;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientText 8s ease infinite;
    transition: transform 0.3s ease;
}

.header-text h1 p:hover {
    transform: translateX(10px);
}

.header-text h1 p:nth-child(1) {
    animation: slideInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.header-text h1 p:nth-child(2) {
    animation: slideInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.header h2 {
    animation: fadeInBlur 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    animation-delay: 0.6s;
}


/* About section specific animations */
@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes slideFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Default section styling */
.animate-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Animate sections when they come into view */
.animate-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Specific animations for each section */
/* About section animations */
#about.animate-section.in-view {
    animation: none;
    opacity: 1;
}

#about .about-text-container {
    opacity: 0;
    animation: slideFromLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

#about .about-text-container h2 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.4s;
}

#about .about-text-container p span {
    opacity: 0;
    display: block;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#about .about-text-container p:nth-child(1) span { animation-delay: 0.6s; }
#about .about-text-container p:nth-child(2) span { animation-delay: 0.8s; }

#about.animate-section.in-view .about-button {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 1s;
}

#about .about-image-container {
    opacity: 0;
    animation: slideFromRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.4s;
}

#about .about-image-container img {
    transform-origin: center;
    animation: scaleIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.6s;
    filter: brightness(0.95);
    transition: filter 0.3s ease, transform 0.3s ease;
}

#about .about-image-container img:hover {
    filter: brightness(1.05);
    transform: scale(1.02);
}

#project .animate-section.in-view.row {
    animation: none;
}

#project .animate-section.in-view .project-item {
    opacity: 0;
    animation: staggeredReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#project .animate-section.in-view .project-item:nth-child(1) {
    animation-delay: 0.1s;
}

#project .animate-section.in-view .project-item:nth-child(2) {
    animation-delay: 0.2s;
}

#project .animate-section.in-view .project-item:nth-child(3) {
    animation-delay: 0.3s;
}
#project.animate-section.in-view .projects {
    animation: fadeInUp 1s ease-out 1s;
}

#article.animate-section.in-view {
    animation: fadeInUp 1s ease-out;
}
#article .animate-section.in-view.row {
    animation: none;
}

#article .animate-section.in-view .blog-item {
    opacity: 0;
    animation: staggeredReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#article .animate-section.in-view .blog-item:nth-child(1) {
    animation-delay: 0.1s;
}

#article .animate-section.in-view .blog-item:nth-child(2) {
    animation-delay: 0.2s;
}

#article .animate-section.in-view .blog-item:nth-child(3) {
    animation-delay: 0.3s;
}
#article.animate-section.in-view .articles {
    animation: fadeInUp 1s ease-out 1s;
}

#services .animate-section.in-view.row {
    animation: none;
}

#services .animate-section.in-view .service-item {
    opacity: 0;
    animation: staggeredReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#services .animate-section.in-view .service-item:nth-child(1) {
    animation-delay: 0.1s;
}

#services .animate-section.in-view .service-item:nth-child(2) {
    animation-delay: 0.2s;
}

#services .animate-section.in-view .service-item:nth-child(3) {
    animation-delay: 0.3s;
}
#services.animate-section.in-view .text {
    animation: fadeInUp 1s ease-out 1s;
}

#contact.animate-section.in-view {
    animation: fadeInUp 1s ease-out;
}


/* ABOUT PAGE ANIMATION  */
#about.animate-section.in-view .section-title {
    animation: fadeInUp 1s ease-out;
}
#about.animate-section.in-view .bold-text {
    animation: zoomIn 1s ease-out 1.5s;
}
#about.animate-section.in-view .cv {
    animation: fadeInUp 1s ease-out 1s;
}