/* ============================================
   ANIMATIONS - Scroll Reveal & Effects
   ============================================ */

/* --- Scroll Reveal Base --- */
[data-reveal] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

[data-reveal="fade-up"] {
    transform: translateY(30px);
}

[data-reveal="fade-left"] {
    transform: translateX(30px);
}

[data-reveal="fade-right"] {
    transform: translateX(-30px);
}

[data-reveal="scale"] {
    transform: scale(0.95);
}

/* --- Revealed State --- */
[data-reveal].revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* --- Stagger Delays --- */
[data-reveal-delay="100"] { transition-delay: 0.1s; }
[data-reveal-delay="200"] { transition-delay: 0.2s; }
[data-reveal-delay="300"] { transition-delay: 0.3s; }
[data-reveal-delay="400"] { transition-delay: 0.4s; }
[data-reveal-delay="500"] { transition-delay: 0.5s; }
[data-reveal-delay="600"] { transition-delay: 0.6s; }

/* --- Hero Entrance Animation --- */
.hero__content {
    opacity: 0;
    animation: hero-entrance 1s ease forwards 0.3s;
}

@keyframes hero-entrance {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Indicator Animation --- */
.hero__scroll-indicator {
    opacity: 0;
    animation: fade-in 1s ease forwards 1.5s;
}

@keyframes fade-in {
    to { opacity: 1; }
}

/* --- Skill Card Hover Glow --- */
.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(59, 130, 246, 0.06),
        transparent 40%
    );
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.skill-card {
    position: relative;
    overflow: hidden;
}

.skill-card:hover::before {
    opacity: 1;
}

/* --- Timeline Card Entrance --- */
.timeline__item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline__item.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* --- Project Card Image Hover --- */
.project-card__image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-card__image::before {
    opacity: 0.05;
}

/* --- Formacao Card Left Border Animation --- */
.formacao__card {
    border-left-color: transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)),
                      var(--accent-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-left-width: 4px;
    border-left-style: solid;
}

/* --- Nav Link Hover Effect --- */
.nav__link {
    position: relative;
}

/* --- Counter Animation (handled by JS) --- */
.sobre__stat-number {
    transition: color 0.3s ease;
}

/* --- Contato Social Link Arrow --- */
.contato__social-link::after {
    content: '\2192';
    margin-left: auto;
    transition: transform 0.3s ease;
}

.contato__social-link:hover::after {
    transform: translateX(4px);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .hero__content {
        opacity: 1;
        animation: none;
    }

    .hero__scroll-indicator {
        opacity: 1;
        animation: none;
    }

    .timeline__item {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
