/* Animations CSS File */
:root {
    --animation-duration: 0.8s;
    --animation-delay-step: 0.1s;
}

/* Base Animation Classes */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-out;
}

.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn var(--animation-duration) ease forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-up {
    animation: slideUp var(--animation-duration) ease forwards;
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft var(--animation-duration) ease forwards;
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
    animation: slideInRight var(--animation-duration) ease forwards;
}

/* Service Card Animations */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

.service-card.animated {
    opacity: 1;
    transform: translateY(0);
}

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

/* Scale Up Animation */
@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.scale-up {
    animation: scaleUp var(--animation-duration) ease forwards;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* Typing Effect */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

.typing-effect.animated-typing {
    display: inline-block;
    overflow: hidden;
    border-right: .15em solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret .75s step-end infinite;
}

/* Project filtering animations */
.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.projects-filter button {
    transition: all 0.3s ease;
}

.projects-filter button.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.projects-grid {
    transition: height 0.5s ease;
}

.project-card {
    transition: all 0.4s ease;
}

.project-card.fade-out {
    opacity: 0;
    transform: scale(0.9);
}

.project-card.fade-in {
    opacity: 1;
    transform: scale(1);
}

.project-card.hidden {
    display: none;
}

/* Background shapes animations */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.05;
    animation: float 15s infinite ease-in-out;
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Parallax header effect */
.parallax-header {
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

/* DOM loaded animation */
.has-animations.dom-loaded .hero-text {
    animation: fadeIn 1s ease forwards;
}
/* Typing animation keyframes already defined above */

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary-color);
    animation: 
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

/* Animation Delays */
.delay-1 { animation-delay: calc(var(--animation-delay-step) * 1); }
.delay-2 { animation-delay: calc(var(--animation-delay-step) * 2); }
.delay-3 { animation-delay: calc(var(--animation-delay-step) * 3); }
.delay-4 { animation-delay: calc(var(--animation-delay-step) * 4); }
.delay-5 { animation-delay: calc(var(--animation-delay-step) * 5); }

/* Animation Durations */
.duration-1 { animation-duration: 0.5s; }
.duration-2 { animation-duration: 1s; }
.duration-3 { animation-duration: 1.5s; }
.duration-4 { animation-duration: 2s; }
