/* Portfolio Specific Styles */


/* Fix navbar z-index to ensure it stays on top */

#header {
    z-index: 1050 !important;
}


/* Global Edge-to-Edge Fix for All Sections */

.portfolio-content .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.portfolio-content .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}


/* Portfolio Hero Background - Match home page (850px height) */

.portfolio-hero.home-cover {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    height: 850px !important;
    min-height: 850px !important;
    max-height: 850px !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    display: flex !important;
    align-items: flex-start !important;
    /* Content starts from top */
    justify-content: center !important;
    padding-top: 100px !important;
    /* Minimal top padding - close to navbar */
}


/* Proper spacing in hero content to prevent overlap */

.portfolio-hero.home-cover .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}

.portfolio-hero.home-cover .custom-pt-6 {
    padding-top: 0 !important;
    margin-bottom: 2rem !important;
    width: 100%;
}

/* Add proper spacing between portfolio hero elements */
.portfolio-hero.home-cover .hero-name {
    margin-bottom: 1.5rem !important;
}

.portfolio-hero.home-cover .hero-bio {
    margin-bottom: 1.5rem !important;
}

.portfolio-hero.home-cover .hero-profile .d-flex,
.portfolio-hero.home-cover .hero-stats {
    margin-top: 1rem !important;
}

.portfolio-hero.home-cover .mb-3,
.portfolio-hero.home-cover .mb-4 {
    margin-bottom: 1.5rem !important;
}

.portfolio-hero.home-cover .container {
    min-height: auto !important;
    height: auto !important;
    padding: 40px 20px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 2 !important;
    background: transparent !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}


/* Mobile-friendly hero area */

@media (max-width: 768px) {
    .portfolio-hero.home-cover {
        height: auto !important;
        min-height: 500px !important;
        max-height: none !important;
        padding-top: 80px !important;
        /* Minimal top padding on mobile */
        padding-bottom: 40px !important;
        background-size: cover !important;
        background-position: center center !important;
    }
    .portfolio-hero.home-cover .container-fluid {
        padding: 0 !important;
    }
    .portfolio-hero.home-cover .custom-pt-6 {
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Add spacing between elements on mobile */
    .portfolio-hero.home-cover .hero-name {
        margin-bottom: 1rem !important;
    }
    
    .portfolio-hero.home-cover .hero-bio {
        margin-bottom: 1rem !important;
    }
    .portfolio-hero.home-cover .container {
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .portfolio-hero .hero-content {
        text-align: center !important;
    }
    .portfolio-hero .hero-profile {
        flex-direction: column !important;
        text-align: center !important;
    }
    .portfolio-hero .hero-avatar {
        margin: 0 auto 20px auto !important;
        display: block !important;
    }
    .portfolio-hero .hero-avatar .avatar-container,
    .portfolio-hero .hero-avatar .user-avatar {
        display: block !important;
        margin: 0 auto !important;
    }
    .portfolio-hero .hero-avatar .avatar-image,
    .portfolio-hero .hero-avatar .avatar-fallback {
        border-radius: 50% !important;
        object-fit: cover !important;
    }
    .portfolio-hero .hero-name {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    .portfolio-hero .hero-bio-container {
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 15px !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 8px !important;
    }
    .portfolio-hero .hero-actions {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    .portfolio-hero .hero-social {
        text-align: center !important;
        margin-top: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .portfolio-hero.home-cover {
        padding-top: 80px !important;
        padding-bottom: 30px !important;
    }
    .portfolio-hero.home-cover .container {
        padding: 15px 10px !important;
    }
    
    /* Add spacing between elements on small mobile */
    .portfolio-hero.home-cover .hero-name {
        margin-bottom: 0.75rem !important;
    }
    
    .portfolio-hero.home-cover .hero-bio {
        margin-bottom: 0.75rem !important;
    }
    
    .portfolio-hero.home-cover .custom-pt-6 {
        margin-bottom: 1rem !important;
    }
    .portfolio-hero .hero-name {
        font-size: 2rem !important;
    }
    .portfolio-hero .hero-bio-container {
        padding: 10px !important;
    }
    .portfolio-hero .hero-actions .btn {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    .portfolio-hero .hero-avatar {
        width: 100px !important;
        height: 100px !important;
    }
    .portfolio-hero .hero-avatar .avatar-container {
        width: 100px !important;
        height: 100px !important;
    }
    .portfolio-hero .hero-avatar .avatar-image,
    .portfolio-hero .hero-avatar .avatar-fallback,
    .portfolio-hero .hero-avatar .user-avatar {
        width: 100px !important;
        height: 100px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
}


/* Hero Section Animations */

.portfolio-hero .hero-content {
    animation: fadeInUp 1s ease-out;
}

.portfolio-hero .hero-avatar {
    animation: fadeInScale 1.2s ease-out 0.3s both;
    transition: transform 0.3s ease;
}

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

.portfolio-hero .hero-info {
    animation: fadeInRight 1s ease-out 0.6s both;
}

.portfolio-hero .hero-actions {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.portfolio-hero .hero-social {
    animation: fadeInLeft 1s ease-out 1.2s both;
}


/* Social Media Links Animation */

.portfolio-hero .social-link {
    transition: all 0.3s ease;
    display: inline-block;
}

.portfolio-hero .social-link:hover {
    transform: translateY(-3px);
    color: #ffffff !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


/* Button Animations */

.portfolio-hero .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.portfolio-hero .btn::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;
}

.portfolio-hero .btn:hover::before {
    left: 100%;
}


/* Badge Animation */

.portfolio-hero .badge {
    animation: pulse 2s infinite;
    transition: transform 0.3s ease;
}

.portfolio-hero .badge:hover {
    transform: scale(1.1);
    animation: none;
}


/* Contact Button with User Color */

.portfolio-hero .contact-btn {
    position: relative;
    z-index: 1;
}

.portfolio-hero .contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.portfolio-hero .contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: -1;
}

.portfolio-hero .contact-btn:hover::before {
    left: 100%;
}


/* User Avatar with Custom Border */

.portfolio-hero .user-avatar {
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-hero .user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-hero .user-avatar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.portfolio-hero .user-avatar:hover::before {
    opacity: 1;
}


/* Bio and Contact Info Background */

.portfolio-hero .hero-bio-container {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    transition: all 0.3s ease;
}


/* Mobile responsive padding for bio container */

@media (max-width: 768px) {
    .portfolio-hero .hero-bio-container {
        padding: 12px 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }
    .portfolio-hero .hero-bio-container .hero-bio {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    /* Reduce padding on hero container for tablets */
    .portfolio-hero .container.px-5 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

@media (max-width: 575px) {
    .portfolio-hero .hero-bio-container {
        padding: 8px 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }
    .portfolio-hero .hero-bio-container .hero-bio {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Reduce padding on hero container for mobile */
    .portfolio-hero .container.px-5 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .portfolio-hero .hero-content {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Minimal card body padding on small mobile */
    .experience-section .card-body,
    .education-section .card-body,
    .certifications-section .card-body,
    .testimonials-section .card-body,
    .projects-section .card-body,
    .custom-section .card-body,
    .skills-section .card-body {
        padding: 0.5rem !important;
    }
    /* Override Bootstrap p-4 class on mobile for projects */
    .projects-section .card-body.p-4 {
        padding: 0.5rem !important;
    }
    /* Override Bootstrap margin classes on small mobile for projects */
    .projects-section .mb-4,
    .projects-section .mb-3,
    .projects-section .mb-2,
    .projects-section .mb-1 {
        margin-bottom: 0.25rem !important;
    }
    .projects-section .me-3,
    .projects-section .me-2,
    .projects-section .me-1 {
        margin-right: 0.25rem !important;
    }
    .projects-section .ms-1 {
        margin-left: 0.125rem !important;
    }
    /* Override badge and button padding on small mobile for projects */
    .projects-section .badge {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
    .projects-section .btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
}

.portfolio-hero .hero-bio-container:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--bs-border-color, #e9ecef);
    transform: translateY(-2px);
}

.portfolio-hero .contact-info-item {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-hero .contact-info-item:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--bs-border-color, #e9ecef);
    transform: translateX(-3px);
}

.portfolio-hero .contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 991px) {
    .portfolio-hero .contact-info {
        align-items: center;
    }
    .portfolio-hero .hero-profile {
        flex-direction: column !important;
        text-align: center !important;
    }
    .portfolio-hero .hero-name {
        font-size: 2.5rem !important;
    }
    .portfolio-hero .hero-bio-container {
        max-width: 100% !important;
        padding: 12px 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }
    .portfolio-hero .hero-actions {
        justify-content: center !important;
    }
}


/* Skills Section Animations */

.skills-section .card {
    transition: all 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    background-color: var(--bs-body-bg, #ffffff) !important;
    border: 1px solid var(--bs-border-color, #e9ecef) !important;
}

.skills-section .card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.skills-section .card:nth-child(1).animate-in {
    transition-delay: 0.1s;
}

.skills-section .card:nth-child(2).animate-in {
    transition-delay: 0.2s;
}

.skills-section .card:nth-child(3).animate-in {
    transition-delay: 0.3s;
}

.skills-section .card:nth-child(4).animate-in {
    transition-delay: 0.4s;
}

.skills-section .card:nth-child(5).animate-in {
    transition-delay: 0.5s;
}

.skills-section .card:nth-child(6).animate-in {
    transition-delay: 0.6s;
}

.skills-section .card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--bs-primary, #007bff) !important;
}


/* Card Content Animations */

.skills-section .card-body i {
    transition: all 0.3s ease;
    transform: scale(0.8);
    opacity: 0;
}

.skills-section .card.animate-in .card-body i {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.2s;
}

.skills-section .card:hover .card-body i {
    transform: scale(1.05);
}

.skills-section .card-title {
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.skills-section .card.animate-in .card-title {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

.skills-section .card-text {
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.skills-section .card.animate-in .card-text {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.4s;
}

.skills-section .skill-progress {
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.skills-section .card.animate-in .skill-progress {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.5s;
}

.skills-section .progress-bar {
    width: 0;
    transition: width 1.2s ease-in-out;
    border-radius: 4px;
    opacity: 1 !important;
    min-height: 8px;
}

.skills-section .card.animate-in .progress-bar {
    transition-delay: 0.7s;
}

.skills-section .progress {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px;
    height: 8px !important;
}


/* Progress bar animation classes for different percentages */

.skills-section .progress-bar.animate-progress {
    width: var(--progress-width);
}


/* Responsive Skills */

@media (max-width: 768px) {
    .skills-section .card-body {
        padding: 0.5rem !important;
    }
    .skills-section .card-body i {
        font-size: 2rem !important;
    }
    .skills-section .card:hover {
        transform: translateY(-2px) !important;
    }
}


/* Education Section Spacing */

.education-section {
    margin-top: -2rem !important;
}


/* All Sections Container Edge-to-Edge - Exclude Skills Section */

.experience-section.container,
.education-section.container,
.certifications-section.container,
.testimonials-section.container,
.projects-section.container,
.custom-section.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}


/* Skills Section - Edge-to-Edge Container */

.skills-section.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}


/* All Sections Row Edge-to-Edge - Exclude Skills Section */

.certifications-section .row,
.testimonials-section .row,
.custom-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* Skills Section - Edge-to-Edge Row */

.skills-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* All Sections Column Edge-to-Edge - Exclude Skills Section */

.education-section .col-lg-6,
.education-section .col-md-12,
.certifications-section .col-lg-6,
.certifications-section .col-md-12,
.testimonials-section .col-lg-6,
.testimonials-section .col-md-12,
.projects-section .col-lg-6,
.projects-section .col-md-12,
.custom-section .col-lg-10,
.custom-section .col-md-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* Force all sections to use 2 cards per row on desktop */

.education-section .row .col-lg-6,
.certifications-section .row .col-lg-6,
.testimonials-section .row .col-lg-6,
.projects-section .row .col-lg-6 {
    flex: 0 0 calc(50% - 0.5rem) !important;
    max-width: calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
}


/* Skills Section - Edge-to-Edge Grid System */

.skills-section .col-lg-4,
.skills-section .col-md-4,
.skills-section .col-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* Skills Section - Ensure proper Bootstrap grid behavior */

.skills-section .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
}

.skills-section .col-lg-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

.skills-section .col-md-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

@media (max-width: 991.98px) {
    .skills-section .col-lg-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    /* All sections - 2 cards per row on tablet */
    .education-section .row .col-lg-6,
    .certifications-section .row .col-lg-6,
    .testimonials-section .row .col-lg-6,
    .projects-section .row .col-lg-6 {
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
    }
}

@media (max-width: 767.98px) {
    .skills-section .col-lg-4,
    .skills-section .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    /* All sections - 1 card per row on mobile */
    .education-section .row .col-lg-6,
    .certifications-section .row .col-lg-6,
    .testimonials-section .row .col-lg-6,
    .projects-section .row .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}


/* Portfolio Cards - Match Home Page Design System */

.experience-section .card,
.education-section .education-card,
.certifications-section .certification-card,
.testimonials-section .testimonial-card,
.projects-section .project-card,
.projects-section .card,
.custom-section .custom-section-card {
    background-color: var(--bs-body-bg, #ffffff) !important;
    border: 1px solid var(--bs-border-color, #e9ecef) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.375rem !important;
    margin-bottom: 1rem !important;
}


/* Skills Section Cards - Theme Background */

.skills-section .card {
    background-color: var(--bs-body-bg, #ffffff) !important;
    border: 1px solid var(--bs-border-color, #e9ecef) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.375rem !important;
    margin-bottom: 1rem !important;
}


/* Portfolio Card Body - Match Home Page */

.experience-section .card .card-body,
.education-section .education-card .card-body,
.certifications-section .certification-card .card-body,
.testimonials-section .testimonial-card .card-body,
.projects-section .project-card .card-body,
.projects-section .card .card-body,
.custom-section .custom-section-card .card-body,
.skills-section .card .card-body {
    padding: 1.5rem !important;
}

.experience-section .card:hover,
.education-section .education-card:hover,
.certifications-section .certification-card:hover,
.testimonials-section .testimonial-card:hover,
.projects-section .project-card:hover,
.projects-section .card:hover,
.custom-section .custom-section-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--bs-primary, #007bff) !important;
}


/* Skills Section Cards - Special Hover Effect */

.skills-section .card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--bs-primary, #007bff) !important;
}


/* Portfolio Section Containers - Match Home Page - Exclude Skills Section */

.experience-section.container,
.education-section.container,
.certifications-section.container,
.testimonials-section.container,
.projects-section.container,
.custom-section.container {
    padding: 3rem 0 !important;
}


/* Skills Section - Keep Bootstrap Container with proper padding */

.skills-section.container {
    padding: 3rem 15px !important;
}


/* Portfolio Section Rows - Match Home Page - Exclude Skills Section */

.certifications-section .row,
.testimonials-section .row,
.custom-section .row {
    margin: 0 !important;
    gap: 1rem !important;
}


/* Skills Section - Keep Bootstrap Row */

.skills-section .row {
    margin: 0 !important;
}


/* Portfolio Section Columns - Match Home Page - Exclude Skills Section */

.education-section .col-lg-6,
.education-section .col-md-12,
.certifications-section .col-lg-6,
.certifications-section .col-md-12,
.testimonials-section .col-lg-6,
.testimonials-section .col-md-12,
.projects-section .col-lg-6,
.projects-section .col-md-12,
.custom-section .col-lg-10,
.custom-section .col-md-12 {
    padding: 0 !important;
}


/* Force all sections to use 2 cards per row on desktop - Second instance */

.education-section .row .col-lg-6,
.certifications-section .row .col-lg-6,
.testimonials-section .row .col-lg-6,
.projects-section .row .col-lg-6 {
    flex: 0 0 calc(50% - 0.5rem) !important;
    max-width: calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
}


/* Skills Section - Keep Bootstrap Grid System */

.skills-section .col-lg-4,
.skills-section .col-md-4,
.skills-section .col-12 {
    padding: 15px !important;
}


/* Mobile Responsiveness - Match Home Page */

@media (max-width: 768px) {
    .education-section .education-card,
    .certifications-section .certification-card,
    .testimonials-section .testimonial-card,
    .projects-section .project-card,
    .custom-section .custom-section-card,
    .skills-section .card {
        margin-bottom: 0.75rem !important;
    }
    .experience-section.container,
    .education-section.container,
    .certifications-section.container,
    .testimonials-section.container,
    .projects-section.container,
    .custom-section.container {
        padding: 2rem 0 !important;
    }
    /* Skills Section - Edge-to-Edge mobile padding */
    .skills-section.container {
        padding: 2rem 8px !important;
    }
}


/* Experience Section Styles */

.experience-section .timeline-item,
.education-section .education-card,
.certifications-section .certification-card,
.testimonials-section .testimonial-card,
.projects-section .project-card,
.custom-section .custom-section-card {
    transition: all 0.3s ease;
    transform: translateY(30px);
    opacity: 0;
}

.experience-section .timeline-item.animate-in,
.education-section .education-card.animate-in,
.certifications-section .certification-card.animate-in,
.testimonials-section .testimonial-card.animate-in,
.projects-section .project-card.animate-in,
.custom-section .custom-section-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.experience-section .timeline-item:nth-child(1).animate-in,
.education-section .education-card:nth-child(1).animate-in,
.certifications-section .certification-card:nth-child(1).animate-in,
.testimonials-section .testimonial-card:nth-child(1).animate-in,
.projects-section .project-card:nth-child(1).animate-in {
    transition-delay: 0.1s;
}

.experience-section .timeline-item:nth-child(2).animate-in,
.education-section .education-card:nth-child(2).animate-in,
.certifications-section .certification-card:nth-child(2).animate-in,
.testimonials-section .testimonial-card:nth-child(2).animate-in,
.projects-section .project-card:nth-child(2).animate-in {
    transition-delay: 0.2s;
}

.experience-section .timeline-item:nth-child(3).animate-in,
.education-section .education-card:nth-child(3).animate-in,
.certifications-section .certification-card:nth-child(3).animate-in,
.testimonials-section .testimonial-card:nth-child(3).animate-in,
.projects-section .project-card:nth-child(3).animate-in {
    transition-delay: 0.3s;
}

.experience-section .timeline-item:nth-child(4).animate-in,
.education-section .education-card:nth-child(4).animate-in,
.certifications-section .certification-card:nth-child(4).animate-in,
.testimonials-section .testimonial-card:nth-child(4).animate-in,
.projects-section .project-card:nth-child(4).animate-in {
    transition-delay: 0.4s;
}

.experience-section .timeline-item:nth-child(5).animate-in,
.education-section .education-card:nth-child(5).animate-in,
.certifications-section .certification-card:nth-child(5).animate-in,
.testimonials-section .testimonial-card:nth-child(5).animate-in,
.projects-section .project-card:nth-child(5).animate-in {
    transition-delay: 0.5s;
}

.projects-section .project-card:nth-child(6).animate-in {
    transition-delay: 0.6s;
}

.experience-section .card {
    transition: all 0.3s ease;
    background-color: var(--bs-body-bg, #ffffff) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
}

.experience-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.experience-section .card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--bs-primary, #007bff) !important;
}

.experience-section .timeline-date .badge {
    transition: all 0.3s ease;
}

.experience-section .timeline-item:hover .timeline-date .badge {
    transform: scale(1.05);
}

.experience-section .card-body img,
.experience-section .card-body .bg-light {
    transition: all 0.3s ease;
}


/* Remove content scaling on hover - only card should scale */

.experience-section .card:hover .card-body img,
.experience-section .card:hover .card-body .bg-light {
    transform: none;
}

.experience-section .badge {
    transition: all 0.2s ease;
}

.experience-section .technologies-used .badge:hover {
    transform: scale(1.05);
    background-color: rgba(0, 0, 0, 0.1) !important;
}


/* Education Section Styles */

.education-card {
    transition: all 0.3s ease;
    transform: translateY(30px);
    opacity: 0;
    background-color: var(--bs-body-bg, #ffffff) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    overflow: hidden;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.education-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.education-section .col-lg-6,
.education-section .col-md-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.education-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.education-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--bs-body-bg, #ffffff) !important;
    border-color: var(--bs-border-color, #e9ecef) !important;
}

.education-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.institution-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(40, 167, 69, 0.1);
}

.institution-logo-fallback {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.education-degree {
    font-weight: 700;
    color: #ffffff !important;
    font-size: 1.2rem;
    line-height: 1.3;
}

.education-institution {
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.timeline-date-education {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px !important;
    padding: 0.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-date-education .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.education-date-badge {
    font-weight: 500;
    border-radius: 20px !important;
}

.education-badges .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.education-badges .badge i {
    font-size: 0.7rem;
}

.education-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.education-activities h6 {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem;
}

.education-activities .badge {
    background-color: var(--bs-body-bg, #ffffff) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}


/* Certifications Section Styles */

.certification-card {
    transition: all 0.3s ease;
    transform: translateY(30px);
    opacity: 0;
    background-color: var(--bs-body-bg, #ffffff) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.certification-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.certification-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--bs-body-bg, #ffffff) !important;
    border-color: var(--bs-border-color, #e9ecef) !important;
}

.certification-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.organization-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.organization-logo-fallback {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.certification-name {
    font-weight: 700;
    color: #ffffff !important;
    font-size: 1.2rem;
    line-height: 1.3;
}

.certification-organization {
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.timeline-date-certification {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px !important;
    padding: 0.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-date-certification .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.certification-date-badge {
    font-weight: 500;
    border-radius: 20px !important;
}

.certification-badges .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.certification-badges .badge i {
    font-size: 0.7rem;
}

.certification-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.certification-skills h6 {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem;
}

.certification-skills .badge {
    background-color: var(--bs-body-bg, #ffffff) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}


/* Testimonials Section Styles */

.testimonial-card {
    transition: all 0.3s ease;
    transform: translateY(30px);
    opacity: 0;
    background-color: var(--bs-body-bg, #ffffff) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.testimonial-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.testimonial-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--bs-body-bg, #ffffff) !important;
    border-color: var(--bs-border-color, #e9ecef) !important;
}

.testimonial-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.client-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.client-photo-fallback {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.client-name {
    font-weight: 700;
    color: #ffffff !important;
    font-size: 1.2rem;
    line-height: 1.3;
}

.client-position {
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-date-testimonial {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px !important;
    padding: 0.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-date-testimonial .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.testimonial-rating {
    font-size: 1rem;
}

.testimonial-badges .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.testimonial-badges .badge i {
    font-size: 0.7rem;
}


/* Projects Section Styles */

.projects-section .project-card,
.projects-section .card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.projects-section .project-card:hover,
.projects-section .card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--bs-primary, #007bff) !important;
}

.projects-section .project-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.projects-section .project-actions .btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 6px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-right: 0.5rem !important;
    margin-bottom: 0.25rem !important;
}

.project-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem !important;
}

.project-image {
    flex-shrink: 0;
}

.project-thumbnail {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.project-image-fallback {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.project-image-fallback i {
    font-size: 1.5rem;
}

.project-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-meta .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.project-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-technologies {
    margin-bottom: 1rem;
}

.tech-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.tech-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-duration,
.project-client {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.project-duration i,
.project-client i {
    color: rgba(255, 255, 255, 0.5);
}

.project-actions {
    margin-top: auto;
    padding-top: 1rem;
}

.project-actions .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.project-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--bs-border-color, #e9ecef);
    color: #fff;
    transform: translateY(-1px);
}

.project-actions .btn i {
    font-size: 0.75rem;
}


/* Custom Sections Styles */

.custom-section .custom-section-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-section .custom-section-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--bs-body-bg, #ffffff) !important;
    border-color: var(--bs-border-color, #e9ecef) !important;
}

.custom-section-img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.custom-section-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
}

.custom-section-content p {
    margin-bottom: 1.5rem;
}

.custom-section-actions .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-section-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--bs-border-color, #e9ecef);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.custom-section-actions .btn i {
    font-size: 0.8rem;
}

.testimonial-quote {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1rem 1rem 1rem;
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -10px;
    left: 10px;
}

.testimonial-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-style: italic;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-details h6 {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem;
}

.project-details p {
    color: rgba(255, 255, 255, 0.7) !important;
}


/* Responsive Experience */

@media (max-width: 768px) {
    .experience-section .timeline-item,
    .education-section .timeline-item {
        margin-bottom: 2rem !important;
    }
    .experience-section .card-body,
    .education-section .card-body,
    .certifications-section .card-body,
    .testimonials-section .card-body,
    .projects-section .card-body,
    .custom-section .card-body,
    .skills-section .card-body {
        padding: 0.75rem !important;
    }
    /* Override Bootstrap p-4 class on tablet for projects */
    .projects-section .card-body.p-4 {
        padding: 0.75rem !important;
    }
    /* Override Bootstrap margin classes on mobile for projects */
    .projects-section .mb-4,
    .projects-section .mb-3,
    .projects-section .mb-2,
    .projects-section .mb-1 {
        margin-bottom: 0.5rem !important;
    }
    .projects-section .me-3,
    .projects-section .me-2,
    .projects-section .me-1 {
        margin-right: 0.5rem !important;
    }
    .projects-section .ms-1 {
        margin-left: 0.25rem !important;
    }
    /* Override badge and button padding on tablet for projects */
    .projects-section .badge {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    .projects-section .btn {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    .experience-section .timeline-date,
    .education-section .timeline-date {
        text-align: center !important;
        margin-bottom: 1rem;
    }
    /* Reorder experience and education layout on mobile - card first, then date */
    .experience-section .timeline-item .row,
    .education-section .timeline-item .row {
        display: flex;
        flex-direction: column;
    }
    .experience-section .timeline-item .col-md-3,
    .education-section .timeline-item .col-md-3 {
        order: 2;
        /* Move date section to bottom */
        text-align: center !important;
        margin-top: 0.5rem;
        /* Reduced spacing to connect with card */
        margin-bottom: 0;
    }
    .experience-section .timeline-item .col-md-9,
    .education-section .timeline-item .col-md-9 {
        order: 1;
        /* Move card content to top */
    }
    /* Add connected semi-transparent background to date section on mobile */
    .experience-section .timeline-date,
    .education-section .timeline-date {
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 8px !important;
        padding: 0.75rem !important;
        border: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: -4px;
        /* Pull closer to the card above */
    }
    /* Edge-to-edge mobile design for all sections */
    .experience-section.container,
    .education-section.container,
    .certifications-section.container,
    .testimonials-section.container,
    .projects-section.container,
    .custom-section.container,
    .skills-section.container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
    }
    .education-section .row,
    .certifications-section .row,
    .testimonials-section .row,
    .custom-section .row,
    .skills-section .row,
    .experience-section .row,
    .projects-section .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .education-section .col-lg-6,
    .education-section .col-md-12,
    .certifications-section .col-lg-6,
    .certifications-section .col-md-12,
    .testimonials-section .col-lg-6,
    .testimonials-section .col-md-12,
    .projects-section .col-lg-6,
    .projects-section .col-md-12,
    .custom-section .col-lg-10,
    .custom-section .col-md-12,
    .skills-section .col-lg-4,
    .skills-section .col-md-4,
    .skills-section .col-12,
    .experience-section .col-lg-6,
    .experience-section .col-md-12 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Remove px-5 class effects on mobile - make edge-to-edge */
    .px-5 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Ensure cards take full width with minimal margin - edge-to-edge on mobile */
    .experience-section .card,
    .education-section .education-card,
    .certifications-section .certification-card,
    .testimonials-section .testimonial-card,
    .projects-section .project-card,
    .custom-section .custom-section-card,
    .skills-section .card {
        margin-bottom: 8px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .experience-section .timeline-item {
        margin-bottom: 1rem !important;
    }
    /* Card mobile adjustments */
    .education-header,
    .certification-header,
    .testimonial-header,
    .project-header {
        padding: 1rem !important;
    }
    .education-body,
    .certification-body,
    .testimonial-body,
    .project-body {
        padding: 1rem !important;
    }
    .custom-section .custom-section-card {
        padding: 1.5rem !important;
    }
    .custom-section-content {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    .custom-section-img {
        max-height: 250px !important;
    }
    .education-degree,
    .certification-name,
    .client-name,
    .project-name {
        font-size: 1rem !important;
    }
    .education-institution,
    .certification-organization,
    .client-position,
    .project-description {
        font-size: 0.9rem !important;
    }
    .institution-logo,
    .institution-logo-fallback,
    .organization-logo,
    .organization-logo-fallback,
    .client-photo,
    .client-photo-fallback,
    .project-thumbnail,
    .project-image-fallback {
        width: 50px !important;
        height: 50px !important;
    }
    .institution-logo-fallback i,
    .organization-logo-fallback i,
    .client-photo-fallback i,
    .project-image-fallback i {
        font-size: 1.2rem !important;
    }
}


/* Text Animations */

.portfolio-hero .hero-name {
    animation: fadeInDown 1s ease-out 0.4s both;
}


/* Typing Animation for Name */

.portfolio-hero .typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typeWriter 3s steps(40) 1s forwards;
    vertical-align: top;
    max-width: 100%;
}

.portfolio-hero .typing-cursor {
    display: inline;
    animation: blink 1s infinite;
    animation-delay: 1s;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 2px;
    vertical-align: top;
}

.portfolio-hero .hero-name {
    white-space: nowrap;
    overflow: visible;
}


/* Mobile Responsiveness for Typing Name */

@media (max-width: 991px) {
    .portfolio-hero .hero-name {
        white-space: normal;
        overflow: visible;
        word-break: break-word;
        text-align: center;
    }
    .portfolio-hero .typing-text {
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
        width: auto;
        animation: none;
        overflow: visible;
    }
    .portfolio-hero .typing-cursor {
        display: none;
    }
}

@keyframes typeWriter {
    0% {
        width: 0;
    }
    100% {
        width: calc(100% - 20px);
    }
}

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

.portfolio-hero .hero-title {
    animation: fadeInDown 1s ease-out 0.6s both;
}

.portfolio-hero .hero-bio {
    animation: fadeInUp 1s ease-out 0.8s both;
}


/* Contact Info Animation */

.portfolio-hero .contact-info {
    animation: fadeInRight 1s ease-out 1s both;
}

.portfolio-hero .contact-info p {
    transition: color 0.3s ease;
}

.portfolio-hero .contact-info p:hover {
    color: #ffffff !important;
}


/* Keyframe Animations */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}


/* Responsive Adjustments */

@media (max-width: 768px) {
    .portfolio-hero .hero-content {
        text-align: center;
    }
    .portfolio-hero .hero-actions {
        justify-content: center !important;
        flex-wrap: wrap;
    }
    .portfolio-hero .hero-social {
        text-align: center;
        margin-top: 2rem;
    }
}


/* Loading State */

.portfolio-hero.loading * {
    animation-play-state: paused;
}


/* Smooth Scrolling for Internal Links */

html {
    scroll-behavior: smooth;
}


/* Hover Effects for Interactive Elements */

.portfolio-hero .interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-hero .interactive-element:hover {
    transform: translateY(-2px);
}


/* Mobile Responsive Project Cards */

@media (max-width: 768px) {
    .projects-section.container,
    .experience-section.container,
    .education-section.container,
    .certifications-section.container,
    .testimonials-section.container,
    .skills-section.container,
    .custom-section.container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .projects-section .project-card {
        padding: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    .projects-section .project-actions {
        padding-top: 0.5rem !important;
    }
    .projects-section .project-actions .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
        margin-right: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }
}

@media (max-width: 575px) {
    .projects-section.container,
    .experience-section.container,
    .education-section.container,
    .certifications-section.container,
    .testimonials-section.container,
    .skills-section.container,
    .custom-section.container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .projects-section .project-card {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    .projects-section .project-actions {
        padding-top: 0.5rem !important;
    }
    .projects-section .project-actions .btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
        margin-right: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }
}


/* Ensure cards take full width with minimal margin */

.experience-section .card,
.education-section .education-card,
.certifications-section .certification-card,
.testimonials-section .testimonial-card,
.projects-section .project-card,
.custom-section .custom-section-card,
.skills-section .card {
    margin-bottom: 8px !important;
}

.experience-section .timeline-item {
    margin-bottom: 1rem !important;
}


/* Card mobile adjustments */

.education-header,
.certification-header,
.testimonial-header,
.project-header {
    padding: 1rem !important;
}

.education-body,
.certification-body,
.testimonial-body,
.project-body {
    padding: 1rem !important;
}

.custom-section .custom-section-card {
    padding: 1.5rem !important;
}

.custom-section-content {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

.custom-section-img {
    max-height: 250px !important;
}

.education-degree,
.certification-name,
.client-name,
.project-name {
    font-size: 1rem !important;
}

.education-institution,
.certification-organization,
.client-position,
.project-description {
    font-size: 0.9rem !important;
}

.institution-logo,
.institution-logo-fallback,
.organization-logo,
.organization-logo-fallback,
.client-photo,
.client-photo-fallback,
.project-thumbnail,
.project-image-fallback {
    width: 50px !important;
    height: 50px !important;
}

.institution-logo-fallback i,
.organization-logo-fallback i,
.client-photo-fallback i,
.project-image-fallback i {
    font-size: 1.2rem !important;
}


/* Text Animations */

.portfolio-hero .hero-name {
    animation: fadeInDown 1s ease-out 0.4s both;
}


/* Typing Animation for Name */

.portfolio-hero .typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typeWriter 3s steps(40) 1s forwards;
    vertical-align: top;
    max-width: 100%;
}

.portfolio-hero .typing-cursor {
    display: inline;
    animation: blink 1s infinite;
    animation-delay: 1s;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 2px;
    vertical-align: top;
}

.portfolio-hero .hero-name {
    white-space: nowrap;
    overflow: visible;
}


/* Mobile Responsiveness for Typing Name */

@media (max-width: 991px) {
    .portfolio-hero .hero-name {
        white-space: normal;
        overflow: visible;
        word-break: break-word;
        text-align: center;
    }
    .portfolio-hero .typing-text {
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
        width: auto;
        animation: none;
        overflow: visible;
    }
    .portfolio-hero .typing-cursor {
        display: none;
    }
}

@keyframes typeWriter {
    0% {
        width: 0;
    }
    100% {
        width: calc(100% - 20px);
    }
}

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

.portfolio-hero .hero-title {
    animation: fadeInDown 1s ease-out 0.6s both;
}

.portfolio-hero .hero-bio {
    animation: fadeInUp 1s ease-out 0.8s both;
}


/* Contact Info Animation */

.portfolio-hero .contact-info {
    animation: fadeInRight 1s ease-out 1s both;
}

.portfolio-hero .contact-info p {
    transition: color 0.3s ease;
}

.portfolio-hero .contact-info p:hover {
    color: #ffffff !important;
}


/* Keyframe Animations */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}


/* Responsive Adjustments */

@media (max-width: 768px) {
    .portfolio-hero .hero-content {
        text-align: center;
    }
    .portfolio-hero .hero-actions {
        justify-content: center !important;
        flex-wrap: wrap;
    }
    .portfolio-hero .hero-social {
        text-align: center;
        margin-top: 2rem;
    }
    .portfolio-hero .contact-info {
        align-items: center !important;
    }
    .portfolio-hero .contact-info-item {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* Loading State */

.portfolio-hero.loading * {
    animation-play-state: paused;
}


/* Smooth Scrolling for Internal Links */

html {
    scroll-behavior: smooth;
}


/* Key Achievements Styling */

.achievements-list {
    margin-top: 0.5rem;
}

.achievements-list ul {
    margin-bottom: 0;
    padding-left: 0;
}

.achievements-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.achievements-list li:last-child {
    margin-bottom: 0;
}

.achievements-list .bi-check-circle-fill {
    color: #28a745 !important;
    font-size: 0.875rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.achievements-list span {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.5;
}


/* Mobile responsive adjustments for achievements */

@media (max-width: 768px) {
    .achievements-list li {
        margin-bottom: 0.5rem;
    }
    .achievements-list .bi-check-circle-fill {
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }
    .achievements-list span {
        font-size: 0.8rem;
    }
}

@media (max-width: 575px) {
    .achievements-list li {
        margin-bottom: 0.4rem;
    }
    .achievements-list .bi-check-circle-fill {
        font-size: 0.7rem;
        margin-right: 0.5rem;
    }
    .achievements-list span {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    /* Skills section edge-to-edge on small mobile */
    .skills-section.container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Ensure contact info is centered on small mobile */
    .portfolio-hero .contact-info {
        align-items: center !important;
    }
    .portfolio-hero .contact-info-item {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }
}


/* Dynamic Achievements Form Styling */

.achievement-item {
    animation: fadeInUp 0.3s ease-out;
}

.achievement-item .input-group-text {
    background-color: var(--bs-light, #f8f9fa);
    border-color: #dee2e6;
    color: #28a745;
}

.achievement-item .form-control {
    border-left: 0;
}

.achievement-item .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.achievement-item .remove-achievement {
    border-left: 0;
}

.achievement-item .remove-achievement:hover {
    background-color: var(--bs-danger, #dc3545);
    border-color: #dc3545;
    color: white;
}

#add-achievement {
    transition: all 0.3s ease;
}

#add-achievement:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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


/* Hover Effects for Interactive Elements */

.portfolio-hero .interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-hero .interactive-element:hover {
    transform: translateY(-2px);
}


/* CRITICAL: Force all sections to display 2 cards per row on desktop */

@media (min-width: 992px) {
    .education-section .row .col-lg-6,
    .certifications-section .row .col-lg-6,
    .testimonials-section .row .col-lg-6,
    .projects-section .row .col-lg-6 {
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
    }
    /* Force projects section to use proper grid with gaps */
    .projects-section .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    .projects-section .row .col-lg-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Force education section to use proper grid with gaps */
    .education-section .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    .education-section .row .col-lg-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .education-section .row .col-lg-6,
    .certifications-section .row .col-lg-6,
    .testimonials-section .row .col-lg-6,
    .projects-section .row .col-lg-6 {
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        width: calc(50% - 0.5rem) !important;
    }
    /* Force projects section to use proper grid with gaps on tablet */
    .projects-section .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    .projects-section .row .col-lg-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    /* Force education section to use proper grid with gaps on tablet */
    .education-section .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    .education-section .row .col-lg-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

@media (max-width: 767.98px) {
    .education-section .row .col-lg-6,
    .certifications-section .row .col-lg-6,
    .testimonials-section .row .col-lg-6,
    .projects-section .row .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}


/* Mobile Responsive Project Cards */

@media (max-width: 768px) {
    .projects-section.container,
    .experience-section.container,
    .education-section.container,
    .certifications-section.container,
    .testimonials-section.container,
    .skills-section.container,
    .custom-section.container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .projects-section .project-card {
        padding: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    .projects-section .project-actions {
        padding-top: 0.5rem !important;
    }
    .projects-section .project-actions .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
        margin-right: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }
}

@media (max-width: 575px) {
    .projects-section.container,
    .experience-section.container,
    .education-section.container,
    .certifications-section.container,
    .testimonials-section.container,
    .skills-section.container,
    .custom-section.container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .projects-section .project-card {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    .projects-section .project-actions {
        padding-top: 0.5rem !important;
    }
    .projects-section .project-actions .btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
        margin-right: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }
}