/* Extra animations and fixes for portfolio */

/* Fix profile image border in light mode */
body.light-mode .profile-pic {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.light-mode .profile-pic::after {
    box-shadow: inset 0 0 0 3px rgba(30, 136, 229, 0.15);
    opacity: 0.3;
}

body.light-mode .profile-pic img {
    border: none;
}

/* Center hero section content better */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Remove the square decorations from section titles */
.section-title-styled::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gold);
    transform: translateX(-50%);
    opacity: 0;
    animation: lineExpand 1.5s forwards 0.5s;
}

@keyframes lineExpand {
    to {
        opacity: 1;
        width: 100px;
    }
}

body.light-mode .section-title-styled::before {
    background: #1976D2;
}

/* Additional animations */

/* Floating elements animation */
@keyframes floating {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-2deg); }
    75% { transform: translateY(-8px) rotate(1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Button shine effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.7s ease;
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

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

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

/* Reveal animation for project cards */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.light-mode .project-card::after {
    background: linear-gradient(120deg, transparent, rgba(30, 136, 229, 0.1), transparent);
}

.project-card:hover::after {
    opacity: 1;
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 3D tilt effect for skill items */
.skill-item, .tool-item {
    transition: transform 0.5s ease;
    perspective: 1000px;
}

.skill-item:hover, .tool-item:hover {
    transform: rotateX(5deg) rotateY(5deg) translateY(-10px);
}

/* Improved text animation for headers */
.section-title-styled {
    position: relative;
    overflow: hidden;
}

.section-title-styled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    animation: line-anim 2s forwards;
}

body.light-mode .section-title-styled::after {
    background: linear-gradient(90deg, #1976D2, transparent) !important;
}

@keyframes line-anim {
    to {
        width: 100%;
    }
}

/* Glowing background for project cards */
.project-card {
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease-out;
}

body.light-mode .project-card::before {
    background: radial-gradient(circle, rgba(30, 136, 229, 0.1) 0%, transparent 70%);
}

.project-card:hover::before {
    width: 150%;
    height: 150%;
}

/* More advanced animations for portfolio */

/* Enhanced floating animation for skills/tools */
@keyframes floating {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-2deg); }
    75% { transform: translateY(-8px) rotate(1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* 3D wobble effect for elements */
@keyframes wobble {
    0% { transform: translateX(0%) rotate3d(1, 1, 0, 0deg); }
    15% { transform: translateX(-5%) rotate3d(1, 1, 0, -5deg); }
    30% { transform: translateX(5%) rotate3d(1, 1, 0, 3deg); }
    45% { transform: translateX(-3%) rotate3d(1, 1, 0, -3deg); }
    60% { transform: translateX(3%) rotate3d(1, 1, 0, 2deg); }
    75% { transform: translateX(-1%) rotate3d(1, 1, 0, -1deg); }
    100% { transform: translateX(0%) rotate3d(1, 1, 0, 0deg); }
}

/* Text floating animation */
@keyframes textFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(1deg); }
    66% { transform: translateY(-4px) rotate(-1deg); }
}

/* Animated shadow */
@keyframes shadowPulse {
    0% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5); }
    100% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); }
}

/* Pulsing animation for skills */
.pulse-animation {
    animation: skillPulse 1s ease-in-out;
}

@keyframes skillPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Shiny border effect */
.shiny-border {
    position: relative;
    overflow: hidden;
}

.shiny-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: shiny-border 3s infinite;
}

@keyframes shiny-border {
    0% { left: -100%; }
    20%, 100% { left: 100%; }
}

/* Fixed profile picture border in light mode */
body.light-mode .profile-pic::after {
    box-shadow: inset 0 0 0 3px rgba(30, 136, 229, 0.15);
    opacity: 0.3;
}

body.light-mode .profile-pic img {
    border: none;
}

/* Section title animations */
.section-title-styled {
    animation: titleFade 1s ease-out, titleGlow 3s infinite alternate 1s;
}

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

/* 3D hover effect for project cards */
.project-card {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card:hover .project-content h3 {
    transform: translateZ(20px);
    transition: transform 0.5s ease;
}

.project-card:hover .project-content p {
    transform: translateZ(15px);
    transition: transform 0.5s ease;
}

.project-card:hover .tags {
    transform: translateZ(10px);
    transition: transform 0.5s ease;
}

/* Animated background for hero section */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(106, 13, 173, 0.2) 0%, rgba(0, 0, 0, 0) 70%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.6;
    animation: bgPulse 15s infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgPulse {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.2); }
}

body.light-mode .hero::after {
    background: 
        radial-gradient(circle at 20% 30%, rgba(30, 136, 229, 0.1) 0%, rgba(255, 255, 255, 0) 70%),
        radial-gradient(circle at 80% 70%, rgba(13, 71, 161, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Enhanced profile picture animations */
.profile-pic {
    overflow: visible;
    position: relative;
}

.profile-pic img {
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-pic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    z-index: 1;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.5s ease;
}

.profile-pic:hover::after {
    transform: scale(1.2);
    opacity: 1;
}

body.light-mode .profile-pic::after {
    background: radial-gradient(circle, rgba(30, 136, 229, 0.2) 0%, transparent 70%);
}

/* Improved section title styles */
.section-title-styled, .skills-heading, .tools-heading {
    position: relative;
    display: inline-block;
    overflow: hidden;
}