/* ==================== PHASE 3: FINAL POLISH ==================== */

/* Enhanced Smooth Scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* Navigation Link Hover Effects */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--first-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active-link::after {
    width: 100%;
    left: 0;
}

/* Enhanced Social Icons */
.home-social-icon,
.footer-social {
    position: relative;
    transition: all 0.3s ease;
}

.home-social-icon::before,
.footer-social::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--first-color);
    border-radius: 50%;
    opacity: 0.2;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: -1;
}

.home-social-icon:hover::before,
.footer-social:hover::before {
    width: 40px;
    height: 40px;
}

.home-social-icon:hover,
.footer-social:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Enhanced Scroll Up Button */
.scrollup {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(113, 58, 190, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(113, 58, 190, 0.3);
    transition: all 0.3s ease;
}

.scrollup:hover {
    background-color: var(--first-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(113, 58, 190, 0.5);
}

/* Contact Form Enhanced Focus */
.contact-input:focus,
.contact-input:focus-within {
    outline: none;
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px rgba(113, 58, 190, 0.1);
}

/* Enhanced Service Modal */
.services-box {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.services-box-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Qualification Timeline Enhancement */
.qualification-round {
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(113, 58, 190, 0.2);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(113, 58, 190, 0.1);
    }
}

/* Enhanced Section Titles */
.section-title {
    position: relative;
    display: block;
    width: fit-content;
    width: -moz-fit-content;
    margin: 0 auto;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60px;
    height: 3px;
    background: var(--gradient-text);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Image Zoom on Hover */
.about-img,
.bento-img {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.about-img:hover,
.bento-card:hover .bento-img {
    transform: scale(1.05) rotate(2deg);
}

/* Enhanced Footer Links */
.footer-link {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.footer-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--first-color-lighter);
    transition: width 0.3s ease;
}

.footer-link:hover::before {
    width: 100%;
}

.footer-link:hover {
    transform: translateX(5px);
}

/* Skill Pills Enhanced Interaction */
.skill-pill {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.skill-pill:hover::before {
    width: 200px;
    height: 200px;
}

/* Text Selection Styling */
::selection {
    background: var(--first-color);
    color: #fff;
}

::-moz-selection {
    background: var(--first-color);
    color: #fff;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--first-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Typing Cursor Enhancement */
.typed-cursor {
    animation: typedjsBlink 0.7s infinite;
    font-weight: 300;
    margin-left: 2px;
}

/* Enhanced Home Scroll Indicator */
.home-scroll-button {
    animation: bounce-scroll 2s ease-in-out infinite;
}

@keyframes bounce-scroll {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Contact Button Enhanced */
.contact-button {
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact-button:hover::before {
    left: 100%;
}

/* Services Button Hover Enhancement */
.services-button {
    transition: all 0.3s ease;
}

.services-button:hover {
    gap: 0.5rem;
    padding-left: 0.5rem;
}

/* Bento Card Tilt Effect on Hover */
.bento-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
}

/* Enhanced Theme Toggle */
.change-theme {
    transition: all 0.3s ease;
}

.change-theme:hover {
    transform: rotate(20deg) scale(1.2);
}

/* Loading Spinner for Forms */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive Enhancements */
@media screen and (max-width: 768px) {
    .nav-link::after {
        display: none;
        /* Remove underline on mobile */
    }

    .bento-card:hover {
        transform: translateY(-3px);
        /* Reduce tilt on mobile */
    }
}