/* Minimalist Black & White Animations */

/* Page Load Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: fadeIn 0.6s ease-out both;
}

/* Navigation Animations */
.navbar {
    animation: slideDown 0.5s ease-out both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link::after {
    animation: none;
}

.nav-link:hover::after {
    animation: expandWidth 0.3s ease-out forwards;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.theme-toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    animation: rotate 0.6s ease-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

/* Hero Section Animations */
.hero-title {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-description {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-actions {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.hero-visual {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-stats {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Section Header Animations */
.section-title {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.section-title::after {
    animation: expandWidth 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.section-subtitle {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

/* About Section Animations */
.about-content {
    animation: slideRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.about-details {
    animation: slideLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Skill Tag Animations */
.skill-tag {
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 0.05s);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.skill-tag:hover {
    animation: lift 0.3s ease-out;
}

@keyframes lift {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-2px);
    }
}

/* Project Card Animations */
.project-card {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.project-card:hover {
    animation: cardHover 0.4s ease-out;
}

@keyframes cardHover {
    from {
        transform: translateY(0);
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    }
    to {
        transform: translateY(-4px);
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    }
}

.project-link:hover {
    animation: slideRightSmall 0.3s ease-out;
}

@keyframes slideRightSmall {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(4px);
    }
}

/* Contact Section Animations */
.contact-info {
    animation: slideRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.contact-form {
    animation: slideLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.contact-item {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.contact-item:hover {
    animation: itemHover 0.4s ease-out;
}

@keyframes itemHover {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-2px);
    }
}

/* Form Animations */
.form-group input,
.form-group textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group textarea:focus {
    animation: focusGlow 0.3s ease-out;
}

@keyframes focusGlow {
    from {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
    }
    to {
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    }
}

/* Footer Animations */
.footer {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.social-link:hover {
    animation: socialHover 0.3s ease-out;
}

@keyframes socialHover {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Button Animations */
.btn::before {
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    animation: buttonHover 0.3s ease-out;
}

@keyframes buttonHover {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-1px);
    }
}

/* Mobile Menu Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    animation: rotateDown 0.3s ease-out forwards;
}

.mobile-menu-toggle.active span:nth-child(2) {
    animation: fadeOut 0.3s ease-out forwards;
}

.mobile-menu-toggle.active span:nth-child(3) {
    animation: rotateUp 0.3s ease-out forwards;
}

@keyframes rotateDown {
    from {
        transform: rotate(0deg) translateY(0);
    }
    to {
        transform: rotate(45deg) translateY(6px);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes rotateUp {
    from {
        transform: rotate(0deg) translateY(0);
    }
    to {
        transform: rotate(-45deg) translateY(-6px);
    }
}

.nav-menu {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll-triggered animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

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

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Notification Animation */
@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutToTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.notification {
    animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.hide {
    animation: slideOutToTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 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-title,
    .hero-subtitle,
    .hero-description,
    .hero-actions,
    .hero-visual,
    .hero-stats {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Intersection Observer for Scroll Animations */
@keyframes fadeInOnScroll {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation Classes */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }