/* =========================================
   ANIMATION PACK FOR PORTFOLIO WEBSITE
========================================= */


/* FADE UP ANIMATION */

.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}


/* FLOATING HERO CARD */

.hero-card {
    animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {

    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}


/* PROJECT CARD PREMIUM HOVER */

.project-card {
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(245, 197, 24, 0.4);
    box-shadow: 0 20px 40px rgba(245, 197, 24, 0.08);
}


/* BUTTON HOVER EFFECT */

.btn-primary,
.btn-secondary {
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(245, 197, 24, 0.15);
}


/* HERO BACKGROUND GLOW */

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle,
            rgba(255, 94, 58, 0.10),
            transparent 70%);
    left: -100px;
    bottom: 0;
    z-index: -1;
    animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {

    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}


/* NAVBAR LINK ANIMATION */

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}


/* METRIC CARD HOVER */

.metric {
    transition: all 0.3s ease;
}

.metric:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 197, 24, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}


/* SKILL BOX HOVER */

.skill-box {
    transition: all 0.4s ease;
}

.skill-box:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 197, 24, 0.25);
}


/* TAG HOVER */

.tag-item {
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.05);
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* THEME BUTTON */

.theme-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    transition: 0.3s;
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}


/* LIGHT MODE */

body.light-mode {

    --bg: #f5f5f5;
    --surface: #ffffff;
    --card: #ffffff;

    --accent: #f5c518;
    --accent2: #ff5e3a;

    --text: #111111;
    --muted: #555555;

    --border: rgba(0, 0, 0, 0.08);

}

body.light-mode nav {
    background: rgba(255, 255, 255, 0.9);
}

/* CUSTOM CURSOR */

body {
    cursor: none;
}

.cursor {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition:
        width 0.3s,
        height 0.3s,
        border 0.3s;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

/* LOADING SCREEN */

#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 10000;

    transition: opacity 1s ease,
        visibility 1s ease;
}

.loader-content {
    text-align: center;
}

.loader-content h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    letter-spacing: 8px;
    color: var(--accent);

    animation: pulse 1.5s infinite;
}

.loader-content p {
    margin-top: 1rem;
    color: var(--muted);
    letter-spacing: 3px;
    font-size: 0.8rem;
}

#loader.hide {
    opacity: 0;
    visibility: hidden;
}

@keyframes pulse {

    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.98);
    }
}

/* HAMBURGER MENU */

.hamburger {

    display: none;
    flex-direction: column;
    gap: 6px;

    cursor: pointer;

    z-index: 1001;
}

.hamburger span {

    width: 28px;
    height: 3px;

    background: var(--text);

    border-radius: 10px;

    transition: 0.3s;
}


/* MOBILE NAVBAR */

@media(max-width:900px) {

    .hamburger {
        display: flex;
    }

    .nav-links {

        position: fixed;

        top: 0;
        right: -100%;

        width: 260px;
        height: 100vh;

        background: var(--surface);

        flex-direction: column;

        justify-content: center;
        align-items: center;

        transition: 0.4s ease;

        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

}

/* HAMBURGER TO X */

.hamburger.active span:nth-child(1) {

    transform:
        rotate(45deg) translateY(12px);

}

.hamburger.active span:nth-child(2) {

    opacity: 0;

}

.hamburger.active span:nth-child(3) {

    transform:
        rotate(-45deg) translateY(-12px);

}

/* MOBILE OVERLAY */

.overlay {

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    backdrop-filter: blur(5px);

    opacity: 0;
    visibility: hidden;

    transition: 0.3s;

    z-index: 999;
}

.overlay.active {

    opacity: 1;
    visibility: visible;

}

/* PARTICLE BACKGROUND */

#particles {

    position: fixed;

    inset: 0;

    z-index: -2;

    overflow: hidden;

    pointer-events: none;

}

.particle {

    position: absolute;

    width: 4px;
    height: 4px;

    background: rgba(245, 197, 24, 0.4);

    border-radius: 50%;

    animation: floatParticle linear infinite;
}

@keyframes floatParticle {

    from {
        transform:
            translateY(100vh) scale(0.5);

        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    to {
        transform:
            translateY(-100vh) scale(1);

        opacity: 0;
    }
}
