html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
}

body {
    opacity: 0;
    overflow-x: hidden;
    scrollbar-width: none;
    transform: scale(0.98);
    transition: all 1s ease;
}

/* Hero fade-in stagger */
.hero-fade {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.8s ease;
}


.hero-fade.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Hero image rotation */
.hero-image {
    animation: rotate 12s linear infinite;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Project card hover effect */
.project-card {
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Skill badge hover bounce */
.skill-badge {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.skill-badge:hover {
    transform: scale(1.15) translateY(-5px);
    background-color: #e9d8fd;
}

/* Contact link hover underline */
.contact-link {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.contact-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #9f7aea;
    transition: width 0.3s ease;
}

.contact-link:hover {
    transform: scale(1.05);
}

.contact-link:hover::after {
    width: 100%;
}

/* Stagger animation for multiple elements */
.hero-fade:nth-child(1) {
    transition-delay: 0.3s;
}

.hero-fade:nth-child(2) {
    transition-delay: 0.6s;
}

.hero-fade:nth-child(3) {
    transition-delay: 0.9s;
}

/* Fade in sections on scroll */
.fade-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.animated-text {
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 2rem auto;
    text-align: center;
    transition: transform 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

/* hover animation */
.animated-text:hover {
    animation: float-scale 1s ease-in-out infinite alternate;
}

@keyframes float-scale {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}