/* ===== Global Base Styles ===== */
html {
        scroll-behavior: smooth;
}

body {
        font-family: 'Inter', 'Segoe UI', sans-serif;
        margin: 0 auto;
        background: linear-gradient(to bottom right, #eaf1fb, #f8f9fc);
        color: #2c3e50;
        padding: 40px 20px;
        max-width: 1000px;
        line-height: 1.7;
}

/* ===== Header ===== */
header {
        text-align: center;
        margin-bottom: 40px;
}

h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        color: #2d3a58;
}

h2 {
        font-size: 1.6rem;
        margin-top: 0;
        color: #2c3e50;
}

/* ===== Navigation ===== */
nav {
        margin-bottom: 40px;
        text-align: center;
}

        nav ul {
                list-style: none;
                display: none;
                flex-wrap: nowrap;
                justify-content: center;
                align-items: center;
                gap: 8px;
                padding: 0;
                margin: 0;
        }

                nav ul li a {
                        background-color: #004080;
                        color: white;
                        padding: 12px 18px;
                        border-radius: 6px;
                        font-weight: 600;
                        font-size: 1rem;
                        transition: all 0.3s ease;
                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                }

                        nav ul li a:hover {
                                background-color: #002d5a;
                                transform: translateY(-2px);
                                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
                        }

/* ===== Hamburger Menu ===== */
.hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        margin: 0 auto 20px;
        position: relative;
}

        .hamburger span {
                display: block;
                height: 3px;
                width: 100%;
                background-color: #004080;
                border-radius: 2px;
                transition: all 0.3s ease;
        }

        .hamburger.active span:nth-child(1) {
                transform: rotate(45deg) translate(8px, 8px);
        }

        .hamburger.active span:nth-child(2) {
                opacity: 0;
        }

        .hamburger.active span:nth-child(3) {
                transform: rotate(-45deg) translate(7px, -6px);
        }

        .hamburger.active {
                position: fixed;
                top: 40px;
                right: 20px;
                z-index: 1001;
        }

/* Universal hamburger menu navigation */
.nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 1000;
        gap: 20px !important;
        list-style: none;
        margin: 0;
        padding: 0;
}

.nav-menu.active {
        left: 0;
}

.nav-menu li {
        margin: 10px 0;
}

.nav-menu li a {
        font-size: 1.2rem;
        padding: 15px 25px;
        display: block;
        text-align: center;
        min-width: 200px;
        background-color: #004080;
        color: white;
        border-radius: 6px;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
}

.nav-menu li a:hover {
        background-color: #002d5a;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===== Profile Image ===== */
.pic-card {
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
}

        .pic-card img {
                width: 180px;
                height: 180px;
                object-fit: cover;
                border-radius: 50%;
                border: 5px solid white;
                box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

/* ===== Section Cards ===== */
section {
        background-color: white;
        border-radius: 12px;
        padding: 25px;
        margin-bottom: 30px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
}

        section:hover {
                transform: translateY(-2px);
                box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
        }

/* ===== Links ===== */
a {
        color: #0066cc;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.3s;
}

        a:hover {
                color: #004080;
                text-decoration: underline;
        }

/* ===== Projects Section ===== */
.project-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
}

.project-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
}

        .project-card:hover {
                transform: translateY(-4px);
                box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
        }

        .project-card h3 {
                font-size: 1.2rem;
                color: #1e3a8a;
                margin-bottom: 8px;
        }

        .project-card p {
                font-size: 0.95rem;
                color: #555;
        }

        .project-card img {
                width: 100%;
                border-radius: 8px;
                margin: 15px 0;
        }

.project-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
}

.project-tag {
        background-color: #e8f0fe;
        color: #1e3a8a;
        padding: 4px 10px;
        border-radius: 50px;
        font-size: 0.75rem;
        font-weight: 600;
}

/* ===== Footer ===== */
footer {
        text-align: center;
        color: #777;
        font-size: 0.9rem;
        margin-top: 60px;
}

/* ===== Enhanced Dark Mode Styling ===== */

.dark-mode {
        background: #121212;
        color: #e0e0e0;
}

        .dark-mode header {
                color: #e0e0e0;
        }

        .dark-mode h1,
        .dark-mode h2 {
                color: #bbdefb;
        }

        .dark-mode p,
        .dark-mode li {
                color: #cccccc;
        }

        .dark-mode nav {
                background-color: #1e1e1e;
        }

                .dark-mode nav ul li a {
                        background-color: #2c3e50;
                        color: #ffffff;
                        padding: 12px 18px;
                        border-radius: 6px;
                        font-weight: 600;
                        font-size: 1rem;
                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
                }

                        .dark-mode nav ul li a:hover {
                                background-color: #34495e;
                                transform: translateY(-2px);
                                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
                        }

                        .dark-mode nav ul li a:hover {
                                background-color: #3b4a6b;
                        }

        /* Dark mode hamburger menu */
        .dark-mode .hamburger span {
                background-color: #bbdefb;
        }

        .dark-mode .nav-menu {
                background-color: rgba(30, 30, 30, 0.98);
        }

        .dark-mode .nav-menu li a {
                background-color: #2c3e50;
                color: #ffffff;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .dark-mode .nav-menu li a:hover {
                background-color: #34495e;
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        .dark-mode section,
        .dark-mode .project-card {
                background-color: #1e1e1e;
                box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
        }

                .dark-mode .project-card h3 {
                        color: #82b1ff;
                }

                .dark-mode .project-card p {
                        color: #b0b0b0;
                }

        .dark-mode .project-tag {
                background-color: #2c3e5d;
                color: #a3c9ff;
        }

        .dark-mode a {
                color: #90caf9;
        }

                .dark-mode a:hover {
                        color: #bbdefb;
                }

        .dark-mode footer {
                color: #aaa;
        }

/* ===== Theme Toggle ===== */
.theme-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.8rem;
        margin: 0;
}

        .theme-toggle input {
                display: none;
        }

        .theme-toggle .slider {
                width: 36px;
                height: 20px;
                background-color: #ccc;
                border-radius: 20px;
                position: relative;
                cursor: pointer;
        }

                .theme-toggle .slider::before {
                        content: "";
                        position: absolute;
                        top: 2px;
                        left: 2px;
                        width: 16px;
                        height: 16px;
                        background-color: white;
                        border-radius: 50%;
                        transition: transform 0.3s;
                }

        .theme-toggle input:checked + .slider {
                background-color: #1e3a8a;
        }

                .theme-toggle input:checked + .slider::before {
                        transform: translateX(16px);
                }

/* ===== Collapsible Sections ===== */
.section-toggle {
        cursor: pointer;
        user-select: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        padding: 0;
        transition: color 0.3s ease;
}

.section-toggle:hover {
        color: #0066cc;
}

.toggle-icon {
        font-size: 0.8em;
        transition: transform 0.3s ease;
        font-family: 'Arial', sans-serif;
        font-weight: bold;
        line-height: 1;
        display: inline-block;
        min-width: 12px;
        text-align: center;
}

.section-content {
        max-height: none;
        overflow: visible;
        transition: max-height 0.5s ease, opacity 0.3s ease;
        opacity: 1;
        height: auto;
        min-height: auto;
}

.section-content.collapsed {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
}

/* Default state: arrows point right (collapsed) */
.toggle-icon {
        transform: rotate(0deg);
}

/* Expanded state: arrows point down */
.toggle-icon.expanded {
        transform: rotate(90deg);
}

/* Ensure collapsed arrows point right */
.toggle-icon.collapsed {
        transform: rotate(0deg);
}

/* ===== Job Section Styling ===== */
.job-section {
    background-color: #f8f9fc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #004080;
}

.dark-mode .job-section {
    background-color: #252525;
    border-left-color: #2c3e50;
}

.job-section h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #1e3a8a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dark-mode .job-section h3 {
    color: #82b1ff;
}

.job-section h3:hover {
    color: #004080;
}

.dark-mode .job-section h3:hover {
    color: #a3c9ff;
}

.job-section > p {
    margin: 5px 0 10px 0;
    font-style: italic;
    color: #666;
}

.dark-mode .job-section > p {
    color: #aaa;
}

.job-section .section-content.collapsed {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* Job title with logo styling */
.job-title-with-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #1e3a8a;
    cursor: pointer;
    justify-content: space-between;
}

.dark-mode .job-title-with-logo {
    color: #82b1ff;
}

.job-title-with-logo:hover {
    color: #004080;
}

.dark-mode .job-title-with-logo:hover {
    color: #a3c9ff;
}

.job-title-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.company-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: white;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.job-title-text {
    margin: 0;
    font-size: inherit;
    color: inherit;
    font-weight: bold;
}

/* ===== Animation ===== */
.fade-in {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.6s ease-out;
}

        .fade-in.visible {
                opacity: 1;
                transform: translateY(0);
        }

/* Skills Section Styling */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-category {
    background-color: #f8f9fc;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.dark-mode .skill-category {
    background-color: #252525;
}

.skill-category h3 {
    color: #1e3a8a;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.dark-mode .skill-category h3 {
    color: #82b1ff;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    background-color: #e8f0fe;
    color: #1e3a8a;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.dark-mode .skill-item {
    background-color: #2c3e5d;
    color: #a3c9ff;
}

/* ===== Certifications & Achievements Section ===== */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cert-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cert-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.cert-card h3 {
    color: #2c3e50;
    margin: 10px 0;
    font-size: 1.2rem;
}

.cert-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cert-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-status.completed {
    background-color: #d4edda;
    color: #155724;
}

.cert-status.studying {
    background-color: #fff3cd;
    color: #856404;
}

.achievements-section {
    margin-top: 30px;
}

.achievements-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fc;
    border-radius: 10px;
    border-left: 4px solid #004080;
}

.achievement-icon {
    font-size: 1.5rem;
    min-width: 30px;
}

.achievement-text strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.achievement-text p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Dark mode styles */
.dark-mode .cert-card {
    background-color: #1e1e1e;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.dark-mode .cert-card h3 {
    color: #82b1ff;
}

.dark-mode .cert-card p {
    color: #b0b0b0;
}

.dark-mode .cert-status.completed {
    background-color: #1e3a2e;
    color: #4caf50;
}

.dark-mode .cert-status.studying {
    background-color: #3a2e1e;
    color: #ffc107;
}

.dark-mode .achievements-section h3 {
    color: #82b1ff;
}

.dark-mode .achievement-item {
    background-color: #2c2c2c;
    border-left-color: #82b1ff;
}

.dark-mode .achievement-text strong {
    color: #82b1ff;
}

.dark-mode .achievement-text p {
    color: #b0b0b0;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
        h1 {
                font-size: 2rem;
        }

        /* Hide regular navigation buttons on mobile - show hamburger instead */
        nav ul {
                display: none !important;
        }

        .pic-card img {
                width: 130px;
                height: 130px;
        }

    .skills-container {
        grid-template-columns: 1fr;
    }
    
    /* Mobile-specific arrow fixes for consistent rendering */
    .toggle-icon {
        font-size: 1rem !important;
        font-family: 'Arial', 'Helvetica', sans-serif !important;
        font-weight: bold !important;
        min-width: 15px !important;
        text-align: center !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        line-height: 1 !important;
        display: inline-block !important;
    }
    
    /* Ensure arrows render consistently across mobile browsers */
    .section-toggle {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }
}

/* ===== Project Carousel Styling ===== */
.project-carousel {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-top: 20px;
    min-height: 600px;
}

.project-container {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 30px;
    flex: 1;
    padding: 0 10px;
    height: auto;
}

.project-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    flex-shrink: 0;
    height: auto;
    overflow: visible;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

    .project-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    }

    .project-card h3 {
        color: #2c3e50;
        margin-top: 0;
        margin-bottom: 15px;
    }

    .project-card p {
        color: #555;
        margin-bottom: 15px;
        line-height: 1.6;
    }

    .project-image-container {
        width: 100%;
        height: auto;
        border-radius: 8px;
        margin-bottom: 15px;
        border: 1px solid #e1e5e9;
        background-color: #f8f9fc;
    }

    .project-card img {
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
        margin: 0;
        background-color: #f8f9fc;
        display: block;
        cursor: pointer;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .project-card img:hover {
        transform: scale(1.02);
        opacity: 0.9;
    }

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tag {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.carousel-btn {
    background-color: #004080;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

    .carousel-btn:hover {
        background-color: #002d5a;
    }

    .carousel-btn:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

.prev-btn {
    margin-right: 15px;
}

.next-btn {
    margin-left: 15px;
}

.project-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .indicator.active {
        background-color: #004080;
    }

/* Project Category Layout */
.project-category {
    margin-bottom: 30px;
}

.project-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Category-specific carousel styling */
.project-carousel {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.project-container {
    flex: 1;
    overflow-x: hidden;
    scroll-behavior: smooth;
    display: flex;
    gap: 20px;
}

.project-container .project-card {
    min-width: 100%;
    flex-shrink: 0;
}

/* Carousel buttons for categories */
.carousel-btn {
    background-color: #004080;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background-color: #002d5a;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Category indicators */
.project-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #004080;
}

/* Dark mode support for categorized projects */
.dark-mode .project-card {
    background-color: #1e1e1e;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
}

.dark-mode .project-card h3,
.dark-mode .project-card h4 {
    color: #82b1ff;
}

.dark-mode .project-card p {
    color: #b0b0b0;
}

.dark-mode .project-tag {
    background-color: #2c3e5d;
    color: #a3c9ff;
}

.dark-mode .carousel-btn {
    background-color: #82b1ff;
    color: #1e1e1e;
}

.dark-mode .carousel-btn:hover {
    background-color: #a3c9ff;
}

.dark-mode .indicator.active {
    background-color: #82b1ff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-carousel {
        gap: 10px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* ===== Quick Stats Section ===== */
.quick-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fc 0%, #e8f0fe 100%);
    border-radius: 12px;
    border: 1px solid #e3f2fd;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #004080;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .quick-stats {
    background: linear-gradient(135deg, #2c2c2c 0%, #1e1e1e 100%);
    border: 1px solid #333;
}

.dark-mode .stat-number {
    color: #82b1ff;
}

.dark-mode .stat-label {
    color: #b0b0b0;
}

/* ===== Contact Section Styling ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.contact-info h3,
.contact-form h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.contact-item i {
    width: 20px;
    height: 20px;
    color: #004080;
}

.contact-item a {
    color: #004080;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #002d5a;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #004080;
}

.contact-btn {
    background-color: #004080;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.contact-btn:hover {
    background-color: #002d5a;
}

/* Dark mode contact styling */
.dark-mode .contact-info h3,
.dark-mode .contact-form h3 {
    color: #82b1ff;
}

.dark-mode .contact-item i {
    color: #82b1ff;
}

.dark-mode .contact-item a {
    color: #82b1ff;
}

.dark-mode .contact-item a:hover {
    color: #a3c9ff;
}

.dark-mode .form-group label {
    color: #b0b0b0;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    background-color: #1e1e1e;
    border-color: #333;
    color: #fff;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus {
    border-color: #82b1ff;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dark-mode .flash-success {
    background-color: #1e3a2e;
    color: #4caf50;
    border-color: #2e5233;
}

.dark-mode .flash-error {
    background-color: #3a1e1e;
    color: #f44336;
    border-color: #522e2e;
}

/* ===== Image Modal Styling ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ccc;
}

#modalCaption {
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    max-width: 80%;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .quick-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Improved mobile project section */
    .project-carousel {
        min-height: auto;
        align-items: stretch;
    }
    
    .project-card {
        padding: 20px;
        min-width: calc(100% - 10px);
        max-width: calc(100% - 10px);
    }
    
    .project-card h3 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .project-card p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    .project-image-container {
        height: 250px;
        margin-bottom: 12px;
    }
    
    .project-card img {
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }
    
    .project-tags {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .project-tag {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .prev-btn {
        margin-right: 10px;
    }
    
    .next-btn {
        margin-left: 10px;
    }
    
    .project-indicators {
        margin-top: 15px;
        gap: 6px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .modal-content {
        padding: 10px;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    #modalCaption {
        font-size: 1rem;
        max-width: 95%;
    }
}

/* Additional mobile improvements for very small screens */
@media (max-width: 480px) {
    .project-container {
        padding: 0 5px;
    }
    
    .project-card {
        padding: 15px;
        margin: 0 2px;
    }
    
    .project-card h3 {
        font-size: 1.3rem;
        font-weight: 700;
    }
    
    .project-card p {
        font-size: 0.95rem;
        line-height: 1.5;
        color: #444;
    }
    
    .dark-mode .project-card p {
        color: #c0c0c0;
    }
    
    .project-image-container {
        height: 200px;
        border: 2px solid #e1e5e9;
    }
    
    .dark-mode .project-image-container {
        border-color: #333;
    }
    
    .project-card img {
        object-fit: cover;
        object-position: center;
    }
    
    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .prev-btn {
        margin-right: 8px;
    }
    
    .next-btn {
        margin-left: 8px;
    }
}
