/* Animations and Effects */

/* Glitch Text Effect */
.glitch-text {
    animation: glitch 5s infinite;
}

.glitch-text-item {
    position: relative;
    display: inline-block;
}

.glitch-text-item::before,
.glitch-text-item::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text-item::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch-text-item::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(21px, 9999px, 74px, 0);
    }
    5% {
        clip: rect(99px, 9999px, 71px, 0);
    }
    10% {
        clip: rect(61px, 9999px, 100px, 0);
    }
    15% {
        clip: rect(12px, 9999px, 13px, 0);
    }
    20% {
        clip: rect(62px, 9999px, 78px, 0);
    }
    25% {
        clip: rect(65px, 9999px, 8px, 0);
    }
    30% {
        clip: rect(83px, 9999px, 4px, 0);
    }
    35% {
        clip: rect(82px, 9999px, 23px, 0);
    }
    40% {
        clip: rect(26px, 9999px, 93px, 0);
    }
    45% {
        clip: rect(94px, 9999px, 36px, 0);
    }
    50% {
        clip: rect(11px, 9999px, 62px, 0);
    }
    55% {
        clip: rect(11px, 9999px, 95px, 0);
    }
    60% {
        clip: rect(89px, 9999px, 14px, 0);
    }
    65% {
        clip: rect(46px, 9999px, 31px, 0);
    }
    70% {
        clip: rect(12px, 9999px, 64px, 0);
    }
    75% {
        clip: rect(20px, 9999px, 85px, 0);
    }
    80% {
        clip: rect(100px, 9999px, 85px, 0);
    }
    85% {
        clip: rect(5px, 9999px, 77px, 0);
    }
    90% {
        clip: rect(89px, 9999px, 45px, 0);
    }
    95% {
        clip: rect(89px, 9999px, 91px, 0);
    }
    100% {
        clip: rect(59px, 9999px, 83px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(23px, 9999px, 33px, 0);
    }
    5% {
        clip: rect(9px, 9999px, 85px, 0);
    }
    10% {
        clip: rect(100px, 9999px, 21px, 0);
    }
    15% {
        clip: rect(92px, 9999px, 69px, 0);
    }
    20% {
        clip: rect(45px, 9999px, 70px, 0);
    }
    25% {
        clip: rect(67px, 9999px, 75px, 0);
    }
    30% {
        clip: rect(54px, 9999px, 19px, 0);
    }
    35% {
        clip: rect(4px, 9999px, 14px, 0);
    }
    40% {
        clip: rect(22px, 9999px, 9px, 0);
    }
    45% {
        clip: rect(32px, 9999px, 54px, 0);
    }
    50% {
        clip: rect(13px, 9999px, 38px, 0);
    }
    55% {
        clip: rect(9px, 9999px, 72px, 0);
    }
    60% {
        clip: rect(73px, 9999px, 38px, 0);
    }
    65% {
        clip: rect(55px, 9999px, 64px, 0);
    }
    70% {
        clip: rect(42px, 9999px, 41px, 0);
    }
    75% {
        clip: rect(39px, 9999px, 71px, 0);
    }
    80% {
        clip: rect(69px, 9999px, 13px, 0);
    }
    85% {
        clip: rect(26px, 9999px, 17px, 0);
    }
    90% {
        clip: rect(83px, 9999px, 6px, 0);
    }
    95% {
        clip: rect(15px, 9999px, 79px, 0);
    }
    100% {
        clip: rect(38px, 9999px, 68px, 0);
    }
}

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

.fade-in-delay-3 {
    animation-delay: 0.6s;
}

.fade-in-delay-4 {
    animation-delay: 0.8s;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
    opacity: 0;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 10s linear infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float {
    animation: float 5s ease-in-out infinite;
}

/* Progressive Reveal Text */
.reveal-text {
    position: relative;
    color: transparent;
}

.reveal-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-color);
    overflow: hidden;
    width: 0;
    white-space: nowrap;
    animation: reveal 2s ease forwards;
}

@keyframes reveal {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* 3D Card Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.5s;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg);
}

.tilt-card-content {
    transform: translateZ(30px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Glow Effect */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(100, 255, 218, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(100, 255, 218, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(100, 255, 218, 0.5);
    }
}

.glow {
    animation: glow 3s ease-in-out infinite;
}

/* Typing Effect */
.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary-color);
    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(--primary-color);
    }
}