/* Modern Animations and Effects */


/* Scroll-triggered animations - accelerated */
.fade-in-up {
    opacity: 1;
    transform: none;
}

.fade-in-up.visible {
    /* Animation removed */
}

/* Floating elements - slowed down for smoother effect */
.float-element {
    animation: floating 5s ease-in-out infinite; /* Slowed from 3s to 5s */
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Portfolio item hover effects */
.portfolio-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.portfolio-item:hover {
    transform: scale(1.05);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.portfolio-item:hover::before {
    opacity: 1;
}

/* 3D Transform effects */
.transform-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-in-out;
}

.transform-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Glowing effect - enhanced */
.glow-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(24, 188, 156, 0.2); /* Added subtle glow by default */
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.glow-effect:hover::after {
    opacity: 0.7; /* Increased from 0.5 to 0.7 */
}

/* Added pulse effect for better visibility */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(24, 188, 156, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(24, 188, 156, 0); }
    100% { box-shadow: 0 0 0 0 rgba(24, 188, 156, 0); }
}

.pulse {
    animation: pulse 2s infinite;
    border-radius: 5px;
}

/* Text reveal effect - significantly accelerated */
.text-reveal {
    position: relative;
    overflow: visible; /* Changed from hidden to visible */
}

.text-reveal span {
    display: inline-block;
    transform: none;
    opacity: 1;
    white-space: pre-wrap;
}

.text-reveal.visible span {
    transform: none;
    opacity: 1;
    letter-spacing: normal;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Shine effect - improved */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 70%; /* Increased from 50% to 70% for more visible shine */
    height: 300%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 100%); /* Increased opacity from 0.3 to 0.5 */
    transform: rotate(30deg);
    transition: transform 0.5s ease-in-out; /* Faster transition from 0.7s to 0.5s */
}

.shine-effect:hover::after {
    transform: rotate(30deg) translate(250%, 0); /* Adjusted for better visibility */
}

/* Improved bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);} /* Increased bounce height from -10px to -15px */
    60% {transform: translateY(-7px);} /* Increased from -5px to -7px */
}

.bounce-element {
    animation: bounce 2s ease infinite;
    animation-play-state: paused;
    transform-origin: center bottom; /* Added for more natural bounce */
}

.bounce-element:hover {
    animation-play-state: running;
}

/* Added always-bouncing element class */
.bounce-always {
    animation: bounce 2s ease infinite;
    animation-play-state: running;
}

/* Typing cursor effect - fixed visibility */
.typing-cursor::after {
    content: '|';
    display: inline-block;
    margin-left: 2px; /* Added margin for better visibility */
    font-weight: bold; /* Made cursor bold for better visibility */
    color: #18BC9C; /* Changed color to match theme */
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Added typing text animation */
.typing-text {
    border-right: 2px solid #18BC9C;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    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: #18BC9C }
}