/* ============================================================
   THEME VARIABLES
   ============================================================ */
:root {
    /* Backgrounds: Pure White to Light Grey */
    --bg-primary: #e8ebef;           /* Page Base */
    --bg-secondary: #fdfdfd;         /* Card Base */
    --bg-card: rgba(0, 0, 0, 0.05);   /* Very Light Grey Tint */
    --bg-resume: #f9f9f9;            /* Subtle Grey for Resume sections */
    --bg-image: url('../images/background-image-doodle-light.png');
    
    /* Brand / Accent: Absolute Black */
    --accent-color: #ffbd39;       
    --accent-hover: #333333;
    --accent-text: #000000;          /* White text for contrast on black buttons */
    
    /* Text Colors: High Contrast Grayscale */
    --text-main: #000000;            /* Primary Black */
    --text-header: #000000;          /* Bold Black Headers */
    --text-muted: #666666;           /* Muted Dark Grey */
    
    /* Borders & Lines */
    --border-color: #000000;         /* Solid Black Borders */
    --glass-bg: #f0f2f5;
    --badge-bg: rgba(0, 0, 0, 0.05);    
    /* UI Depth & Filters */
    --glow-color: rgba(0, 0, 0, 0.1);
    --icon-filter: grayscale(1) brightness(0); /* Forces all icons to Black */
}

[data-theme="dark"] {
    /* Backgrounds: Deep Black to Dark Charcoal */
    --bg-primary: #1e1e1e;           /* Deep Black Base */
    --bg-secondary: #0a0a0a;         /* Section Cards */
    --bg-card: rgba(255, 255, 255, 0.05); 
    --bg-resume: #1a1a1a;           /* resume, tabs */
    --bg-image: url('../images/background-image-doodle.png');            
    
    /* Brand / Accent: High-Visibility Yellow */
    --accent-color: #ffbd39;         /* Signature Yellow */
    --accent-hover: #e0a800;
    --accent-text: #000000;          /* Dark text for yellow buttons */
    
    /* Text Colors: High Contrast Slate/White */
    --text-main: rgba(255, 255, 255, 0.7); 
    --text-header: #ffffff;          /* Pure White Headers */
    --text-muted: #a0a0a0;           
    
    /* Borders & Lines */
    --border-color: #333333;         /* Muted Dark Grey Borders */
    --badge-bg: #343a40;
    --glass-bg: rgba(255, 255, 255, 0.1);
    
    /* UI Depth & Filters */
    --glow-color: rgba(255, 189, 57, 0.2);
    --icon-filter: invert(1) brightness(100); /* Flips dark icons to White */
}

/* ============================================================
   1. GLOBAL SETTINGS & BACKGROUND
   ============================================================ */


html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

@media (max-width: 991px) {
    .tooltip {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
}

/* Wrapper to hold Button + Copy Icon */
.btn-wrapper {
    position: relative;
    display: inline-block;
}

.btn-outline-warning {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: var(--bg-primary);
}

.resume-wrap{
    border-radius: 10px !important;
    background: var(--glass-bg) !important;
}
/* The Copy Button (Hidden by default) */
.copy-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #1a1a1a;
    color: #ffc83d;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Show on Hover */
.btn-wrapper:hover .copy-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Hover effect on the copy button itself */
.copy-btn:hover {
    transform: scale(1.1);
    background-color: #333;
}

body {
    /* Deep Black Base */
    background-color: var(--bg-primary) !important;
    
    /* Fixed SVG Pattern */
    background-image: var(--bg-image);
    background-attachment: fixed;
    background-size: 500px auto;
    background-repeat: round;
    
    /* Gentle floating animation */
    animation: bgScroll 60s linear infinite;
    color: var(--text-main) !important;
}


/* 3. Target specific areas just in case */
p, span, li, td {
    color: var(--text-main);
}

/* 4. Ensure headings are essentially pure white */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main) !important;
}

.close:focus,
.close:active{
    outline: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}


.hero-wrap h2, 
.hero-wrap .subheading {
    color: var(--text-main) !important;
    opacity: 1 !important;
}

/* 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; }
}

@media print {
    /* 1. Force the browser to render background colors/images */
    body {
        -webkit-print-color-adjust: exact !important; /* Chrome/Safari */
        print-color-adjust: exact !important;         /* Firefox */
    }

    /* 2. Optional: Ensure your dark background stays dark */
    body, .section-card, .resume-wrap {
        background-color: var(--bg-resume) !important; /* Force black background */
        color: #fff !important;            /* Force white text */
    }

    /* 3. Hide things that look bad in PDF (Navbars, Buttons) */
    .navbar, 
    .btn, 
    .footer, 
    .owl-nav, 
    .copy-btn,
    .slider-arrow-static {
        display: none !important;
    }

    /* 4. Fix Grid Layouts (Bootstrap often breaks in print) */
    .col-md-4, .col-md-5, .col-md-12 {
        float: left; /* Forces columns to sit side-by-side in PDF */
    }
}

/* 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; }


/* Hero Avatar Container */
.hero-avatar-circle {
    width:  350px;         /* Size of the circle */
    height: 350px;
    border-radius: 50%;
    border: 4px solid var(--accent-color); /* Your Theme Yellow */
    background: var(--bg-primary); /* Semi-transparent dark bg */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: 0 0 20px rgba(255, 189, 57, 0.2); /* Soft yellow glow */
    overflow: hidden;
    animation: floatAvatar 6s ease-in-out infinite;
}

/* Make the image fill the container */
.hero-avatar-circle img {
    width: 100%;             /* Stretches image to fill the 65px button */
    height: 100%;            /* Stretches image to fill the 65px button */
    object-fit: cover;       /* Ensures face isn't squashed */
    display: block;
    object-position: top center;
    border-radius: 50%;
    margin: 0;
}


/* Animation Keyframes */
@keyframes floatAvatar {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); } /* Moves up */
    100% { transform: translateY(0px); }
}

/* Responsive adjustments for smaller laptops */
@media (max-width: 991px) {
    .hero-avatar-circle {
        width: 220px;
        height: 220px;
    }
}

/* =========================================
   CUSTOM MAIN SCROLLBAR (Transparent)
   ========================================= */

/* --- 1. Chrome, Edge, Safari --- */

/* Width of the scrollbar */
::-webkit-scrollbar {
    width: 10px;  /* Width of vertical scrollbar */
    height: 10px; /* Height of horizontal scrollbar */
}

/* The Background (Track) -> TRANSPARENT */
::-webkit-scrollbar-track {
    background: transparent; 
}

/* The Moving Part (Thumb) */
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* Dark grey, 20% opacity */
    border-radius: 10px;       /* Rounded edges */
    border: 2px solid transparent; /* Creates padding around the thumb */
    background-clip: content-box;  /* Ensures the border works as padding */
}

/* Hover State */
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4); /* Darker on hover */
}

/* --- 2. Firefox --- */
html {
    scrollbar-width: thin; /* Makes it skinnier */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Thumb Color | Track Color */
}


/* =========================================
   DARK MODE SUPPORT
   ========================================= */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2); /* Light grey for dark bg */
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}


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

.ftco-navbar-light .navbar-brand {
    color: var(--text-main) !important;
    padding-top: .7rem;
    padding-bottom: .7rem;
}

.ftco-navbar-light .navbar-brand:focus,
.ftco-navbar-light .navbar-brand:hover{
    color: var(--text-main) !important;
}

.ftco-navbar-light .navbar-toggler {
    border: none;
    color: var(---text-main) !important;
    cursor: pointer;
    padding-right: 0;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: .1em;
}

.navbar-toggler .oi-menu {
    margin-right: 8px !important; /* Adjust 8px to increase/decrease gap */
}   

.navbar-brand {
    flex: 0 0 auto;
    margin-right: 20px;
    background-color: var(---text-main);
    z-index: 20;
    position: relative;
    color: var(--text-main);
}

.dropdown-menu {
    background-color: var(--accent-text) !important;
    border: 1px solid #333;
    margin-top: 0;
}
.dropdown-item {
    color: var(--bg-primary) !important;
    background-color: transparent !important;
    transition: color 0.2s ease;
}
.dropdown-item:hover {
    color: var(--accent-color) !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;
        float: none;
        display: inline-block;
    }
}

/* --- MOBILE MENU (Screens <= 991px) --- */
@media (max-width: 991px) {
    .navbar {
        position: relative; 
        z-index: 9999 !important;
    }
    .navbar-toggler { 
        display: flex !important;
        padding: 10px 8px !important;
        align-items: center;

    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary) !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; }

/* 1. Force the Navbar Container to show all children */
#ftco-navbar .container {
    overflow: visible !important; 
    display: flex !important;
    align-items: center;
}

/* 2. Style and Position the Config Area */
.navbar-config-area {
    display: flex !important;
    position: relative !important;
    z-index: 10001 !important; 
    margin-left: 20px;
    flex-shrink: 0;
}

.navbar-config-area {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    position: relative;
    height: 100%; /* Align with navbar height */
}

/* Perfecting the Settings Dropdown position */
.settings-dropdown {
    position: absolute !important;
    top: 55px !important; /* Spacing from navbar */
    right: -10px !important; /* Center the box under the cog */
    background: var(--bg-primary) !important;
    /* border: 1px solid #333 !important; */
    padding: 20px !important;
    width: 220px !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    z-index: 11000 !important;
}

/* Inner Text & Switch alignment */
.settings-dropdown h6 {
    color: var(--text-header) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid var(--text-header);
    padding-bottom: 8px;
}


/* Ensure hidden state works */
.settings-dropdown.hidden { 
    display: none !important; 
}

/* The Switch Container */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;  /* Width of the track */
    height: 22px; /* Height of the track */
    margin: 0;
}

/* The Slider (Track) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444; /* Off color */
    transition: .3s;
    border-radius: 34px;
}

/* The Dot (Slider Handle) */
.slider:before {
    position: absolute;
    content: "";
    height: 16px; /* Dot height */
    width: 16px;  /* Dot width */
    left: 3px;
    bottom: 3px;
    background-color: white; /* Changed from black to white for visibility */
    transition: .3s;
    border-radius: 50%;
}

/* When Toggled ON (Yellow Track) */
input:checked + .slider {
    background-color: #FFC107 !important;
}

/* Move the dot to the right when ON */
input:checked + .slider:before {
    transform: translateX(22px); /* Moves it exactly inside the track */
    background-color: #000; /* Optional: turn dot black when on yellow */
}

.settings-dropdown div.d-flex {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
}

.settings-dropdown span {
    color: var(--text-main) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* =========================================
   NUCLEAR FIX: TINY SCREENS (< 380px)
   ========================================= */
/* =========================================
   FINAL FIX: HIDE "MENU" TEXT ON TINY SCREENS
   ========================================= */
@media (max-width: 386px) {

    /* 1. Navbar Toggler (Menu Button) */
    .navbar-toggler {
        font-size: 16px !important;       
        padding: 4px 6px !important;   /* Compact padding */
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-left: 5px !important;   /* Small gap from Brand Name */
        margin-right: 0 !important;    /* CRITICAL: No space on the right side */
        border: none !important;       /* Optional: Remove border if it takes space */
    }

    /* 2. Navbar Config Area (Gear Icon) */
    .navbar-config-area {
        margin-left: 10px !important;     /* CRITICAL: Removes gap from Menu button */
        padding-left: 10px !important;    /* Removes internal padding */
    }

    /* 3. Container Layout */
    #ftco-navbar .container {
        padding-left: 10px !important; 
        padding-right: 10px !important;
        flex-wrap: nowrap !important;
    }
    
    /* 4. Ensure Logo fits */
    .navbar-brand {
        font-size: 16px !important;
        margin-right: 0 !important;
    }
}

/* --- DESKTOP SLIDER (Screens > 992px) --- */
@media (min-width: 992px) {

    /* 2. The Scroll Mask */
    .nav-scroll-mask {
        overflow-x: auto;       /* Allows scrolling */
        white-space: nowrap;    /* Forces single line */
        width: 100%;
        scroll-behavior: smooth;
        scrollbar-width: none;  /* Hide Firefox Scrollbar */
    }
    .nav-scroll-mask::-webkit-scrollbar { display: none; } /* Hide Chrome Scrollbar */

    /* 4. Arrow Buttons */
    .nav-arrow {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.2);
        color: var(--text-main);
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: 0.2s;
        flex-shrink: 0;
        margin: 0 5px;
        outline: none !important;
        box-shadow: none !important;
    }

    .nav-arrow:hover {
        background: var(--badge-bg);
        color: #000;
        border-color: var(--glass-bg);
    }

    [data-theme="dark"] .nav-arrow {
        border: none !important;
    }

    /* Optional: Ensure border doesn't reappear on hover in Dark Mode */
    [data-theme="dark"] .nav-arrow:hover {
        border: none !important;
        background: var(--badge-bg); /* Keep the background hover effect */
        color: #000;
    }
    /* 1. Force the Wrapper to be SMALLER than the content */
    /* 500px is usually small enough to force scrolling. You can adjust this number. */
    .nav-slider-wrapper {
        display: flex;
        align-items: center;
        max-width: 100% !important; /* CRITICAL: Must be smaller than 790px */
        margin-left: auto;
        position: relative;
    }

    /* 2. The Mask: Hides the overflow */
    #nav-scroll-mask {
        overflow-x: auto; /* Hide scrollbar but allow JS scroll */
        width: 100%;
        display: block;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
    }

    /* 3. The List: Force single line */
    #nav-scroll-mask .navbar-nav {
        display: flex !important;
        flex-wrap: nowrap !important; /* CRITICAL: Prevents wrapping */
        flex-direction: row !important;
        width: max-content !important; /* CRITICAL: Force list to be full width */
    }

    /* 4. The Items: Prevent shrinking */
    #nav-scroll-mask .nav-item {
        flex: 0 0 auto !important;
        display: inline-block;
    }
}

/* Disabled Arrow State */
.nav-arrow.disabled {
    opacity: 0.2;            /* Make it faint */
    pointer-events: none;    /* Prevent clicking */
    cursor: default;
}

/* Optional: Add a smooth transition for the active link background if you haven't already */
.navbar-nav .nav-link.active {
    background: transparent; /* Keep it clean */
    color: var(--accent-color) !important;
}

/* =========================================
   HIDE ARROWS ON MOBILE (< 992px)
   ========================================= */
@media (max-width: 991.98px) {
    
    /* 1. Force hide the arrows */
    .nav-arrow {
        display: none !important;
    }

    /* 2. Reset the wrapper so items stack normally (if needed) */
    .nav-slider-wrapper {
        display: block !important;
        max-width: 100% !important;
    }
    
    /* 3. Allow standard scrolling if menu is long */
    #nav-scroll-mask {
        overflow: visible !important;
    }

    .navbar-toggler {
        display: flex !important;
        align-items: flex-start !important; /* Centers items vertically */
        justify-content: center !important;
        padding: 8px 12px !important;   /* Sets the button size */
        height: 38px !important;        /* Force a fixed height */
    }

    /* 2. The Text ("MENU") */
    .navbar-toggler span {
        font-size: 16px !important;
        font-weight: 700 !important;    /* Make it bold to match icon weight */
        text-transform: uppercase;
        letter-spacing: 1px;
        line-height: 1 !important;      /* Remove extra line spacing */
        margin-right: 8px !important;   /* Gap between Text and Icon */
        display: block !important;
    }

    /* 3. The Icon (Hamburger) */
    .navbar-toggler .oi-menu {
        font-size: 10px !important;     /* MUST match text size */
        line-height: 1 !important;
        display: block !important;
        
        /* OPTICAL FIX: Nudge the icon down 1px or 2px to align with text center */
        transform: translateY(1px); 
    }

    /* 2. PUSH MENU & GEAR TO THE RIGHT */
    /* This tells the Brand Name to consume all empty space to its right */
    .navbar-brand {
        margin-right: auto !important; 
    }
    
    .config-icon{
        display: flex;
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 8px 12px !important;   /* Sets the button size */
        height: 38px !important;        /* Force a fixed height */
    }
}

/* ============================================================
   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: var(--bg-primary); */
    white-space: nowrap;
}

/* =========================================
   MOUSE SCROLL ICON (Theme Aware)
   ========================================= */

.scroll-down-btn {
    position: absolute;
    bottom: 150px;
    right: 40px;
    z-index: 10;
    opacity: 0.8;
}

/* 1. LIGHT THEME DEFAULT (Black) */
.mouse-scroll {
    display: block;
    width: 30px;
    height: 50px;
    /* CHANGE: #fff -> #000 */
    border: 2px solid #000; 
    border-radius: 20px;
    margin: 0 auto 10px;
    transition: border-color 0.3s ease; /* Smooth transition */
}

.mouse-wheel {
    display: block;
    width: 4px;
    height: 8px;
    /* CHANGE: #fff -> #000 */
    background: #000;
    border-radius: 2px;
    margin: 10px auto;
    animation: scrollWheel 1.5s infinite;
    transition: background-color 0.3s ease;
}

.arrow-down {
    display: block;
    width: 20px;
    height: 20px;
    /* CHANGE: #fff -> #000 */
    border-right: 3px solid #000;
    border-bottom: 3px solid #000;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: bounce 2s infinite;
    transition: border-color 0.3s ease;
}

/* 2. DARK THEME OVERRIDE (White) */
[data-theme="dark"] .mouse-scroll {
    border-color: #fff;
}

[data-theme="dark"] .mouse-wheel {
    background-color: #fff;
}

[data-theme="dark"] .arrow-down {
    border-right-color: #fff;
    border-bottom-color: #fff;
}

@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
   ============================================================ */
#about-section .resume-wrap {
    text-align: left !important;
    
    /* Optional: If text was 'Justified' (stretched) before, reset it */
    text-justify: auto; 
}

/* Ensure all paragraphs inside it also align left */
#about-section .resume-wrap p {
    text-align: left !important;
}

/* 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: var(--bg-primary) !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: var(--glass-bg)  !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;
    background: var(--accent-color);
    color: var(--accent-text);
}

/* Fix: Keep text black on hover/focus for yellow buttons */
.vertical-card-btn:hover,
.vertical-card-btn:focus,
.vertical-card-btn:active,
.vertical-card-btn:visited {
    color: var(--accent-text) !important;      /* Force black text */
    background-color: var(--accent-color);  /* Keep yellow background */
    border-color: var(--accent-color);
    outline: none !important;    /* Remove blue browser focus ring */
    box-shadow: none !important; /* Remove Bootstrap shadow */
}


/* ============================================================
   5. UNIFIED SLIDER LOGIC (Projects, 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 (Corrected Logic)
   ========================================= */

/* 1. Base State (Default) */
.slider-arrow-static {
    background: var(--glass-bg);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    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;
}

/* 2. Focus State (Reset after click) */
/* Forces the button back to transparent if you click and move mouse away */
.slider-arrow-static:focus {
    background: transparent !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    outline: none !important;
}

/* Ensure icon follows suit */
.slider-arrow-static:focus span,
.slider-arrow-static:focus i {
    color: var(--accent-color) !important;
}

/* 3. Hover & Active States (Interaction) */
/* PLACEMENT CRITICAL: This must be BELOW :focus so hover works even if focused */
.slider-arrow-static:hover,
.slider-arrow-static:active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-text) !important;
}

/* Force Icon Black on Hover */
.slider-arrow-static:hover span,
.slider-arrow-static:active span,
.slider-arrow-static:hover i,
.slider-arrow-static:active i {
    color: var(--accent-text) !important;
}

/* 4. Disabled State (The "Nuclear" Override) */
/* PLACEMENT CRITICAL: Must be LAST to override everything else */
.slider-arrow-static.disabled,
.slider-arrow-static.disabled:hover,
.slider-arrow-static.disabled:focus,
.slider-arrow-static.disabled:active {
    background: transparent !important;
    border: 2px solid var(--bg-card) !important;
    color: var(--bg-card) !important;
    cursor: default !important;
    pointer-events: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Force Icon Faint on Disabled */
.slider-arrow-static.disabled span,
.slider-arrow-static.disabled i,
.slider-arrow-static.disabled:hover span,
.slider-arrow-static.disabled:focus span {
    color: var(--bg-card) !important;
}

.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: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    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: var(--text-main) !important;
    background: var(--bg-primary); 
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#project-section .enlarge-icon:hover {
    background: var(--accent-color);
    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: var(--glass-bg)  !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: var(--bg-card) !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: var(--accent-color) !important;
    color: #000 !important;
    border-color: var(--accent-color) !important;
    transform: scale(1.1);
}


/* D. Project Numbered Dots */
#project-section .slider-number {
    background: var(--glass-bg);
    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 SEARCH & TOGGLE
   ========================================= */

/* 1. Toggle Positioning */
.project-view-toggle {
    position: absolute;
    right: 15px;
    top: 0;
    display: flex;
    align-items: center;
    z-index: 10;
}

/* Mobile: Stack toggle below title */
@media (max-width: 768px) {
    .project-view-toggle {
        position: relative;
        right: auto;
        justify-content: center;
        margin-top: 15px;
        margin-bottom: 15px;
    }
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* 2. The Switch (iOS Style) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-bottom: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444; /* Dark Grey (Off) */
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Active State (Yellow) */
input:checked + .slider {
    background-color: var(--accent-color); 
    border-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px); 
    background-color: #000;
}

/* 3. Search Input Styling */

.search-input-custom {
    /* Background: Solid Grey */
    background: var(--border-color) !important; 
    
    /* Text: High-Readability RGB White */
    color: rgba(255, 255, 255, 0.9) !important;
    
    /* Placeholder Text Color (Optional: Make it slightly dimmer) */
    /* Webkit/Chrome */
    &::placeholder { color: rgba(255, 255, 255, 0.5); }
    
    border: 1px solid rgba(255,255,255,0.1);
    padding: 25px;
    font-size: 1.1rem;
    border-radius: 50px;
    text-align: center;
    box-shadow: none;
    transition: all 0.3s ease;
}

/* Focus State */
.search-input-custom:focus {
    background: #444444 !important; /* Slightly lighter grey on focus */
    border-color: var(--accent-color);
    color: var(--bg-primary) !important;
    box-shadow: 0 0 10px rgba(255, 189, 57, 0.2);
    outline: none;
}


#search-results-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory; /* Snap to pages */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    
    /* Hide Scrollbars */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
#search-results-container::-webkit-scrollbar { 
    display: none; 
}

#search-results-container .col-md-4 {
    flex: 0 0 auto; /* Stop shrinking */
    
    /* DESKTOP: 3 Cards per view */
    width: 33.333%; 
    max-width: 33.333%;
    scroll-snap-align: start;
}

#search-slider-controls {
    display: none; /* JS will turn this on if needed */
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 15px; /* Space between arrows and numbers */
}
.slider-arrow-static{
    background: var(--glass-bg) !important;
}

.slider-arrow-static.disabled, 
.slider-arrow-static.disabled:hover, 
.slider-arrow-static.disabled:focus, 
.slider-arrow-static.disabled:active {
    color: var(--bg-card) !important;
    cursor: default !important;
    pointer-events: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 2px solid var(--bg-card) !important;
    outline: none !important;
}

/* 4. MOBILE OVERRIDE: 1 Card per view */
@media (max-width: 768px) {
    #search-results-container .col-md-4 {
        width: 100%;
        max-width: 100%;
    }
}


.search-rect-input {
    background: var(--border-color) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--bg-card);
    border-right: none; /* Merge with button */
    border-radius: 4px 0 0 4px; 
    padding: 15px 20px;
    height: 50px;
    font-size: 1rem;
    box-shadow: none !important;
    width: 100%;
}

.search-rect-input:focus {
    background: #444444 !important;
    border-color: var(--accent-color);
    outline: none;
}

/* 2. Rectangular Search Button */
.search-rect-btn {
    /* RESTORE BORDERS: Make it a complete button */
    border-radius: 4px !important; 
    
    /* FIX HEIGHT: Stop it from stretching */
    height: 50px !important; 
    min-height: 50px !important;
    
    /* ALIGNMENT: Stick to the top (or use 'center' if you prefer) */
    align-self: flex-start; 
    
    padding: 0 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solidvar(--accent-color); 
    background: var(--accent-color);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px; /* Add Gap between input and button */
    white-space: nowrap; /* Prevent text wrapping */
}

/* Hover Effect */
.search-rect-btn:hover {
    background: transparent;
    color: var(--accent-color);
}

/* 3. Auto-Suggest Dropdown */
.suggestions-dropdown {
    /* POSITIONING: Anchor to the new wrapper */
    position: absolute;
    top: 100%;
    left: 0;
    
    /* SIZE: Match the input wrapper exactly */
    width: 100%; 
    
    /* VISUALS: Match the dark theme */
    background: var(--bg-primary); 
    border: 1px solid var(--bg-card);
    
    /* CONNECTED LOOK: Remove top border so it flows from input */
    border-top: none; 
    border-radius: 0 0 4px 4px; /* Round bottom corners only */
    
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
    text-align: left;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover .suggestion-match {
   cursor: pointer;
}

/* 5. Match Highlight (The text the user typed) */
.highlight-match {
    color: var(--text-main);
    /* font-weight: 700; */
}



.search-tag-container {
    background: var(--glass-bg);
    border-color: var(--border-color) !important;
    
    /* RESTORE BORDERS: Make it a complete box */
    border: 1px solid var(--bg-card) !important; 
    border-radius: 4px !important; 
    
    padding: 5px 10px;
    min-height: 50px;
    height: auto !important; /* Grows with content */
    box-shadow: none !important;
    width: 100%;
    cursor: text;
    transition: border-color 0.3s ease;
}

/* Focus State for the Container */
.search-tag-container:focus-within {
    border-color: var(--accent-color) !important;
}

/* 2. The Actual Input Field (Invisible styling) */
.tag-input-field {
    border: none;
    background: transparent;
    color: var(--text-main);
    outline: none;
    flex-grow: 1;
    min-width: 150px;
    padding: 5px;
    font-size: 1rem;
}
.tag-input-field::placeholder { color: var(--text-muted); }

/* 3. The Skill Badge */
.search-badge {
    background-color: var(--accent-color); /* Yellow Theme */
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-right: 8px;
    margin-top: 4px;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
}

/* 4. The Close (X) Icon */
.search-badge-close {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1; /* Better for flex alignment */
    
    /* ADDED: Start slightly transparent (so it doesn't distract) */
    opacity: 0.6; 
    transition: all 0.2s ease;
}

.search-badge-close:hover { 
    /* ADDED: Make fully visible */
    opacity: 1; 
    
    /* OPTION A: Dark Red (Classy warning) */
    color: #cc0000; 
    
    /* OPTION B: White (High contrast on yellow) */
    /* color: #fff; */
}

.badge-dark {
    /* Optional: Ensure text is white */
    background: var(--badge-bg);
    color: var(--text-main) !important;
    
    /* Optional: Add a border if it's too dark to see against the black background */
    border: 1px solid var(--bg-card);
}

/* The Highlighted State (Yellow BG, Black Text) */
.badge-highlight {
    background-color: var(--accent-color) !important;
    color: var(--accent-text) !important;
    border: 1px solid var(--accent-color) !important;
}

/* Ensure it overrides the default dark badge if active */
.badge-highlight:hover {
    background-color: var(--accent-hover) !important; /* Slightly darker on hover */
    color: #000 !important;
}

@media (max-width: 768px) {
    /* 1. Stack Input and Button Vertically */
    .search-input-group {
        flex-direction: column !important;
    }

    /* 2. Adjust Button Spacing & Width */
    .search-rect-btn {
        margin-left: 0 !important;  /* Remove the left gap */
        margin-top: 15px;           /* Add a top gap */
        width: 100% !important;     /* Make button full width */
        align-self: stretch;        /* Stretch to fill container */
    }
}

/* FORCE LEFT ALIGNMENT ON MOBILE */
@media (max-width: 768px) {
    #search-pagination-track {
        /* On mobile, force start alignment so "1" is never hidden */
        justify-content: flex-start !important;
        
        /* Ensure there's padding so it doesn't touch the left arrow */
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* OPTIONAL: Ensure numbers don't get squashed on very small phones */
@media (max-width: 400px) {
    .search-num {
        margin: 0 2px !important; /* Reduce gap slightly */
        width: 30px !important;   /* Slightly smaller dots */
        height: 30px !important;
        font-size: 0.9rem !important;
    }
}

/* =========================================
   KEYBOARD NAVIGATION STYLES
   ========================================= */

/* Add this to your existing dropdown styles */
.suggestion-active {
    background: var(--accent-color) !important; /* Theme Yellow */
    color: #000 !important;         /* Black text */
    font-weight: 600;
}

/* Ensure the highlight text inside follows suit */
.suggestion-active .highlight-match {
    color: #000 !important;
}



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

/* 1. The Main Card */
.project-modal-card {
    background: var(--bg-primary) !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: var(--bg-primary); /* 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;  */

    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: var(--bg-primary);
}

/* Chrome/Safari Scrollbar Styling */
.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
.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: var(--accent-color) !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: var(--text-main); /* 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: var(--accent-text) !important;
    background-color: var(--accent-color) !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: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background: var(--bg-primary) !important; 

}

#modal-live-link:hover, .btn-outline-light.project-action-btn:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #000 !important;
}

/* B. Source Code (White Outline Button) */
#modal-repo-link, .btn-outline-light.project-action-btn {
    background-color: transparent;
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background: var(--bg-primary) !important; 
}
/* Hover State for Source Code */
#modal-repo-link:hover, .btn-outline-light.project-action-btn:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !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;
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background: var(--bg-primary) !important; 
}
#modal-demo-link:hover, .btn-outline-light.project-action-btn:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !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: var(--text-main) !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: var(--accent-color) !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: var(--text-muted); margin-bottom: 5px; }
.resume-date { color: var(--accent-color); font-weight: 600; }
.resume-desc-block, .resume-edu-coursework {
    border-left: 3px solid var(--accent-color); 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: var(--accent-color) !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: var(--text-main);          
    background: var(--bg-resume);     
    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: var(--accent-color);          
    border-color: var(--accent-color);
    background: var(--bg-resume);
}
.custom-tab-nav .nav-link.active {
    opacity: 1 !important;
    background-color: var(--accent-color) !important; 
    color: var(--accent-text) !important;            
    border-color: var(--accent-color) !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: var(--accent-color) !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 var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}
.pag-btn.active {
    background: var(--accent-color);
    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;
    border: none;
}
#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;
}

#skills-section .resume-wrap {
    /* 1. The Dark Box */
    background: var(--glass-bg) !important;
    border-radius: 10px;
    
    /* 2. Spacing & Positioning */
    margin-bottom: 30px;    /* Space below the box */
    margin-left: auto;      /* Centering */
    margin-right: auto;
    max-width: 1000px;      /* Width limit */
    
    /* 3. Padding Fix for Tables */
    /* 'border-collapse: separate' allows padding on the <table> tag to work */
    border-collapse: separate; 
    border-spacing: 0; 
    padding: 40px;          /* Space INSIDE the dark box */
}

/* Cell Styling for Skills Section Only */
#skills-section .resume-wrap td {
    border-bottom: 1px solid var(--bg-card);
    padding: 15px 10px;
    vertical-align: top;
    text-align: left !important;
}

/* Yellow Keys */
#skills-section .resume-wrap td:first-child {
    color: var(--accent-color);
    font-weight: 700;
    width: 25%;

    /* FORCE SINGLE LINE */
    white-space: nowrap;  /* Prevents text from wrapping */
    width: auto !important; /* Allow it to take the width it needs */
    text-align: left !important;
}

/* White Values */
#skills-section .resume-wrap td:last-child {
    color: var(--text-main);
}

/* Remove border from last row */
#skills-section .resume-wrap tr:last-child td {
    border-bottom: none;
}

/* =========================================
   MOBILE FIX FOR SKILLS TABLE (CORRECTED)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Reduce padding on the dark card */
    #skills-section .resume-wrap {
        padding: 15px !important;
        width: 100% !important;
    }

    /* 2. RESET ALL CELLS: Stack them vertically & align left */
    #skills-section .resume-wrap td {
        display: block !important;    /* Stack vertically */
        width: 100% !important;       /* Force full width */
        text-align: left !important;  /* Force text to left */
        padding: 5px 0 !important;
        border: none !important;
    }

    /* 3. STYLE THE HEADER (Yellow Key) */
    #skills-section .resume-wrap td:first-child {
        color: var(--accent-color);
        font-size: 1.1rem;
        margin-top: 15px; 
        border-bottom:  1px solid var(--bg-card) !important; 

        /* THE FIX: Use BLOCK, not inline-block */
        display: block !important;     /* Takes full width so it can align left */
        white-space: nowrap !important; /* Forces single line */
        width: 100% !important;        
    }

    /* 4. STYLE THE VALUE (White Text) */
    #skills-section .resume-wrap td:last-child {
        padding-bottom: 10px !important;
        color: var(--text-main);
        text-align: left !important; /* Double-check alignment */
    }
}


/* ============================================================
   REPLACE YOUR EXISTING MEDIA QUERY WITH THIS
   ============================================================ */


/* 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);
}

/* ============================================================
   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: var(--glass-bg);
    border-radius: 2px;
    /* 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;
        border: none;
    }
    #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,
    #contact-section .icon-file-text {
        font-size: 14px !important;
        margin-right: 8px !important;
    }
}

/* 1. "Say Hello" (Solid Yellow, Black Text) */
#contact-email-link {
    background-color: var(--accent-color) !important; /* Force Yellow Fill */
    border-color: var(--accent-color) !important;
    color: var(--accent-text) !important;            /* Force Black Text */
}

/* Force the envelope icon inside to be black */
#contact-email-link span {
    color: var(--accent-text) !important; 
}

#resume-download-link {
    background-color: var(--accent-color) !important; /* Matches your brand yellow */
    border-color: var(--accent-color) !important;
    color: var(--accent-text) !important;            /* Force Black Text for contrast */
}

#resume-download-link span {
    color: var(--accent-text) !important; 
}

/* 2. "Call Me" (Solid White, Black Text) */
#contact-phone-link {
    background-color: var(--bg-primary) !important; /* Force White Fill */
    border-color: var(--bg-primary) !important;
    color: var(--accent-text) !important;            /* Force Black Text */
}

/* Force the phone icon inside to be black */
#contact-phone-link span {
    color: var(--accent-text) !important;
}

/* ============================================================
   12. COMPONENTS (Modals, Tables, Inversion)
   ============================================================ */


/* 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: var(--glass-bg);
    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: var(--accent-color) !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 */
    }
}


/* =========================================
   AI CHATBOT WIDGET
   ========================================= */

/* 1. Container & Toggle Button */
#chatbot-container {
    opacity: 0;                /* Invisible */
    visibility: hidden;        /* Cannot be clicked */
    transition: all 0.5s ease; /* Smooth fade-in effect */
    
    /* Keep your existing positioning */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: none;
}

#chatbot-header-text{
    color: var(--accent-text) !important;  /* !important overrides your global body/span settings */
    font-weight: bold;
}


#chatbot-container.show-chat {
    opacity: 1;                /* Visible */
    visibility: visible;       /* Clickable */
}

#chatbot-avatar-btn {
    width: 65px;             /* Forces the button to be small */
    height: 65px;            /* Forces the button to be small */
    padding: 0;
    border: 3px solid #FFC107; /* Yellow Border */
    border-radius: 50%;      /* Makes it round */
    background: #1e1e1a;
    cursor: pointer;
    overflow: visible;

    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Positioning */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    
    /* Shadow & Animation */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

#chatbot-avatar-btn:hover {
    transform: scale(1.1);
}

/* Add the Dot Styles */
.notification-dot {
    position: absolute;
    top: -2px;    /* Sits slightly above the yellow border */
    right: -2px;  /* Sits slightly to the right of the yellow border */
    width: 16px;
    height: 16px;
    background-color: #FFC107; /* Matches your yellow border */
    border: 2px solid #1e1e1a;
    border-radius: 50%;
    z-index: 10001; /* Higher than button */
    display: none;  /* Hidden by default */
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}

@keyframes pulse-notification {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

/* 2. The Image Inside */
.chat-avatar-img {
    width: 100%;             /* Stretches image to fill the 65px button */
    height: 100%;            /* Stretches image to fill the 65px button */
    object-fit: cover;       /* Ensures face isn't squashed */
    display: block;
    object-position: top center;
    border-radius: 50%;
    margin: 0;
    background: var(--bg-primary);
}

/* 2. The Chat Window */
.chatbot-window {
    width: 350px;
    height: 450px;
    background: var(--bg-primary) !important; /* Dark Theme BG */
    /* border: 1px solid rgba(255,255,255,0.1); */
    border-radius: 12px;
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: all;
}

.chatbot-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* 3. Header */
.chatbot-header {
    background: var(--accent-color);
    color: var(--accent-text);
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #000;
    outline: none;
}


/* 4. Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-message, .user-message {
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.4;
}

.bot-message {
    background: var(--glass-bg) !important;
    color: var(--text-main);
    align-self: flex-start;
}

.user-message {
    background: var(--accent-color);
    color: #000;
    align-self: flex-end;
}

/* =========================================
   CHATBOT MESSAGE LINKS & HOVER EFFECTS
   ========================================= */

/* 1. Base Style for Links & Spans in Bot Messages */
.bot-message a,
.bot-message span {
    color: var(--accent-color) !important; /* Force Yellow Text */
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color); /* Subtle underline */
    transition: all 0.2s ease-in-out;
    padding: 0 2px; /* Tiny padding for the hover effect later */
}

/* 2. HOVER STATE (The Interaction) */
.bot-message a:hover,
.bot-message span:hover {
    /* Swap Colors for High Contrast */
    color: var(--bg-primary) !important;        /* Text becomes Dark */
    background-color: var(--accent-color) !important; /* Background becomes Yellow */
    
    /* Polish */
    border-bottom: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Slight lift effect */
    text-decoration: none;
}

/* 5. Input Area */
.chatbot-input-area {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    gap: 10px;
    background: var(--bg-card);
}

#chatbot-input {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background: var(--bg-primary);
    color: var(--text-main);
    outline: none;
}

#chatbot-send-btn {
    background: var(--accent-color);
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Add this to custom.css */
#chatbot-send-btn:disabled {
    cursor: not-allowed !important;
}

#chatbot-messages {
    /* For Firefox: Sets the width to 'thin' and colors the track and thumb */
    scrollbar-width: thin;
    scrollbar-color: #555555 var(--bg-primary); /* Thumb color (Yellow) and Track color (Dark) */
}

/* For Chrome, Edge, and Safari */
#chatbot-messages::-webkit-scrollbar {
    width: 6px; /* Makes the scrollbar narrow */
}

#chatbot-messages::-webkit-scrollbar-track {
    background: #1a1a1a; /* Background of the scrollbar area */
    border-radius: 10px;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background-color: var(--accent-color); /* The actual draggable bar */
    border-radius: 10px;       /* Rounds the edges */
    border: 1px solid #1a1a1a; /* Adds a tiny gap around the thumb */
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-hover); /* Darkens slightly on hover */
}

/* Styling for links generated by the chatbot */
.bot-message a {
    color: var(--accent-color) !important; /* Theme Yellow */
    text-decoration: none;
    border-bottom: 1px dashedvar(--accent-color);
    transition: all 0.2s ease;
}

.bot-message a:hover {
    color: var(--bg-primary) !important;
    border-bottom: 1px solid var(--bg-primary);
    background: rgba(255, 189, 57, 0.1);
    border-radius: 2px;
}

.chatbot-dismiss-btn {
    position: absolute !important;
    
    /* Pushes it to the top-right edge of the 65px avatar */
    bottom: 50px; 
    right: -5px; 
    
    /* Visual styling to match your theme */
    width: 24px;
    height: 24px;
    background: var(--bg-primary) !important; 
    color: var(--text-main) !important;
    border: 2px solid #FFC107 !important;
    border-radius: 50% !important;
    z-index: 10005 !important;
    
    /* Center the 'X' perfectly */
    display: none;      
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* Ensure it appears when you hover over the avatar area */
#chatbot-container:hover .chatbot-dismiss-btn {
    display: flex !important;
}
/* .chatbot-dismiss-btn:hover {
    background: #ff4d4d; 
} */

.loading-style {
    opacity: 0.6;
    animation: pulse-loading 1.5s ease-in-out infinite;
    font-style: italic;
    background: #444 !important; /* Slightly lighter to distinguish from final messages */
    color: #bbb !important;
}

@keyframes pulse-loading {
    0% {
        opacity: 0.4;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0.4;
        transform: scale(0.98);
    }
}

#chatbot-greeting-bubble {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: var(--accent-color) !important; /* Your theme yellow */
    color: #000;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
    z-index: 10001;
    pointer-events: auto !important; /* Forces the bubble to intercept clicks */
    user-select: none; /* Prevents text highlighting */
}

/* Little arrow for the speech bubble */
#chatbot-greeting-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 25px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: var(--accent-color) transparent;
}

.greeting-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

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

/* Force text inside the yellow bubble to stay black */
#chatbot-greeting-bubble span {
    color: var(--accent-text) !important; 
    font-weight: 600 !important;
    display: block;
    padding-right: 20px; /* Space for the X button */
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure the X button is on top and visible */
.greeting-close-x {
    position: absolute !important;
    top: 5px !important;
    right: 8px !important;
    color: var(--accent-text) !important;
    background: transparent !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: bold !important;
    z-index: 10005 !important; /* Sit above the text span */
    cursor: pointer !important;
    line-height: 1;
    opacity: 0.7;

    /* Prevent text selection when clicking the close button */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;      /* IE 10 and older */
    user-select: none;         /* Standard syntax */

    cursor: pointer !important;
}

.greeting-close-x:focus, 
.greeting-close-x:active,
.greeting-close-x:hover {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.greeting-close-x:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Style for the Contact Card Button in Chat */
.vcard-download-btn {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 8px 15px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    gap: 8px; /* Space between icon and text */
}


.vcard-download-btn i {
    font-size: 1rem;
}

.vcard-download-btn:hover:not(:disabled) {
    background-color: var(--accent-color);
    color: var(--accent-text);
    box-shadow: 0px 4px 10px rgba(255, 189, 57, 0.3);
}

.vcard-download-btn:disabled {
    border-color: #4CAF50;
    color: #4CAF50;
    cursor: default;
}

/* Make all bold words yellow inside the bot's message */
.bot-message strong {
    color: var(--accent-color); /* Gold/Yellow */
    font-weight: 600;
}

/* Style headers for categories */
.bot-message h3 {
    color: var(--accent-color);
    margin: 8px 0 2px 0; /* Reduced top margin, minimal bottom margin */
    font-size: 1.1rem;
    line-height: 1.2;
}

.bot-message ul {
    margin: 0; /* Removes default list padding/margin */
    padding-left: 18px;
    list-style-type: "▹ ";
}

.bot-message li {
    margin-bottom: 2px; /* Minimal gap between items */
    line-height: 1.4;
}
/* =========================================
   MOBILE RESPONSIVENESS
   (Add this at the very end of your CSS)
   ========================================= */

/* =========================================
   FIX: CHATBOT MOBILE LAYOUT (Final)
   ========================================= */
@media (max-width: 480px) {
    
    .chatbot-window {
        /* 1. BREAK OUT of the container */
        position: fixed !important;          /* Relaxes it from the tiny button container */
        z-index: 11000 !important;           /* Ensure it sits on top of everything */
        
        /* 2. SIZING relative to the Screen */
        width: calc(100% - 40px) !important; /* 100% screen width minus 20px margins */
        height: 60vh !important;             /* 60% of screen height */
        max-height: 500px !important;
        
        /* 3. POSITIONING */
        right: 20px !important;
        left: 20px !important;               /* Force centering */
        bottom: 100px !important;            /* Sit above the toggle button */
        margin: 0 !important;                /* Remove native margins */
    }

    /* 4. Global Safety */
    #chatbot-window, 
    .chatbot-input-area,
    #chatbot-input {
        box-sizing: border-box !important;
    }

    /* 5. Stack Input Area */
    .chatbot-input-area {
        flex-direction: column !important; 
        align-items: stretch !important;   
        gap: 10px !important;              
        padding: 12px !important;          
        width: 100% !important;
    }

    #chatbot-input {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 16px !important; 
    }

    #chatbot-send-btn {
        width: 100% !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
/* =========================================
   CONTACT MODAL STYLES (FormSubmit)
   ========================================= */

/* 1. Dark Theme for the Modal Box */
#contactModal .modal-content {
    background: var(--bg-primary) !important;
    border: 1px solid #333 !important;
    max-width: 800px !important; /* Increased from default 500px */
}

/* 2. Input Fields (Name, Email, Message) */
#contactModal .form-control {
    background: var(--bg-card) !important;
    border: 1px solid transparent !important; /* Transparent border to prevent jumping on focus */
    color: var(--text-main) !important;
    transition: all 0.3s ease;
    font-size: 0.95rem !important;  /* Slightly smaller text */
    padding: 15px 15px !important;  /* More breathing room */
    height: auto !important;        /* Let height adjust to content */
    line-height: 1.5 !important;
}


/* 2. Target the Placeholder Text Specifically */
#contactModal .form-control::placeholder {
    font-size: 0.9rem !important;   /* Ensure placeholder fits */
    opacity: 0.7;                   /* Slightly dimmer for style */
    vertical-align: middle;
}

/* 3. Input Focus State (When you click inside) */
#contactModal .form-control:focus {
    background: var(--bg-card) !important;
    border-color: var(--accent-color) !important; /* Theme Yellow Border */
    box-shadow: none !important;      /* Remove default blue glow */
    outline: none;
}

/* 4. Placeholder Text Color */
#contactModal .form-control::placeholder {
    color: var(---text-main) !important;
}

/* 2. Make the Message Box Taller */
#contactModal textarea.form-control {
    height: 250px !important; /* Forces it to be much longer */
    resize: none; /* Optional: prevents user from dragging it */
}

/* 3. Apply Thin Custom Scrollbar (Matching your other sections) */
#contactModal textarea::-webkit-scrollbar {
    width: 6px;
}
#contactModal textarea::-webkit-scrollbar-track {
    background: #2b2b2b; 
    border-radius: 4px;
}
#contactModal textarea::-webkit-scrollbar-thumb {
    background-color: #555; 
    border-radius: 4px;
}
#contactModal textarea::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color); /* Yellow on hover */
}

/* =========================================
   Success Message Styling
   ========================================= */

/* The Container (Hidden by default) */
#success-message.success-container {
    display: none;
    text-align: center;
    padding: 40px 10px;
}

/* The Checkmark Icon */
.success-icon {
    font-size: 4rem; /* Icon size */
    color: var(--accent-color);  /* ⚠️ REPLACE with your Theme Color (e.g., #feca57) */
    margin-bottom: 15px;
}

/* The "Message Sent" Heading */
.success-title {
    font-weight: 700;
    margin-bottom: 10px;
    color: #333; /* Dark text for contrast */
}

/* The Subtext */
.success-text {
    color: var(--text-muted); /* Muted/Grey text */
    font-size: 1rem;
    margin-bottom: 20px;
}

/* The Close Button */
.success-btn {
    background-color: var(--accent-color); /* ⚠️ REPLACE with your Theme Color */
    color: #000; /* Text color on the button */
    border: none;
    padding: 10px 50px;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.success-btn:hover {
    background-color: var(--accent-hover); /* Slightly darker yellow on hover */
    transform: translateY(-2px); /* Slight lift effect */
    color: #000;
}


/* =========================================
   CUSTOM QR POPUP STYLES
   ========================================= */

/* 1. The Floating Button (Bottom-Left) */
#qr-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;              /* Pinned to LEFT to avoid Chatbot */
    width: 60px;
    height: 60px;
    background-color: var(--accent-color) !important; /* Theme Yellow */
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 100001;         /* High Layer */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

#qr-floating-btn:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}

/* 2. The Popup Container */
#qr-popup {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 260px;
    z-index: 10000 !important;
    pointer-events: none !important; /* KEY FIX 1 */
}

/* Visibility States */
.qr-hidden { display: none !important; }

.qr-visible {
    display: block !important; animation: fadeInUp 0.3s forwards;
}

/* 3. The White Bubble Content */
.qr-content {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    pointer-events: auto !important;
}

/* 4. Close 'X' Button */
.qr-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: none !important;
    outline: none !important;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1;
}
.qr-close:hover { 
    color: var(--accent-color); 
}

/* Hide on Mobile (Optional - usually users are already on phone) */
@media (max-width: 768px) {
    #qr-floating-btn { display: none !important; }
    #qr-popup{display: none !important; }
}

.ftco-footer {
    padding: 2em 0;  /* Reduced from 5em to 2em for a slim look */
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .ftco-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ftco-footer p {
    margin-bottom: 0; /* Removes extra space below the text */
    color: var(--text-main)
}

/* =========================================
   ROUND HOVER EFFECTS (Gear & Close Buttons)
   ========================================= */

/* 1. Define the Circle Shape & Alignment */
.config-icon,
#chatbot-close-btn,
.qr-close,
.greeting-close-x {
    width: 40px;           /* Fixed Width */
    height: 40px;          /* Fixed Height */
    border-radius: 50%;    /* Perfect Circle */
    
    display: inline-flex;  /* Centers content */
    align-items: center;
    justify-content: center;
    
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none !important;
    line-height: 1;
}

/* 2. Hover State: Theme Glow Background */
/* Uses var(--glow-color) which is defined in your CSS as a low-opacity theme color */
.config-icon:hover,
.config-icon:active{
    background-color: var(--glow-color); 
    color: var(--accent-color) !important;
}


.qr-close:hover {
    background-color: var(--glow-color); 
    color: var(--text-main) !important;
}

/* 3. Special Case: Buttons on Yellow Backgrounds */
/* (Chatbot Header & Greeting Bubble are already yellow, so we use a dark tint for contrast) */
#chatbot-close-btn:hover,
.greeting-close-x:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Slight dark tint */
    color: #000 !important;
}

/* 4. Fix for Settings Gear Icon Size */
.config-icon i {
    font-size: 1.2rem; /* Ensure icon isn't too small inside the circle */
} 

/* =========================================
   DARK THEME HOVER OVERRIDES
   ========================================= */

/* 1. Settings Gear & QR Close (Sit on Dark Backgrounds) */
/* [data-theme="dark"] .config-icon:hover,
[data-theme="dark"].config-icon:focus,
[data-theme="dark"].config-icon:active{
    background-color: var(--glow-color); 
    color: var(--text-main) !important;
} */

[data-theme="dark"] .qr-close:hover {
    /* Make the circle White/Light with low opacity so it pops against the black */
    background-color: var(--glow-color); 
    color: var(--text-main) !important;
}

/* 2. Chatbot Close & Greeting X (Sit on Yellow Backgrounds) */
/* Note: Since the header stays yellow in Dark Mode, we KEEP the dark circle 
   so it contrasts. But we ensure the text turns Black. */
[data-theme="dark"] #chatbot-close-btn:hover,
[data-theme="dark"] .greeting-close-x:hover {
    background-color: rgba(0, 0, 0, 0.15); /* Keep dark tint */
    color: #000 !important;
}

/* 3. QR Popup Background Fix for Dark Mode */
/* (Ensures the QR box itself turns dark so the white hover looks good) */
[data-theme="dark"] .qr-content {
    background: var(--bg-primary); /* Dark Grey */
    border: 1px solid #333;
    color: #fff;
}

[data-theme="dark"] .qr-content h5 {
    color: #fff !important;
}

[data-theme="dark"] .qr-content p {
    color: #aaa;
}

.modal-header .close {
    width: 40px;
    height: 40px;
    padding: 0 !important;       /* Override Bootstrap's default padding */
    margin: -5px -5px 0 0 !important; /* Fix Bootstrap's negative margin alignment */
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.2s ease;
    opacity: 0.6; /* Default opacity */
    outline: none;
}

/* 2. Hover State (Light Mode) */
/* Uses a dark transparent circle (Standard UI for white backgrounds) */
.modal-header .close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1); 
    color: #000;
}

/* 3. Hover State (Dark Mode) */
/* Uses a white transparent circle so it pops against the dark modal */
[data-theme="dark"] .modal-header .close:hover {
    background-color: rgba(255, 255, 255, 0.15); 
    color: #fff;
}

/* 4. Center the 'X' Icon */
.modal-header .close span {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
    padding-bottom: 2px; /* Slight optical adjustment */
}


/* =========================================
   INTERACTIVE EMAIL COMPONENT
   ========================================= */

/* 1. Wrapper: Acts as the hover trigger */
.email-interactive-wrapper {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 2. Link Styling */
.email-link {
    color: var(--text-main); /* Matches your theme text */
    text-decoration: none;
    /* border-bottom: 1px dashed transparent;  */
    transition: all 0.3s ease;
}

.email-link:hover {
    color: var(--accent-color); /* Turns yellow/accent on hover */
    /* border-bottom-color: var(--accent-color); */
    text-decoration: none;
}


#email-box{
    border-radius: 50%;
    background: var(--glass-bg);
}

/* =========================================
   EMAIL COPY BUTTON (Round Hover Effect)
   ========================================= */

.email-copy-btn {
    /* 1. Shape & Layout */
    width: 35px;             /* Fixed width for circle */
    height: 35px;            /* Fixed height for circle */
    border-radius: 50%;      /* Perfect circle */
    
    display: flex;           /* Centers the icon */
    align-items: center;
    justify-content: center;
    
    background: transparent;
    border: none;
    color: var(--text-muted);
    
    /* 2. Hidden State (Slide Animation) */
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    outline: none !important;
    margin-left: 10px; /* Spacing from the email text */
}

/* 3. Reveal State (When hovering the wrapper) */
.email-interactive-wrapper:hover .email-copy-btn {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* 4. HOVER STATE: The Circle Background */

/* Light Mode Hover */
.email-copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Dark tint circle */
    color: var(--accent-color);
    transform: scale(1.1); /* Slight zoom */
}

/* Dark Mode Hover */
[data-theme="dark"] .email-copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.15); /* White tint circle */
    color: var(--accent-color);
}

/* =========================================
   CONTACT MODAL MOBILE FIX
   ========================================= */
@media (max-width: 768px) {
    /* 1. Ensure the modal fits on screen */
    #contactModal .modal-dialog {
        margin: 10px;          /* Small margin around the edges */
        max-height: 95vh;      /* Max 95% of viewport height */
        display: flex;         /* Helps with centering layout */
        align-items: center;   
    }

    /* 2. Container for the modal content */
    #contactModal .modal-content {
        max-height: 90vh;      /* Limit total height */
        border-radius: 15px;   /* Optional: Nicer rounded corners */
        display: flex;
        flex-direction: column; 
    }

    /* 3. CRITICAL: Make the form area scrollable */
    #contactModal .modal-body {
        overflow-y: auto;       /* Enables vertical scrolling */
        max-height: 65vh;       /* Limit height so header/footer stay visible */
        padding: 15px;          /* Ensure padding matches your design */
        
        /* Smooth scrolling for iOS */
        -webkit-overflow-scrolling: touch; 
    }

    /* 4. Adjust Header/Footer if needed */
    #contactModal .modal-header {
        flex-shrink: 0;         /* Prevent header from shrinking */
    }
}