/* ================================================
   LUSION-INSPIRED INTERACTIVE STYLES
   ================================================ */

/* ------------------------------------------------
   CUSTOM CURSOR
   ------------------------------------------------ */
.custom-cursor {
    display: none;
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        background-color 0.3s ease;
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    display: none;
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease,
        width 0.2s ease,
        height 0.2s ease;
}

.custom-cursor.cursor-hover {
    width: 80px;
    height: 80px;
    border-color: rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.03);
}

.custom-cursor-dot.cursor-hover {
    width: 0;
    height: 0;
}

/* Use normal cursor instead of hiding it */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: auto;
    }

    a,
    button,
    [role="button"] {
        cursor: pointer;
    }
}

/* ------------------------------------------------
   SCROLL ANIMATIONS
   ------------------------------------------------ */
.scroll-animate {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.scroll-animate:nth-child(1) {
    transition-delay: 0ms;
}

.scroll-animate:nth-child(2) {
    transition-delay: 100ms;
}

.scroll-animate:nth-child(3) {
    transition-delay: 200ms;
}

.scroll-animate:nth-child(4) {
    transition-delay: 300ms;
}

.scroll-animate:nth-child(5) {
    transition-delay: 400ms;
}

/* ------------------------------------------------
   TEXT REVEAL ANIMATION
   ------------------------------------------------ */
.reveal-text .word {
    display: inline-block;
    overflow: hidden;
}

.reveal-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: charReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ------------------------------------------------
   MAGNETIC ELEMENTS
   ------------------------------------------------ */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ------------------------------------------------
   PARALLAX
   ------------------------------------------------ */
.parallax-element {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* ------------------------------------------------
   ENHANCED PROJECT CARDS
   ------------------------------------------------ */
.project-card {
    position: relative;
    overflow: visible;
}

.project-card__image-wrapper {
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

.project-card__image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    transform: translateX(-100%);
    animation: shimmer 2s ease-in-out infinite;
    animation-play-state: paused;
}

.project-card:hover .project-card__image-wrapper::after {
    opacity: 1;
    animation-play-state: running;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.project-card__image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ------------------------------------------------
   ENHANCED SOCIAL LINKS
   ------------------------------------------------ */
.social-link {
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

/* ------------------------------------------------
   SKILL CATEGORY HOVER
   ------------------------------------------------ */
.skill-category {
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #000, transparent);
    transition: left 0.5s ease;
}

.skill-category:hover::before {
    left: 100%;
}

/* ------------------------------------------------
   TIMELINE ENHANCED
   ------------------------------------------------ */
.timeline-item {
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.timeline-item:hover::after {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.05);
}

/* ------------------------------------------------
   NAV LINK HOVER EFFECT
   ------------------------------------------------ */
.nav__link {
    position: relative;
    overflow: hidden;
}

.nav__link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__link:hover::before,
.nav__link--active::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* ------------------------------------------------
   BLOG CARD HOVER
   ------------------------------------------------ */
.blog-card {
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #000;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover::before {
    transform: scaleY(1);
}

/* ------------------------------------------------
   PAGE TRANSITIONS
   ------------------------------------------------ */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.page-loaded {
    opacity: 1;
}

/* ------------------------------------------------
   HERO VISIBILITY
   ------------------------------------------------ */
.hero-visible {
    animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {

    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }

    body {
        cursor: auto;
    }

    a,
    button,
    [role="button"] {
        cursor: pointer;
    }

    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reveal-text .char {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .magnetic {
        transition: none;
    }
}