/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Navigation Animations */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-primary);
        padding: 5rem 2rem 2rem;
        flex-direction: column;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px var(--shadow-color);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Hover Animations */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

/* Button Hover Animations */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Skills List Animation */
.skills-list li {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.skills-list li:nth-child(1) { animation-delay: 0s; }
.skills-list li:nth-child(2) { animation-delay: 0.2s; }
.skills-list li:nth-child(3) { animation-delay: 0.4s; }
.skills-list li:nth-child(4) { animation-delay: 0.6s; }
.skills-list li:nth-child(5) { animation-delay: 0.8s; }
.skills-list li:nth-child(6) { animation-delay: 1s; }
.skills-list li:nth-child(7) { animation-delay: 1.2s; }
.skills-list li:nth-child(8) { animation-delay: 1.4s; }

.skills-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
    animation-play-state: paused;
}

/* Project Card Animations */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.project-links a:hover {
    background: white;
    color: var(--accent-highlight);
    transform: translateY(-2px);
}

.project-content {
    padding: 2rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.project-tech span:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
}

/* Form Input Animations */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-highlight);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
    transition: all 0.3s ease;
}

/* Theme Toggle Animation */
.theme-toggle svg {
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(180deg);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--accent-highlight) var(--scroll), transparent 0);
    z-index: 1001;
    transition: opacity 0.3s ease;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-highlight);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll Indicator Animation */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

/* Social Links Animation */
.social-links a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateX(5px);
    color: var(--accent-highlight);
}

.social-links svg {
    transition: transform 0.3s ease;
}

.social-links a:hover svg {
    transform: scale(1.2);
}

/* Hero Greeting Animation */
.hero-greeting {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    animation: textReveal 0.8s ease-out forwards;
    opacity: 0;
}

/* Section Title Animation */
section h2 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out forwards;
}

/* Project Card Stagger Animation */
.projects-grid article {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out forwards;
}

.projects-grid article:nth-child(1) { animation-delay: 0.2s; }
.projects-grid article:nth-child(2) { animation-delay: 0.4s; }
.projects-grid article:nth-child(3) { animation-delay: 0.6s; } 