/* ==========================================
   MEET SHAH - ANIMATION STYLES
   ========================================== */

/* ==========================================
   3D TILT EFFECT
   ========================================== */
[data-tilt] {
    transform-style: preserve-3d;
    will-change: transform;
}

[data-tilt] .skill-card-inner,
[data-tilt] .service-card-inner,
[data-tilt] .work-card-inner {
    transform: translateZ(20px);
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS
   ========================================== */
.reveal-up.revealed {
    animation: revealUp 0.8s var(--ease-out-expo) forwards;
}

.reveal-left.revealed {
    animation: revealLeft 0.8s var(--ease-out-expo) forwards;
}

.reveal-right.revealed {
    animation: revealRight 0.8s var(--ease-out-expo) forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   MAGNETIC BUTTON EFFECT
   ========================================== */
.magnetic {
    transition: transform 0.3s var(--ease-out-expo);
}

/* ==========================================
   TEXT SPLIT ANIMATIONS
   ========================================== */
.char-animate {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: charReveal 0.6s var(--ease-out-expo) forwards;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   STAGGER ANIMATIONS
   ========================================== */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-out-expo);
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   PARALLAX ELEMENTS
   ========================================== */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ==========================================
   GLITCH TEXT EFFECT (for headings)
   ========================================== */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch-text:hover::before {
    animation: glitch1 0.3s infinite;
    color: #ff00ff;
    opacity: 0.7;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text:hover::after {
    animation: glitch2 0.3s infinite;
    color: #00ffff;
    opacity: 0.7;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0% { transform: translate(2px, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, 2px); }
    100% { transform: translate(2px, 0); }
}

@keyframes glitch2 {
    0% { transform: translate(-2px, 0); }
    25% { transform: translate(2px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, -2px); }
    100% { transform: translate(-2px, 0); }
}

/* ==========================================
   SHIMMER / LOADING EFFECT
   ========================================== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.05),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to { left: 100%; }
}

/* ==========================================
   GRADIENT BORDER ANIMATION
   ========================================== */
.gradient-border {
    position: relative;
    border: none !important;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
    animation: gradientRotate 3s linear infinite;
    background-size: 200% 200%;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================
   FLOATING ANIMATION VARIANTS
   ========================================== */
.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.float-medium {
    animation: floatMedium 4s ease-in-out infinite;
}

.float-fast {
    animation: floatFast 3s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   MORPHING SHAPES
   ========================================== */
.morph-shape {
    animation: morphShape 8s ease-in-out infinite;
}

@keyframes morphShape {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 30% 60% 40% / 70% 40% 50% 60%; }
}

/* ==========================================
   NEON GLOW
   ========================================== */
.neon-glow {
    text-shadow: 
        0 0 7px rgba(168,85,247,0.5),
        0 0 10px rgba(168,85,247,0.3),
        0 0 21px rgba(168,85,247,0.2),
        0 0 42px rgba(108,92,231,0.2);
}

/* ==========================================
   TYPEWRITER
   ========================================== */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent-2);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-2); }
}

/* ==========================================
   PERSPECTIVE SCROLL
   ========================================== */
.perspective-scroll {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.perspective-scroll > * {
    transition: transform 0.3s var(--ease-out-expo);
}

/* ==========================================
   SMOOTH IMAGE REVEAL
   ========================================== */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    transform-origin: right;
    transition: transform 1s var(--ease-out-expo);
}

.image-reveal.revealed::after {
    transform: scaleX(0);
}

/* ==========================================
   HOVER LINK UNDERLINE
   ========================================== */
.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out-expo);
}

.hover-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================
   RIPPLE EFFECT
   ========================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================
   PAGE SPECIFIC: ABOUT PAGE
   ========================================== */
.timeline-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s var(--ease-out-expo);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================
   PAGE SPECIFIC: SERVICES PAGE
   ========================================== */
.service-detail-card {
    transition: all 0.5s var(--ease-out-expo);
}

.service-detail-card:hover {
    transform: translateY(-10px) rotateX(2deg);
}

/* ==========================================
   PAGE SPECIFIC: CONTACT PAGE
   ========================================== */
.form-group {
    position: relative;
    overflow: hidden;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-out-expo);
}

.form-group:focus-within::after {
    transform: translateX(0);
}

/* ==========================================
   SMOOTH SCROLL PROGRESS
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s;
}

/* ==========================================
   NOISE TEXTURE OVERLAY
   ========================================== */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}
