/*
 * Modern Animations & Effects - 2026 Design Trends
 * Enhanced by Claude for Rahul Patil Portfolio
 */

/* ===== CUSTOM PROPERTIES ===== */
:root {
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-elevation-low: 0 1px 2px var(--shadow-color);
    --shadow-elevation-medium: 0 4px 8px var(--shadow-color);
    --shadow-elevation-high: 0 8px 16px var(--shadow-color);
    --shadow-elevation-ultra: 0 16px 32px var(--shadow-color);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== ANIMATED GRADIENT BACKGROUND ===== */
.animated-gradient-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* ===== GLASSMORPHISM EFFECT ===== */
.glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 2rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* ===== MODERN CARD EFFECTS ===== */
.modern-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-elevation-low);
    position: relative;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevation-high);
}

/* ===== SKILL SECTION ENHANCEMENTS ===== */
.skill {
    transition: var(--transition-smooth);
    position: relative;
}

.skill:hover {
    transform: translateY(-3px) scale(1.02);
}

/* ===== BUTTON MICRO-INTERACTIONS ===== */
.custombtn {
    transition: var(--transition-smooth);
}

.custombtn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevation-medium);
}

.custombtn:active {
    transform: translateY(0) scale(0.98);
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

/* ===== PULSE ANIMATION ===== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* ===== TEXT GRADIENT EFFECT ===== */
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
}

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

/* ===== TIMELINE ENHANCEMENTS ===== */
.timeline-details {
    transition: var(--transition-smooth);
}

.timeline-details:hover {
    transform: translateX(10px);
}

.timeline-details.left:hover {
    transform: translateX(-10px);
}

/* ===== HOVER LIFT EFFECT ===== */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevation-medium);
}

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

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 200px;
    height: 200px;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

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

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* ===== SECTION TITLE ENHANCEMENTS ===== */
.section-heading {
    position: relative;
}

/* Removed ::after pseudo-element to avoid layout conflicts */

/* ===== NAVBAR ENHANCEMENT ===== */
.navbar {
    transition: var(--transition-smooth);
}

.navbar-static-top.glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* ===== PORTFOLIO HOVER EFFECTS ===== */
.mega-entry {
    transition: var(--transition-smooth);
}

.mega-entry:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-elevation-medium);
}

/* ===== SOCIAL ICONS ENHANCEMENTS ===== */
.social-link {
    transition: var(--transition-smooth);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.05);
}

/* ===== CERTIFICATION CARDS ===== */
.education {
    transition: var(--transition-smooth);
    padding: 1rem;
    border-radius: 10px;
}

.education:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.02);
}

/* ===== COUNTER ANIMATION ENHANCEMENT ===== */
.counter {
    transition: var(--transition-smooth);
}

.counter:hover {
    transform: scale(1.1);
}

.counter .text-title {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== PROGRESS BAR GLOW ===== */
.chart {
    position: relative;
}

.chart::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0);
    transition: var(--transition-smooth);
}

.skill:hover .chart::after {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
}

/* ===== SMOOTH SCROLL BEHAVIOR ===== */
/* Removed to avoid conflicts with existing smooth scroll implementations */

/* ===== PARTICLE CONTAINER ===== */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.tp-banner-container {
    position: relative;
}

.tp-banner,
.tp-banner .tp-caption {
    position: relative;
    z-index: 10;
}

.tp-banner img {
    position: relative;
    z-index: 10;
}

/* ===== TYPING CURSOR ===== */
.typed-cursor {
    opacity: 1;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== LOADING ANIMATION ===== */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
    .modern-card:hover {
        transform: translateY(-5px) scale(1.01);
    }

    .skill:hover {
        transform: translateY(-5px) scale(1.02);
    }
}

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

/* ===== ENHANCED ABOUT IMAGE ===== */
.about-img img {
    transition: var(--transition-smooth);
}

.about-img img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-elevation-medium);
}

/* ===== DOWNLOAD BUTTON ENHANCEMENT ===== */
.custombtn .icons {
    transition: var(--transition-smooth);
}

.custombtn:hover .icons {
    transform: translateY(-3px);
}

/* ===== FORM ENHANCEMENTS ===== */
.form-control {
    transition: var(--transition-smooth);
    border: 2px solid #e0e0e0;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* ===== NEON GLOW EFFECT ===== */
.neon-glow {
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
                 0 0 20px rgba(102, 126, 234, 0.6),
                 0 0 30px rgba(102, 126, 234, 0.4);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
                     0 0 20px rgba(102, 126, 234, 0.6),
                     0 0 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(102, 126, 234, 1),
                     0 0 30px rgba(102, 126, 234, 0.8),
                     0 0 40px rgba(102, 126, 234, 0.6);
    }
}

/* ===== ENSURE CLICKABILITY ===== */
/* Make sure all interactive elements are above particles */
.navigation,
.navbar,
.tp-banner,
.mega-entry,
.custombtn,
a,
button,
input,
textarea,
select,
.social-link,
.form-control {
    position: relative;
    z-index: 100;
}

/* Ensure scroll buttons work */
.scroll-down,
.top-scroll-bar {
    position: relative;
    z-index: 100;
}

/* Fix for banner timer */
.tp-bannertimer {
    position: relative !important;
    z-index: 100 !important;
}

/* ===== LAYOUT FIXES FOR SECTIONS ===== */
/* Ensure proper clearing and spacing after portfolio */
.section-portfolio {
    clear: both;
    overflow: hidden;
    position: relative;
}

.connect-section {
    clear: both;
    overflow: visible;
    position: relative;
    z-index: 10;
}

.section-contact {
    clear: both;
    position: relative;
    z-index: 10;
}

.footer {
    clear: both;
    position: relative;
    z-index: 10;
}

/* Fix for megafolio container */
.megafolio-container {
    clear: both;
    overflow: hidden;
}

/* Ensure sections don't overlap */
.section-portfolio,
.connect-section,
.section-contact,
.footer {
    display: block;
    width: 100%;
}

/* Fix for contact map */
.contact-map {
    position: relative;
    clear: both;
}

/* Draggable monitor section fix */
.draggable-monitor {
    position: relative;
    z-index: 10;
}

/* ===== PORTFOLIO GALLERY FIXES ===== */
/* Ensure megafolio gallery displays properly */
.megafolio-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    clear: both;
}

/* Standardize mega-entry dimensions */
.mega-entry {
    position: relative;
    overflow: hidden;
    display: inline-block;
    vertical-align: top;
}

/* Ensure images fit properly within mega-entry */
.mega-entry img {
    width: 100%;
    height: auto;
    display: block;
}

/* Fix mega-hover overlay */
.mega-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Ensure proper spacing in portfolio section */
.section-portfolio .row {
    margin-left: 0;
    margin-right: 0;
}

.section-portfolio .col-md-12 {
    padding-left: 15px;
    padding-right: 15px;
}

/* Filter navigation styling */
.filter-nav {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.filter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-nav li {
    display: inline-block;
    margin: 0 10px;
    cursor: pointer;
}

/* Ensure light-bg-entries container is properly sized */
.light-bg-entries {
    min-height: 400px;
    position: relative;
}

/* Fix for portfolio grid layout */
.megafolio-container::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure proper spacing after portfolio */
.section-portfolio {
    padding-bottom: 80px;
    margin-bottom: 0;
}

/* Fix potential conflicts with transform on mega-entry */
.mega-entry.scale-in,
.mega-entry.fade-in-up,
.mega-entry.slide-in-left,
.mega-entry.slide-in-right {
    animation: none !important;
}

/* Apply subtle transform on hover only */
.mega-entry:hover {
    transform: scale(1.02) !important;
    transition: transform 0.3s ease;
}
