/* ============================================================
   1. GLOBAL SETTINGS & BACKGROUND
   ============================================================ */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.tooltip {
    z-index: 100000 !important; /* Sit on top of your custom modal */
}

body {
    /* Deep Black Base */
    background-color: #0a0a0a !important;
    
    /* Fixed SVG Pattern */
    background-image: url('../images/background-image-doodle.png');
    background-attachment: fixed;
    background-size: 500px auto;
    background-repeat: round;
    
    /* Gentle floating animation */
    animation: bgScroll 60s linear infinite;
}

/* FIX: Prevent Black Empty Space on Mobile Scroll */
@media (max-width: 991px) {
    body {
        background-attachment: scroll !important;
        background-size: 500px auto !important; 
    }
}

@keyframes bgScroll {
    0% { background-position: 0 0; }
    100% { background-position: 300px 300px; }
}

/* Section Utilities */
section, .ftco-section {
    scroll-margin-top: 80px !important;
    min-height: 100vh !important; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    padding-top: 0px !important; 
    padding-bottom: 60px !important;
    box-sizing: border-box; 
}

/* Text Utilities */
.underline {
    margin-top: 10px;
    margin-bottom: 10px;
}
.pad2-margin2 { padding: 2px; margin: 2px; }
.space-top { margin-top: 20px; }

/* ============================================================
   2. NAVBAR & NAVIGATION
   ============================================================ */
nav#ftco-navbar,
.ftco_navbar.ftco-navbar-light {
    background-color: #000000 !important; 
    box-shadow: 0 0 20px rgba(0,0,0, 0.9);
    color: #fff !important;
}

.navbar-brand {
    flex: 0 0 auto;
    margin-right: 20px;
    background-color: #000;
    z-index: 20;
    position: relative;
    color: #fff !important;
}

.dropdown-menu {
    background-color: #000000 !important;
    border: 1px solid #333;
    margin-top: 0;
}
.dropdown-item {
    color: #ffffff !important;
    background-color: transparent !important;
    transition: color 0.2s ease;
}
.dropdown-item:hover {
    color: #ffbd39 !important;
}

/* --- DESKTOP MENU (Screens > 991px) --- */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important; 
        flex-basis: auto;
        flex-grow: 1;
        overflow: hidden; 
    }
    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        width: 100%;
        align-items: center;
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    .nav-item {
        white-space: nowrap !important;
        flex: 0 0 auto;
        padding: 0 5px;
    }
}

/* --- MOBILE MENU (Screens <= 991px) --- */
@media (max-width: 991px) {
    .navbar {
        position: relative; 
        z-index: 9999 !important;
    }
    .navbar-toggler { display: block !important; }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #000000 !important;
        border-bottom: 1px solid #333;
        box-shadow: 0 10px 30px rgba(0,0,0, 0.9);
        padding: 20px;
        z-index: 9999;
        
        /* Scrollable Menu Logic */
        max-height: 75vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .navbar-nav {
        display: flex;
        flex-direction: column !important; 
        text-align: center;
        overflow-x: visible !important; 
    }
    .nav-item {
        margin-bottom: 15px;
        white-space: normal !important; 
    }
}
.navbar-nav::-webkit-scrollbar { display: none; }


/* ============================================================
   3. HERO SECTION
   ============================================================ */
.hero-container {
    height: 100vh;
    min-height: 700px;
    position: relative;
}
.hero-bg-image {
    position: absolute;
    top: 60px;
    right: 0;
    width: 70%;
    height: calc(100% - 60px);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    z-index: 0;
}
.hero-text-row {
    height: 100vh;
    min-height: 700px;
    padding-bottom: 0;
}
.hero-subheading { display: block; margin-top: 60px; }

/* Typing Animation */
#typing-animation {
    position: relative;
    font-size: 30px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
}

/* Scroll Down Button */
.scroll-down-btn {
    position: absolute;
    bottom: 150px;
    right: 40px;
    z-index: 10;
    opacity: 0.8;
}
.mouse-scroll {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid #fff;
    border-radius: 20px;
    margin: 0 auto 10px;
}
.mouse-wheel {
    display: block;
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    margin: 10px auto;
    animation: scrollWheel 1.5s infinite;
}
.arrow-down {
    display: block;
    width: 20px;
    height: 20px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-10px) rotate(45deg); }
    60% { transform: translateY(-5px) rotate(45deg); }
}
@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}


/* ============================================================
   4. GLOBAL CARD STYLES & LAYOUT
   ============================================================ */

/* Profile Image */
.profile-img-fix {
    width: 200px !important;
    height: 200px !important;
    min-width: 200px !important;
    min-height: 200px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: top center !important; 
    border-radius: 50% !important;
    border: 4px solid #333 !important;
    box-shadow: 0 10px 30px rgba(0,0,0, 0.5);
    display: block;
    margin: 0 auto 20px auto;
}

/* Main Section Card (Gray Box) */
.section-card {
    background-color: #1e1e1e !important;
    border: 1px solid #333 !important;
    box-shadow: 0 10px 30px rgba(0,0,0, 0.5) !important;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}
@media (max-width: 768px) {
    .section-card { padding: 20px; }
}

/* Vertical Card Box (Shared by Projects, Certs, Coding) */
.vertical-card-box {
    width: 100% !important; 
    background: #ffffff1a !important; 
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    display: flex !important;
    flex-direction: column !important;
    height: calc(100% - 30px) !important;
    margin-left: 15px !important;
    margin-right: 15px !important;
    margin-bottom: 30px;
    transition: 0.3s;
    text-align: left !important;
    align-items: flex-start !important;
}

/* Shared Icon Container */
.vertical-card-icon-container {
    width: 100% !important;
    max-width: 300px !important;
    height: 140px !important;
    background: #fff !important;
    border-radius: 10px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 20px auto !important;
    padding: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    overflow: hidden !important;
    position: relative !important;
}

.vertical-card-img-inside {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 80% !important;
    height: 80% !important;
    object-fit: contain !important;
}

.vertical-card-title { 
    font-size: 22px; 
    font-weight: 700; 
    color: #fff; 
    margin-bottom: 15px;
    width: 100% !important;
}

.vertical-card-btn {
    margin-top: auto !important;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   5. UNIFIED SLIDER LOGIC (Projects, Certs, Blogs, Coding)
   ============================================================ */

/* ============================================================
   5. UNIFIED SLIDER LOGIC (Certs, Blogs, Coding)
   ============================================================ */

/* Slider Containers */
#certifications-container,
#custom-blog-container,
#coding-profiles-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 !important;
    padding-bottom: 10px;
    width: 100%;
}
#certifications-container::-webkit-scrollbar,
#custom-blog-container::-webkit-scrollbar,
#coding-profiles-container::-webkit-scrollbar { 
    display: none; 
}

/* Responsive Card Sizing */
@media (max-width: 767px) {
    #certifications-container .col-md-4,
    #custom-blog-container .col-md-4,
    #coding-profiles-container .col-md-4,
    .project-slider-container .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        scroll-snap-align: center;
        padding: 0 10px;
    }
}

@media (min-width: 768px) {
    #certifications-container .col-md-4,
    #custom-blog-container .col-md-4,
    #coding-profiles-container .col-md-4,
    .project-slider-container .col-md-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        scroll-snap-align: start;
        padding: 0 15px;
    }
}

/* Control Bars */
.cert-mobile-controls,
.blog-slider-controls,
.coding-profiles-controls {
    display: flex; 
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    margin-top: auto;
}

/* 4. Arrows & Numbers */
.slider-arrow-static {
    background: transparent;
    border: 2px solid #ffbd39;
    color: #ffbd39;
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.slider-arrow-static:active, .slider-arrow-static:hover {
    background: #ffbd39;
    color: #000;
}
.pagination-window {
    width: 160px;              /* The "viewport" for dots */
    overflow: hidden;         /* Clips dots so the track can slide behind them */
    position: relative;
    display: flex;
    align-items: center;
    /* margin: 0 auto; */
    height: 45px;
}
.pagination-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    position: relative;
    height: 50px;
}
.slider-number {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    line-height: 28px;
    text-align: center;
    margin: 0 4px;
    border: 1px solid #444;
    border-radius: 50%;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-number.active {
    background-color: #ffbd39;
    color: #000;
    border-color: #ffbd39;
    font-weight: bold;
    transform: scale(1.1);
}


/* Hide scrollbar for Chrome/Safari */
.nav-pills::-webkit-scrollbar {
    display: none;
}


/* ============================================================
   PROJECT SECTION: SYMMETRICAL SLIDER & PAGINATION
   ============================================================ */

 #project-section .img-relative-container {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 10px;
    background: #222; /* Dark placeholder while loading */
}

#project-section .block-20 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    /* Use 'contain' if your images are logos with whitespace */
    /* Use 'cover' if your images are full screenshots */
    background-size: contain !important; 
    background-repeat: no-repeat;
    background-position: center center !important;
}



/* ============================================================
   FIX: BOTTOM-LEFT ICON SUPERIMPOSITION
   ============================================================ */

/* Forces the entire control block (Arrow <-> Window <-> Arrow) to the center */
.project-slider-controls {
    display: flex;
    justify-content: center !important; /* KEY FIX: Centers children horizontally */
    align-items: center !important;     /* Centers children vertically */
    width: 100%;
    margin-top: 30px;
}

/* The parent container MUST be relative to act as the anchor */
#project-section .img-relative-container {
    position: relative !important;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    padding-top: 56.25%; /* Maintains 16:9 Aspect Ratio to prevent distortion */
}

/* The image layer */
#project-section .block-20 {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    background-size: cover;
    background-position: center center;
}

/* The Icon: Anchor to the bottom-left corner of the image */
#project-section .enlarge-icon {
    position: absolute !important;
    
    /* 1. RESET hardcoded values */
    top: auto !important;
    right: auto !important;
    
    /* 2. ANCHOR to bottom-left */
    bottom: 12px !important;
    left: 12px !important;
    
    z-index: 20 !important; /* Above the zoom-effect image */
    
    /* Styling */
    color: #ffbd39 !important;
    background: rgba(0, 0, 0, 0.6); 
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#project-section .enlarge-icon:hover {
    background: #ffbd39;
    color: #000 !important;
    transform: scale(1.15);
}
.project-slider-container {
    display: flex !important;
    flex-wrap: nowrap !important; /* Prevents cards from wrapping to new lines */
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 40px !important; /* Extra space to show the full button/border */
    width: 100%;
}
.project-slider-container::-webkit-scrollbar { display: none; }

/* 2. The Card: Direct child of the slider */
#project-section .vertical-card-box {
    flex: 0 0 auto;               /* Prevents the card from shrinking */
    background: #ffffff1a !important; 
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;       /* FIX: Allow natural height to prevent clipping */
    min-height: 100%;
    transition: 0.3s;
    text-align: left !important;
    align-items: flex-start !important;
}

/* 3. Width Controls: Specific to mobile and desktop */
@media (max-width: 767px) {
    #project-section .vertical-card-box {
        /* Mobile: Centered card with 15px peeking margins on sides */
        width: calc(100% - 30px) !important; 
        margin: 0 15px 20px 15px !important;
        scroll-snap-align: center;
    }
    #project-section .enlarge-icon {
        width: 28px !important;
        height: 28px !important;
    }
}

@media (min-width: 768px) {
    #project-section .vertical-card-box {
        /* Desktop: 3 cards visible, each taking 33% of the row */
        width: calc(33.33% - 20px) !important; 
        margin: 0 10px 20px 10px !important;
        scroll-snap-align: start;
    }
}

#project-section .col-md-4 {
    display: flex !important;
    align-items: stretch;
    padding: 0 10px !important;
    margin-bottom: 30px;
}

.project-slider-container::-webkit-scrollbar { display: none; }

/* B. The Navigation Tabs (Centered & Scrollable) */
#project-tabs-list.nav-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important; 
    scrollbar-width: none;
    width: 100% !important;
    position: relative;
    gap: 10px;
    padding-bottom: 5px;
}
#project-tabs-list::-webkit-scrollbar { display: none; }

/* B. The Project Card (Fixes the "Narrow" look) */
#project-section .col-md-4 {
    display: flex !important;
    align-items: stretch;     /* Stretches card to match the tallest in row */
    padding: 0 10px !important;
    margin-bottom: 30px;
}

/* B. The Card Box: Fixes "narrow" look and aligns internal items */
/* #project-section .vertical-card-box {
    width: 100% !important; 
    background: #ffffff1a !important; 
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    display: flex !important;
    flex-direction: column !important;
    height: calc(100% - 30px) !important;
    margin-left: 15px !important;
    margin-right: 15px !important;
    margin-bottom: 30px;
    transition: 0.3s;
    text-align: left !important;
    align-items: flex-start !important;
} */

@media (min-width: 768px) {
    #project-section .project-slider-container .col-md-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        padding: 0 10px !important; /* Re-add spacing between cards on desktop */
    }

    #project-section .vertical-card-box {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important; /* Stretches to fill the 33% column */
    }
}


/* C. Content Syncing: Prepares titles/desc for alignment */
.sync-title { margin-bottom: 12px; display: block; }
.sync-desc { margin-bottom: 15px; display: block; }

/* D. Pagination: Centering Logic Styles */
#project-section .pagination-window {
    width: 160px;              /* The "viewport" for dots */
    overflow: hidden;         /* Clips dots so the track can slide behind them */
    position: relative;
    display: flex;
    align-items: center;
    height: 45px;
    margin: 0 10px !important;
}

#project-section .pagination-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
    overflow: visible;        /* Track itself should NOT have a scrollbar */
    width: max-content;       /* Expands to hold all numbered dots */
    gap: 8px;
    padding: 10px 0 !important;
}

/* Active Dot styling */
#project-section .slider-number.active {
    background-color: #ffbd39 !important;
    color: #000 !important;
    border-color: #ffbd39 !important;
    transform: scale(1.1);
}


/* D. Project Numbered Dots */
#project-section .slider-number {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    border: 1px solid #444;
    border-radius: 50%;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}


/* =========================================
   PROJECT MODAL DESIGN
   ========================================= */

/* 1. The Main Card */
.project-modal-card {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    overflow: hidden;
    position: relative;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}

.project-modal-header {
    background: #1e1e1e; /* Matches card background */
    padding: 10px 15px;  /* Spacing around button */
    display: flex;
    justify-content: flex-start; /* Pushes button to the right */
    border-bottom: 2px solid #333; /* Optional: Separator line */

    flex-shrink: 0;
    z-index: 10;
}

/* 3. The Body (The part that scrolls) */
.modal-body {
    overflow-y: auto !important; /* Enables scrollbar INSIDE the card */
    flex-grow: 1;                /* Fills remaining space */
    
    /* Optional: Custom scrollbar styling for elegance */
    scrollbar-width: thin;
    scrollbar-color: #555 #1e1e1e;
}

/* Chrome/Safari Scrollbar Styling */
.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-track {
    background: #1e1e1e;
}
.modal-body::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}
/* 2. Floating Close Button (The Fix) */
.project-close-btn {
    /* position: absolute !important;
    right: 15px;
    top: 15px;
    z-index: 1050; */
    
    width: 35px;
    height: 35px;
    border-radius: 50%;
    
    /* Dark semi-transparent background makes it visible on ANY image */
    background-color: rgba(0, 0, 0, 0.6) !important; 
    border: 1px solid rgba(255,255,255,0.2) !important;
    
    color: #fff !important;
    opacity: 1 !important;
    padding: 0 !important;
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none !important;
}

.project-close-btn:hover {
    background-color: #ffbd39 !important; /* Brand Yellow on hover */
    color: #000 !important;
    transform: scale(1.1);
}

.project-close-btn span {
    font-size: 1.5rem;
    line-height: 1;
    padding-bottom: 2px; /* Visual center adjustment */
}

/* 3. Banner Image Sizing */
.project-banner-container {
    height: 350px;       /* Fixed height so modals are consistent */
    width: 100%;
    background: #000;    /* Black background while loading */
    position: relative;
}

.project-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;    /* KEY FIX: Prevents stretching/distortion */
    object-position: center;
    display: block;
}

/* 4. Content Area */
.project-content-wrapper {
    padding: 30px;
}

.project-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem !important; /* Scaled down from 2rem */
    margin-bottom: 15px;
}

.project-badges-container {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Adds space between badges */
}

/* 5. Description Text */
.project-desc-container p {
    color: rgba(255, 255, 255, 0.7); /* Soft white */
    font-size: 0.95rem !important;   /* Standard reading size */
    line-height: 1.7;
    margin-bottom: 30px;
}


/* 6. Buttons */
.project-action-btn {
    margin-top: auto !important;
    width: 100%;                  /* Forces button to fill its column */
    
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    border-radius: 30px !important; /* Pill Shape */
    border-width: 2px !important;   /* Slightly thicker border */
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.3s ease;      /* Smooth hover animation */
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); /* Subtle shadow depth */
}

/* 2. Hover Effect (Lifts up slightly) */
.project-action-btn:hover {
    color: #000000 !important;
    background-color: #ffbd39 !important;
    transform: translateY(-3px);
    text-decoration: none;
}


/* 2. Hide Scrollbar (But keep scrolling functional) */
.modal {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.modal::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Optional: Ensure the modal body itself doesn't generate a double scrollbar */
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* --- SPECIFIC COLORS --- */

/* A. Visit Site (Yellow Button) */
#modal-live-link, .btn-warning.project-action-btn {
    background-color: transparent;
    border-color: #ffbd39 !important;
    color: #ffbd39 !important; /* Black text for readability */
}

#modal-live-link:hover, .btn-outline-light.project-action-btn:hover {
    background-color: #ffbd39 !important;
    border-color: #ffbd39 !important;
    color: #000 !important; /* Black text for readability */
}

/* B. Source Code (White Outline Button) */
#modal-repo-link, .btn-outline-light.project-action-btn {
   background-color: transparent;
    border-color: #ffbd39 !important;
    color: #ffbd39 !important; /* Black text for readability */
}
/* Hover State for Source Code */
#modal-repo-link:hover, .btn-outline-light.project-action-btn:hover {
    background-color: #ffbd39 !important;
    border-color: #ffbd39 !important;
    color: #000 !important; /* Black text for readability */
}

/* C. Watch Demo (Red Button) */
#modal-demo-link, .btn-outline-light.project-action-btn {
    background-color: transparent !important;
    border-color: #ffbd39 !important;
    color: #ffbd39 !important; /* Black text for readability */
}
#modal-demo-link:hover, .btn-outline-light.project-action-btn:hover {
    background-color: #ffbd39 !important;
    border-color: #ffbd39 !important;
    color: #000 !important; /* Black text for readability */
}

@media (max-width: 768px) {
    /* 1. Force Dialog to expand */
    #projectDetailModal .modal-dialog {
        max-width: 80% !important;  /* Takes 95% of screen width */
        width: 75% !important;      /* Ensures it doesn't shrink */
        margin: 10px auto !important; /* Small even margin on all sides */
    }

    /* 2. Optional: Adjust Banner Height for Mobile */
    /* Keeps the image looking good on smaller screens */
    #projectDetailModal .project-banner-container {
        height: 250px !important; /* Slightly shorter than desktop (350px) */
    }

    /* 3. Ensure Content Padding isn't too huge on mobile */
    #projectDetailModal .project-content-wrapper {
        padding: 20px !important;
    }
}


.project-back-btn {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    
    /* Typography */
    color: rgba(255, 255, 255, 0.6) !important; /* Muted White */
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Flex alignment for the arrow */
    display: flex;
    align-items: center;
    gap: 8px; /* Space between arrow and text */
    
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
}

.project-back-btn:hover {
    color: #ffbd39 !important;    /* Brand Yellow */
    transform: translateX(-5px);  /* Subtle slide-left animation */
    text-decoration: none;
}

/* =========================================
   FIX: BUTTON SPACING (Direct Child Selector)
   ========================================= */

/* 1. Layout Container */
.project-content-wrapper .row {
    display: flex;       /* Enables Flexbox */
    flex-wrap: wrap;
    margin-right: -10px !important;
    margin-left: -10px !important;
}

/* 2. Target the divs holding the buttons */
/* We use '> div' to select the immediate children (the ones missing col classes) */
.project-content-wrapper .row > div {
    flex-grow: 0 !important;
    flex-basis: auto !important;
    padding-right: 10px !important; /* Gap on right */
    padding-left: 10px !important;  /* Gap on left */
    min-width: 150px;    /* Prevents them from getting too squished on tiny screens */
}

@media (max-width: 768px) {
    /* 1. Make the video area larger */
    #modal-video-wrapper {
        /* Force a minimum height so it's not tiny */
        min-height: 250px !important; 
        
        /* Optional: Tweak margins to give it breathing room */
        margin-bottom: 1rem !important;
    }
    
    /* 2. Ensure the iframe fills that new height */
    #modal-video-iframe {
        height: 100% !important;
    }
}

/* ============================================================
   6. SECTION: RESUME (EDUCATION & EXPERIENCE)
   ============================================================ */
.resume-logo-link {
    margin-right: 25px;
    min-width: 170px;
    flex-shrink: 0; 
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.resume-logo-img {
    width: 140px;
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.resume-header-text-container {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.resume-edu-header-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}
.resume-company-title { font-size: 26px; font-weight: 700; margin-bottom: 0; }
.resume-location { font-size: 16px; color: #a0a0a0; margin-bottom: 5px; }
.resume-date { color: #ffbd39; font-weight: 600; }
.resume-desc-block, .resume-edu-coursework {
    border-left: 3px solid #ffbd39; padding-left: 15px; margin-top: 1rem;
}

/* --- DATE FIXES (Mobile & Desktop) --- */

/* MOBILE: Force Date on One Line */
@media (max-width: 767px) {
    .resume-date {
        white-space: nowrap !important;
        font-size: 13px !important; 
        margin-top: 2px;
    }
}

/* DESKTOP: Override Style.css & Prevent Wrapping */
@media (min-width: 992px) {
    #experience-container .resume-date,
    #education-container .resume-date {
        font-size: 16px !important;       /* Override the 26px from style.css */
        font-weight: 600 !important; 
        white-space: nowrap !important;
        width: auto !important;
        min-width: fit-content !important;
        display: inline-block !important;
        margin-left: 15px !important;
    }
}

/* =========================================
   MOBILE FIX: EVERYTHING CENTERED (Experience & Education)
   ========================================= */
@media (max-width: 767px) {

    /* 1. Header Containers: Stack Column, CENTER Align */
    #experience-container .resume-header-text-container,
    #education-container .resume-edu-header-text,
    #experience-container .resume-card-header, 
    #education-container .education-card-header {
        flex-direction: column !important;
        align-items: center !important; /* CHANGED: Center alignment */
        text-align: center !important;  /* CHANGED: Center text */
        width: 100% !important;
    }

    /* 2. LOGO: Ensure it stays centered */
    #experience-container .resume-logo-link,
    #education-container .resume-logo-link {
        align-self: center !important; 
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 15px !important; 
    }

    /* 3. INNER FLEX CONTAINERS (For Education Degree/GPA) */
    #education-container .resume-edu-header-text .d-flex {
        flex-direction: column !important;
        align-items: center !important;     /* CHANGED: Center */
        justify-content: center !important; /* CHANGED: Center */
        text-align: center !important;      /* CHANGED: Center */
        width: 100% !important;
    }

    /* 4. Style the Date (Centered) */
    #experience-container .resume-date,
    #education-container .resume-date {
        display: block !important;
        margin-top: 5px !important;
        margin-bottom: 10px !important;
        
        /* CHANGED: Auto margins ensure centering */
        margin-left: auto !important;
        margin-right: auto !important;
        
        font-size: 14px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        text-align: center !important; /* CHANGED: Center text */
    }

    /* 5. Title & Location (Centered) */
    #experience-container .resume-company-title,
    #education-container .resume-company-title {
        font-size: 20px !important;
        margin-bottom: 2px !important;
        text-align: center !important; /* CHANGED */
    }
    #experience-container .resume-location,
    #education-container .resume-location {
        margin-bottom: 10px !important;
        font-size: 13px !important;
        text-align: center !important; /* CHANGED */
    }

    /* 6. Degree & GPA Text (Centered) */
    #education-container .position,
    #education-container .resume-edu-header-text span {
        display: block !important;
        text-align: center !important; /* CHANGED */
        width: 100% !important;
        margin-bottom: 5px !important;
    }
}

/* =========================================
   FIX: CENTER ALIGN EDUCATION (MOBILE)
   ========================================= */
@media (max-width: 767px) {
    
    /* 1. Parent Container: Stack & Center */
    .role-date-row {
        display: flex !important;
        flex-direction: column !important;   
        align-items: center !important;     /* Horizontal Center */
        width: 100% !important;
    }

    /* 2. Degree Text: Center */
    .role-text {
        width: 100% !important;
        text-align: center !important;      /* Force Text Center */
        margin-right: 0 !important;
        margin-bottom: 5px !important;
        
        font-size: 14px !important;
        line-height: 1.4 !important;
        font-weight: 700 !important;
        white-space: normal !important; 
    }

    /* 3. Date & CGPA Group: Center */
    .date-cgpa-group {
        text-align: center !important;      /* Force Group Center */
        margin-left: 0 !important;          /* Remove Desktop Spacing */
        width: 100% !important;
        margin-top: 2px !important;
    }

    /* 4. Inner Spans (Date & CGPA) */
    .date-text, .cgpa-text {
        text-align: center !important;      /* Force Inner Text Center */
        display: block !important;
        width: 100% !important;
    }
    
    /* 5. Date Specifics */
    .date-text {
        font-size: 13px !important;
        color: #ffbd39 !important;
        font-weight: 600 !important;
    }
}

/* ============================================================
   7. SECTION: PROJECTS & TABS
   ============================================================ */

/* Project Tab Navigation */
.custom-tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: auto;
}
.custom-tab-nav .nav-link {
    color: #ffffff;          
    background: #1a1a1a;     
    border: 1px solid #333;
    border-radius: 30px;     
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.custom-tab-nav .nav-link:hover {
    color: #ffbd39;          
    border-color: #ffbd39;
    background: #000;
}
.custom-tab-nav .nav-link.active {
    opacity: 1 !important;
    background-color: #ffbd39 !important; 
    color: #000000 !important;            
    border-color: #ffbd39 !important;
    box-shadow: 0 5px 15px rgba(255, 189, 57, 0.3); 
}

/* Mobile Tabs */
@media (max-width: 768px) {
    .custom-tab-nav {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        gap: 10px;
        padding-bottom: 5px;
        margin-left: -15px; 
        margin-right: -15px;
        padding-left: 20px; 
        padding-right: 20px;
        scrollbar-width: none; 
    }
    .custom-tab-nav::-webkit-scrollbar { display: none; }
    .custom-tab-nav .nav-item { flex: 0 0 auto; }
}


/* ============================================================
   8. SECTION: BLOGS
   ============================================================ */
#blog-container .vertical-card-title {
    text-align: left !important;
    width: 100% !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    margin-bottom: 5px !important;
    min-height: 3.2em !important; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#blog-container .blog-date {
    text-align: left !important;
    color: #ffbd39 !important;
    font-size: 0.85rem !important;
    display: block !important;
    margin-bottom: 15px !important;
    font-weight: 600;
}
#blog-container p {
    text-align: left !important;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8em; 
}

/* Pagination Buttons (if used manually) */
.pag-btn {
    background: transparent;
    border: 1px solid #ffbd39;
    color: #ffbd39;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}
.pag-btn.active {
    background: #ffbd39;
    color: #000;
    font-weight: bold;
}

/* ============================================================
   9. SECTION: CERTIFICATIONS & CODING PROFILES
   ============================================================ */
/* Centering overrides for these sections specifically */
#certifications-container .vertical-card-box,
#coding-profiles-container .vertical-card-box {
    align-items: center !important; 
    text-align: center !important;
}
#certifications-container .vertical-card-icon-container,
#coding-profiles-container .vertical-card-icon-container {
    margin-left: auto !important;
    margin-right: auto !important;
}


/* ============================================================
   10. SECTION: SKILLS
   ============================================================ */
.skills-marquee {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
}
.skills-track {
    display: flex;
    width: max-content;
    animation: scroll 25s linear infinite;
}
.skills-track:hover { animation-play-state: paused; }
@keyframes scroll {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

#skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}
.skill-item {
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 120px;
    flex-shrink: 0;
    margin: 0 15px;
}
.skill-item:hover { transform: translateY(-5px) scale(1.1); }
.skill-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}


/* ============================================================
   11. SECTION: CONTACT
   ============================================================ */
#contact-section .text-card {
    max-width: 100% !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    position: relative;
    background: #ffffff1a;
    border-radius: 12px;
    border: 1px solid #333;
    padding: 10px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0, 0.4);
}
#contact-section .text-white-50 p {
    max-width: 100% !important;
    word-break: break-all !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    #contact-section .text-card {
        text-align: left !important;
        padding: 20px !important;
    }
    #contact-section .subheading,
    #contact-section h2,
    #contact-section p {
        text-align: left !important;
    }
    #contact-section .d-flex.justify-content-center {
        justify-content: flex-start !important;
        flex-direction: column;
    }
    #contact-section .btn {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
        width: 100%;
    }
    #contact-section .text-white-50 p {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        font-size: 14px !important;
    }
    #contact-section .icon-envelope, 
    #contact-section .icon-phone {
        font-size: 14px !important;
        margin-right: 8px !important;
    }
}


/* ============================================================
   12. COMPONENTS (Modals, Tables, Inversion)
   ============================================================ */
#tech-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}
#tech-table td {
    vertical-align: top !important;
    padding-bottom: 15px;
    text-align: left !important;
}
#tech-table td:first-child {
    width: 30%;
    font-weight: 700;
    color: #ffbd39;
    white-space: nowrap;
}
#tech-table td:last-child {
    padding-left: 20px;
    color: rgba(255,255,255, 0.8);
}
@media (max-width: 767px) {
    #tech-table td:first-child {
        white-space: normal !important; 
        width: 35% !important;
    }
}

/* Image Inversion (Dark Mode Icons) */
img[alt="Apache Kafka"], 
img[alt="Kafka"],
img[alt="Flask"], 
img[alt="Express.js"],
img[alt="GitHub"] {
    filter: invert(1) brightness(100);
}

/* Modals */
#profileModal .modal-content {
    max-width: 50% !important;
    margin: 1.75rem auto; /* Keeps it centered */
}

.modal-content-transparent { background: transparent !important; border: none !important; }

.modal-close-custom {
    position: absolute !important;
    right: 0;
    top: -40px;
    z-index: 1050;
    
    width: 35px;
    height: 35px;
    border-radius: 50%;
    
    /* Dark semi-transparent background makes it visible on ANY image */
    background-color: rgba(0, 0, 0, 0.6) !important; 
    border: 1px solid rgba(255,255,255,0.2) !important;
    
    color: #fff !important;
    opacity: 1 !important;
    padding: 0 !important;
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none !important;
}

.modal-close-custom:hover {
    background-color: #ffbd39 !important; /* Brand Yellow on hover */
    color: #000 !important;
    transform: scale(1.1);
}

.modal-close-custom span {
    font-size: 1.5rem;
    line-height: 1;
    padding-bottom: 2px; /* Visual center adjustment */
}

.modal-body-img { max-width: 100%; max-height: 80vh; object-fit: contain; background: #fff; border-radius: 8px; }

#universalModal .modal-dialog {
    max-width: 80% !important;
    width: 80% !important;
    margin: 1.75rem auto;
}
#universalModal .modal-body img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    background-color: #000;
}
#universalModal .modal-content {
    background-color: transparent;
    border: none;
    box-shadow: none;
}


/* ============================================================
   13. MAJOR MEDIA QUERIES (Responsive Layouts)
   ============================================================ */

/* --- TIER 1: LAPTOPS (Max 1200px) --- */
@media (max-width: 1200px) {
    .resume-wrap .d-flex.align-items-center,
    .resume-wrap .education-card-header {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }
    .resume-logo-link {
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        width: auto !important;
        min-width: 200px !important;
    }
    .hero-text-row {
        justify-content: center !important;
        text-align: center !important;
        transform: translateY(-60px) !important; 
    }
    .hero-image-right {
        display: block !important;
        opacity: 0.15 !important;
        width: 80% !important;
        z-index: -1 !important;
    }
    .scroll-down-btn {
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 80px !important;
    }
}

/* --- TIER 2: TABLETS (Max 991px) --- */
@media (max-width: 991px) {
    .hero-text-row { transform: translateY(-80px) !important; }
    .scroll-down-btn { bottom: 150px !important; }
}

/* --- TIER 3: MOBILE (Max 600px) --- */
@media (max-width: 600px) {
    .hero-image-right { display: none !important; }
    .hero-text-row {
        height: 50vh !important;
        align-items: center !important;
    }
    .hero-slider-text h1 { font-size: 40px !important; margin-top: 0 !important; }
    .mouse-scroll { display: none !important; }
    
    .resume-company-title { font-size: 22px !important; }
    .resume-header-text-container {
        justify-content: center !important;
        text-align: center !important;
    }
    
    .about-img img {
        width: 250px !important;
        height: 300px !important;
    }
}

/* --- TIER 4: TINY SCREENS (Max 350px) --- */
@media (max-width: 350px) {
    .section-card, .text-card, .vertical-card-box, .resume-wrap {
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    .vertical-card-icon-container {
        width: 85% !important;
        max-width: 160px !important;
        height: 110px !important;
    }
    .title-a { font-size: 1.5rem !important; }
}

/* FIX: Constrain Height and Width on Mobile Devices */
@media (max-width: 991px) {
    
    /* 1. Fix Height: Stop forcing full-screen height */
    section, .ftco-section {
        min-height: auto !important;   /* Allow section to shrink to fit content */
        height: auto !important;       /* Override any fixed height */
        padding-bottom: 80px !important; /* Standard spacing instead of random gaps */
        padding-top: 60px !important;
    }

    /* 2. Fix Width: Prevent horizontal scrolling */
    body, html {
        overflow-x: hidden !important; /* Cut off anything sticking out */
        width: 100% !important;
    }

    .container, .container-fluid {
        max-width: 100% !important;    /* Force containers to stay inside screen */
        padding-left: 15px !important; /* Maintain safe edges */
        padding-right: 15px !important;
    }

    /* 3. Hero Section Exception */
    /* We usually WANT the first screen to be full height, even on mobile */
    .hero-container {
        min-height: 80vh !important; /* Slightly less than full height to show scroll hint */
    }
}