/* Custom Variables */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --blue-shadow: rgba(0, 123, 255, 0.3);
}

/* General Styles */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

* {
    box-sizing: border-box;
}

/* Improved container handling */
.container, .container-fluid {
    width: 100%;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Hero Section */
.jumbotron {
    background-color: var(--light-color);
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    border-radius: 0.3rem;
}

@media (min-width: 768px) {
    .jumbotron {
        padding: 4rem 2rem;
    }
}

.hero-section {
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--blue-shadow);
}

/* Progress Bars */
.progress {
    height: 25px;
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 3px rgba(0, 123, 255, 0.1);
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--light-color);
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: auto;
}

/* Project badges */
.badge {
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

/* Profile image */
.profile-img {
    max-width: 100%;
    border-radius: 50%;
}

/* Achievement Badges */
.achievement-badge {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

/* Contact Info Styling */
.contact-info a {
    color: inherit;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--bs-primary);
}

/* Text gradient effect for name */
.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Profile image styling */
.profile-main {
    max-width: 100%;
    border: 6px solid white;
    box-shadow: 0 10px 30px var(--blue-shadow);
    transition: box-shadow 0.3s ease;
}

.profile-main:hover {
    box-shadow: 0 10px 30px var(--blue-shadow), 0 0 0 5px rgba(0, 123, 255, 0.1);
}

.profile-wrapper {
    max-width: 1000px;
    position: relative;
    padding: 10px;
    margin: 0 auto;
}

/* Floating tech icons */
.tech-icon {
    position: absolute;
    background-color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px var(--blue-shadow);
    font-size: 1.3rem;
    animation: float 3s ease-in-out infinite, pulse-shadow 3s ease-in-out infinite;
    z-index: 10;
    transition: transform 0.3s ease;
}

.tech-icon:hover {
    transform: scale(1.2);
    z-index: 11;
    box-shadow: 0 8px 20px var(--blue-shadow);
}

.tech-icon-1 {
    top: 10%;
    left: 5%;
    color: #e44d26;
    animation-delay: 0s, 0.5s;
}

.tech-icon-2 {
    top: 10%;
    right: 5%;
    color: #264de4;
    animation-delay: 0.5s, 0s;
}

.tech-icon-3 {
    top: 25%;
    left: 0%;
    color: #684D95;
    animation-delay: 1s, 1.5s;
}

.tech-icon-4 {
    top: 25%;
    right: 0%;
    color: #00618a;
    animation-delay: 1.5s, 2s;
}

.tech-icon-5 {
    top: 45%;
    left: -5%;
    color: #f7df1e;
    animation-delay: 2s, 0.7s;
}

.tech-icon-6 {
    top: 45%;
    right: -5%;
    color: #0078D4;
    animation-delay: 0.7s, 1.2s;
}

.tech-icon-7 {
    top: 65%;
    left: 0%;
    color: #7952B3;
    animation-delay: 1.2s, 0.3s;
}

.tech-icon-8 {
    top: 65%;
    right: 0%;
    color: #61DAFB;
    animation-delay: 1.8s, 1.8s;
}

.tech-icon-9 {
    bottom: 10%;
    left: 10%;
    color: #FF9900;
    animation-delay: 0.3s, 2.2s;
}

.tech-icon-10 {
    bottom: 10%;
    right: 10%;
    color: #F05032;
    animation-delay: 1.4s, 0.9s;
}

.tech-icon-11 {
    bottom: 25%;
    left: 15%;
    color: #0078D7;
    animation-delay: 0.9s, 1.4s;
}

.tech-icon-12 {
    bottom: 25%;
    right: 15%;
    color: #5C2D91;
    animation-delay: 2.2s, 2.5s;
}

.tech-icon-13 {
    top: 5%;
    left: 35%;
    color: #0078D4;
    animation-delay: 0.7s, 1.2s;
}

.tech-icon-14 {
    bottom: 15%;
    left: 5%;
    color: #7952B3;
    animation-delay: 1.2s, 0.3s;
}

.tech-icon-15 {
    top: 50%;
    left: 0;
    color: #61DAFB;
    animation-delay: 1.8s, 1.8s;
}

.tech-icon-16 {
    bottom: 5%;
    right: 35%;
    color: #FF9900;
    animation-delay: 0.3s, 2.2s;
}

/* Mobile adjustments for tech icons */
@media (max-width: 575.98px) {
    .tech-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .tech-icon-1, .tech-icon-2 {
        top: 5%;
    }

    .tech-icon-3, .tech-icon-4 {
        top: 20%;
    }

    .tech-icon-5, .tech-icon-6, .tech-icon-7, .tech-icon-8 {
        top: 40%;
    }

    .tech-icon-9, .tech-icon-10, .tech-icon-11, .tech-icon-12, 
    .tech-icon-13, .tech-icon-14, .tech-icon-15, .tech-icon-16 {
        bottom: 5%;
    }

    .tech-icon-1, .tech-icon-3, .tech-icon-5, .tech-icon-7, .tech-icon-9, 
    .tech-icon-11, .tech-icon-13, .tech-icon-15 {
        left: 5%;
    }

    .tech-icon-2, .tech-icon-4, .tech-icon-6, .tech-icon-8, .tech-icon-10, 
    .tech-icon-12, .tech-icon-14, .tech-icon-16 {
        right: 5%;
    }
}

/* Tablet adjustments */
@media (max-width: 767.98px) {
    .tech-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .profile-wrapper {
        width: 240px !important;
        height: 240px !important;
    }
}

/* Expertise cards for mobile */
.expertise-card {
    height: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.expertise-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px var(--blue-shadow);
}

.expertise-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

@media (max-width: 575.98px) {
    .expertise-icon {
        font-size: 2rem;
    }

    .expertise-card p {
        font-size: 0.9rem;
    }
}

/* Section title styling */
.section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

@media (max-width: 575.98px) {
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

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

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

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
    }

    50% {
        box-shadow: 0 5px 25px rgba(0, 123, 255, 0.5);
    }

    100% {
        box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
    }
}

/* Section styling */
.section-title {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

    .section-title::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        height: 3px;
        width: 50px;
        background-color: var(--primary-color);
    }

.skills-overview .section-title::after,
.contact-cta .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Expertise cards */
.expertise-card {
    background-color: white;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.1);
}

    .expertise-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px var(--blue-shadow);
    }

.icon-wrapper {
    background-color: rgba(0, 123, 255, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.expertise-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Project cards */
.project-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.1) !important;
}

    .project-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px var(--blue-shadow) !important;
    }

    .project-card .card-img-top {
        height: 200px;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .project-card:hover .card-img-top {
        transform: scale(1.05);
    }

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.tech-stack {
    margin-top: 10px;
}

/* Contact CTA section */
.contact-cta {
    background-image: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* Technology Cloud */
.tech-cloud-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 120px;
}

    .tech-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px var(--blue-shadow);
    }

    .tech-item i {
        font-size: 2rem;
        margin-bottom: 8px;
        color: var(--primary-color);
    }

    .tech-item span {
        font-size: 0.9rem;
        font-weight: 500;
    }

/* Add a blue glow to buttons on hover */
.btn-primary:hover {
    box-shadow: 0 0 15px var(--blue-shadow);
}

/* Navigation bar enhancement */
.navbar {
    box-shadow: 0 2px 10px var(--blue-shadow);
}

/* Add subtle blue shadow to form controls on focus */
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Add blue shadow to modal and popovers */
.modal-content {
    box-shadow: 0 5px 30px var(--blue-shadow);
}

/* Add a subtle blue outline to images on hover */
img:hover {
    box-shadow: 0 0 15px var(--blue-shadow);
}

/* Enhance nav items with subtle transitions */
.nav-link {
    transition: color 0.3s, transform 0.3s;
    position: relative;
}

    .nav-link:hover {
        transform: translateY(-2px);
    }

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

    .nav-link:hover::after {
        width: 100%;
    }

/* Style scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #0056b3;
    }

/* Projects Filter Styles */
.filter-badge {
    cursor: pointer;
    transition: all 0.2s ease;
}

    .filter-badge:hover {
        transform: translateY(-2px);
    }

/* List View Project Items */
.list-group-item {
    transition: all 0.3s ease;
}

    .list-group-item:hover {
        transform: translateX(5px);
        box-shadow: 0 2px 8px var(--blue-shadow);
    }

    .list-group-item img {
        object-fit: cover;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .list-group-item:hover img {
        transform: scale(1.05);
        box-shadow: 0 5px 15px var(--blue-shadow);
    }

/* Pagination Styles */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

    .pagination .page-link:hover {
        background-color: rgba(0, 123, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 3px 10px var(--blue-shadow);
    }

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px var(--blue-shadow);
}

/* Project Cards in Grid View */
.project-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Highlight featured projects with subtle border */
.project-card.featured {
    border-color: var(--primary-color);
    border-width: 2px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

    .stat-card:hover {
        transform: scale(1.05);
    }

/* Tech Categories */
.tech-category {
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

/* Responsive adjustments */

/* Large tablets and small desktops (992px - 1199px) */
@media (max-width: 1199px) {
    .tech-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .profile-main {
        max-width: 300px;
    }

    .expertise-icon {
        font-size: 2.5rem;
    }

    .card-img-top {
        height: 220px;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .hero-section {
        padding: 3rem 0 !important;
    }

    .tech-icon {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }

    .profile-main {
        max-width: 280px;
        margin: 0 auto;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .h3 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    .expertise-icon {
        font-size: 2.2rem;
    }

    .expertise-card {
        margin-bottom: 1rem;
    }

    .card-img-top {
        height: 200px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Center content on tablets */
    .text-lg-start {
        text-align: center !important;
    }

    .contact-info {
        text-align: center !important;
    }

    /* Adjust tech icon positions for smaller circles */
    .tech-icon-1 {
        top: 5%;
        left: 5%;
    }

    .tech-icon-2 {
        top: 5%;
        right: 5%;
    }

    .tech-icon-3 {
        top: 20%;
        left: 0%;
    }

    .tech-icon-4 {
        top: 20%;
        right: 0%;
    }

    .tech-icon-5 {
        top: 40%;
        left: -3%;
    }

    .tech-icon-6 {
        top: 40%;
        right: -3%;
    }

    .tech-icon-7 {
        top: 60%;
        left: 0%;
    }

    .tech-icon-8 {
        top: 60%;
        right: 0%;
    }

    .tech-icon-9 {
        bottom: 10%;
        left: 10%;
    }

    .tech-icon-10 {
        bottom: 10%;
        right: 10%;
    }

    .tech-icon-11 {
        bottom: 25%;
        left: 12%;
    }

    .tech-icon-12 {
        bottom: 25%;
        right: 12%;
    }
}

/* Mobile landscape and small tablets (576px - 767px) */
@media (max-width: 767px) {
    .hero-section {
        padding: 2rem 0 !important;
    }

    .tech-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .profile-main {
        max-width: 220px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .h3 {
        font-size: 1.3rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .achievement-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .contact-info {
        font-size: 0.9rem;
    }

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

    .expertise-icon {
        font-size: 2rem;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    .stat-card p {
        font-size: 0.85rem;
    }

    .card-img-top {
        height: 180px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .tech-category {
        padding: 0.75rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.6em;
    }

    /* Reduce tech icon spread on mobile */
    .tech-icon-1 {
        top: 8%;
        left: 8%;
    }

    .tech-icon-2 {
        top: 8%;
        right: 8%;
    }

    .tech-icon-3 {
        top: 25%;
        left: 2%;
    }

    .tech-icon-4 {
        top: 25%;
        right: 2%;
    }

    .tech-icon-5 {
        top: 45%;
        left: -2%;
    }

    .tech-icon-6 {
        top: 45%;
        right: -2%;
    }

    .tech-icon-7 {
        top: 65%;
        left: 2%;
    }

    .tech-icon-8 {
        top: 65%;
        right: 2%;
    }

    .tech-icon-9 {
        bottom: 10%;
        left: 12%;
    }

    .tech-icon-10 {
        bottom: 10%;
        right: 12%;
    }

    .tech-icon-11 {
        bottom: 25%;
        left: 15%;
    }

    .tech-icon-12 {
        bottom: 25%;
        right: 15%;
    }
}

/* Mobile portrait (up to 575px) */
@media (max-width: 575px) {
    .hero-section {
        padding: 1.5rem 0 !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .tech-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .profile-main {
        max-width: 180px;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .h3 {
        font-size: 1.2rem;
    }

    .lead {
        font-size: 0.9rem;
    }

    .achievement-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

        .achievement-badge i {
            display: inline-block;
            margin-bottom: 0.25rem;
        }

    .contact-info {
        font-size: 0.85rem;
    }

    .expertise-card {
        padding: 1.25rem !important;
    }

        .expertise-card h3 {
            font-size: 1rem;
        }

        .expertise-card p {
            font-size: 0.85rem;
        }

    .expertise-icon {
        font-size: 1.8rem;
    }

    .stat-card {
        padding: 1rem !important;
    }

        .stat-card h3 {
            font-size: 1.75rem;
        }

        .stat-card p {
            font-size: 0.8rem;
        }

    .card-img-top {
        height: 160px;
    }

    .project-card .card-body {
        padding: 1rem;
    }

    .project-card h3 {
        font-size: 1rem;
    }

    .project-card .card-text {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .tech-category h4 {
        font-size: 0.9rem;
    }

    .tech-category {
        padding: 0.6rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.3em 0.5em;
        margin-bottom: 0.25rem;
    }

    .contact-cta h2 {
        font-size: 1.5rem;
    }

    .contact-cta .lead {
        font-size: 0.9rem;
    }

    .contact-cta .btn-lg {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Hide some tech icons on very small screens to reduce clutter */
    .tech-icon-11,
    .tech-icon-12 {
        display: none;
    }

    /* Adjust remaining icons */
    .tech-icon-1 {
        top: 10%;
        left: 10%;
    }

    .tech-icon-2 {
        top: 10%;
        right: 10%;
    }

    .tech-icon-3 {
        top: 30%;
        left: 5%;
    }

    .tech-icon-4 {
        top: 30%;
        right: 5%;
    }

    .tech-icon-5 {
        top: 50%;
        left: 0%;
    }

    .tech-icon-6 {
        top: 50%;
        right: 0%;
    }

    .tech-icon-7 {
        top: 70%;
        left: 5%;
    }

    .tech-icon-8 {
        top: 70%;
        right: 5%;
    }

    .tech-icon-9 {
        bottom: 10%;
        left: 15%;
    }

    .tech-icon-10 {
        bottom: 10%;
        right: 15%;
    }

    /* Stack buttons vertically on mobile */
    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

        .d-flex.gap-2 > *,
        .d-flex.gap-3 > * {
            width: 100%;
        }

    /* Make project overlay buttons stack */
    .project-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }

        .project-overlay .btn {
            width: auto;
            padding: 0.5rem 1rem;
            font-size: 0.85rem;
        }
}

/* Extra small devices (up to 375px) */
@media (max-width: 375px) {
    .display-4 {
        font-size: 1.5rem;
    }

    .profile-main {
        max-width: 150px;
    }

    .tech-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .expertise-card h3 {
        font-size: 0.95rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .card-img-top {
        height: 140px;
    }

    /* Further reduce tech icons on very small screens */
    .tech-icon-7,
    .tech-icon-8,
    .tech-icon-9,
    .tech-icon-10 {
        display: none;
    }
}

/* Print styles */
@media print {
    .tech-icon,
    .btn,
    .contact-cta {
        display: none;
    }

    .profile-main {
        max-width: 200px;
    }

    .card-img-top {
        height: auto;
    }
}
