:root {
    --bg-color: #000000;
    --bg-lighter: #111111;
    --surface-color: #171717;
    --surface-color-light: #262626;
    
    --text-main: #f8fafc;
    --text-muted: #a3a3a3;
    
    --accent-orange: #f97316;
    --accent-amber: #f59e0b;
    --gradient-orange: linear-gradient(135deg, var(--accent-orange), var(--accent-amber));
    --accent-cyan: #0ea5e9; 
    --accent-cyan-light: #38bdf8;
    --btn-text-color: #000;
}

/* --- ULTIMATE FIX FOR MOBILE SCROLL/TOUCH FLICKER --- */
.brand-logo-svg,
.brand-logo-fixed,
.navbar-brand {
    /* Locks the logo into a dedicated 3D hardware layer so it never un-paints on scroll */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    
    /* Prevents the GPU from flashing the background behind the SVG */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    
    /* Stabilizes the rendering during touch/scroll events */
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Remove the heavy filter during scroll/touch to prevent GPU crashing */
.brand-logo-svg circle, 
.brand-logo-fixed circle {
    will-change: stroke, fill;
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.4s ease;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.05em; }

.text-gradient {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-cyan { color: var(--accent-cyan); }
.text-muted-custom { color: var(--text-muted); }

.navbar {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    font-size: 1.4rem;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
}

.navbar-brand:hover span.first-name {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6), 
                 0 0 24px rgba(255, 255, 255, 0.3);
}
.navbar-brand:hover span.last-name {
    text-shadow: 0 0 15px rgba(249, 115, 22, 0.8), 
                 0 0 30px rgba(245, 158, 11, 0.5);
}

.brand-logo-svg { transition: transform 0.4s ease; }
.navbar-brand:hover .brand-logo-svg { transform: scale(1.08); }

.logo-rings {
    transform-origin: 50px 50px; 
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.navbar-brand:hover .logo-rings { transform: rotate(180deg); }

/* Optimized text transition to prevent mobile blinking */
.logo-text { transition: fill 0.3s ease, filter 0.3s ease; }
.navbar-brand:hover .logo-text {
    fill: var(--accent-cyan); 
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.6)); 
}

.navbar-dark .navbar-nav .nav-link { 
    color: var(--text-main); 
    font-weight: 600; 
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 1rem;
    margin-left: 10px;
}
.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--gradient-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.navbar-dark .navbar-nav .nav-link:hover::after { width: 80%; }
.navbar-dark .navbar-nav .nav-link:hover { color: #fff; }

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 10% 50%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 90% 30%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    padding-top: 120px; 
}

@media (max-width: 768px) { .hero-section { padding-top: 140px; } }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.float-anim { animation: float 6s ease-in-out infinite; }

.section-pad { padding: 120px 0; }
.bg-darker { 
    background-color: var(--bg-lighter) !important; 
    transition: background-color 0.4s ease;
}

.glass-card {
    background: linear-gradient(145deg, rgba(23, 23, 23, 0.7), rgba(10, 10, 10, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}
.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: var(--gradient-orange);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}
.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.15);
    background: linear-gradient(145deg, rgba(23, 23, 23, 0.9), rgba(10, 10, 10, 1));
}
.glass-card:hover::before { opacity: 0.6; }

.tool-item {
    background-color: rgba(23, 23, 23, 0.5);
    border-left: 4px solid var(--accent-orange);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}
.tool-item:hover {
    background-color: rgba(38, 38, 38, 0.8);
    border-left-color: var(--accent-amber);
    transform: translateX(10px);
    box-shadow: -5px 10px 20px rgba(0,0,0,0.3);
}

.tool-item.ai-tool {
    border-left-color: var(--accent-cyan);
    background-color: rgba(14, 165, 233, 0.03);
}
.tool-item.ai-tool:hover {
    border-left-color: var(--accent-cyan-light);
    box-shadow: -5px 10px 20px rgba(14, 165, 233, 0.15);
    background-color: rgba(14, 165, 233, 0.08);
}

.tech-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    display: inline-block;
    transition: all 0.3s ease;
}
.tool-item:hover .tech-tag {
    background: var(--gradient-orange);
    border-color: transparent;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

.tool-item.ai-tool:hover .tech-tag {
    background: var(--accent-cyan);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
    color: #000;
}

.btn-custom {
    background: var(--gradient-orange);
    color: var(--btn-text-color);
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}
.btn-custom:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: var(--btn-text-color); 
}

.btn-outline-custom {
    background: transparent;
    color: var(--accent-orange);
    border: 2px solid var(--accent-orange);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}
.btn-outline-custom:hover {
    background: var(--gradient-orange);
    border-color: transparent;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: var(--btn-text-color); 
}

.custom-badge {
    background-color: var(--bg-lighter);
    border: 1px solid #333;
    color: var(--accent-orange);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

.badge-ai {
    background-color: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--accent-cyan);
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.15);
}

.custom-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-main); }
.custom-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.5rem 0; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.custom-content a { color: var(--accent-cyan); text-decoration: none; font-weight: 600;}
.custom-content a:hover { color: var(--accent-cyan-light); text-decoration: underline; }
.custom-content ul, .custom-content ol { margin-bottom: 1.5rem; }
.custom-content li { margin-bottom: 0.5rem; }

/* =========================================
   FLOATING BACKGROUND SWITCHER 
   ========================================= */
.bg-switcher {
    position: fixed;
    left: 15px; 
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 18, 18, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 10px 8px; 
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1050; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.bg-swatch {
    width: 20px; 
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.bg-swatch.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(var(--accent-cyan-rgb), 0.8);
    transform: scale(1.2);
}

.bg-swatch::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 30px; 
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    background: #111;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid #333;
    letter-spacing: 0.5px;
}

.bg-switcher.on-right .bg-swatch::after { right: 30px; left: auto; }
.bg-swatch:hover::after { opacity: 1; visibility: visible; }

@media (max-width: 768px) { .bg-switcher { display: none !important; } }

/* =========================================
   MENU TOGGLE LOGIC (Desktop)
   ========================================= */
@media (min-width: 992px) {
    body.use-classic-nav #smart-island { display: none !important; }
    body.use-classic-nav #master-brand-fixed { display: none !important; }
    body:not(.use-classic-nav) .navbar { display: none !important; }
}

.btn-modern-toggle-link {
    background: transparent !important;
    border: none !important;
    padding: 10px 20px !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.8) !important; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}
.btn-modern-toggle-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important; 
}
.btn-modern-toggle-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: gentle-accent-pulse 2s infinite alternate;
}
@keyframes gentle-accent-pulse {
    from { transform: translateX(-50%) scale(0.6); opacity: 0.4; }
    to { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

/* =========================================
   MODULAR SMART ISLAND (Movable Navigation)
   ========================================= */
#smart-island {
    position: fixed;
    background: rgba(18, 18, 18, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent-orange);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 10px var(--accent-orange);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    z-index: 1050;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 1s ease, box-shadow 1s ease;
    width: max-content;
    height: max-content;
    max-width: 95vw;
}

#smart-island.dock-bottom { bottom: 30px; left: 50%; transform: translateX(-50%); flex-direction: row; }
#smart-island.dock-top    { top: 30px; left: 50%; transform: translateX(-50%); flex-direction: row; }
#smart-island.dock-left   { left: 30px; top: 50%; transform: translateY(-50%); flex-direction: column; border-radius: 30px; }
#smart-island.dock-right  { right: 30px; top: 50%; transform: translateY(-50%); flex-direction: column; border-radius: 30px; }

.island-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 18px;
    margin: 0 2px;
    border-radius: 30px;
    transition: all 0.4s ease;
    white-space: nowrap;
    position: relative;
}

.island-link:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.island-link::after {
    content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%) scale(0);
    width: 4px; height: 4px; border-radius: 50%; background: var(--accent-cyan); transition: transform 0.3s ease;
}
.island-link:hover::after { transform: translateX(-50%) scale(1); }

.island-move-btn {
    background: transparent; border: none; cursor: pointer; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    width: 45px; height: 60px; 
}
#moveIslandBtn, #switchToClassicBtn { color: rgba(255, 255, 255, 0.9); opacity: 1; position: relative; }
#moveIslandBtn:hover { color: var(--accent-amber); transform: scale(1.1); }
#switchToClassicBtn:hover { color: var(--accent-cyan); transform: scale(1.1); }

.island-link-hint {
    font-family: 'Inter', sans-serif; font-size: 0.6rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; margin-top: 4px; color: rgba(255, 255, 255, 0.7); transition: all 0.3s ease;
}
#smart-island:hover .island-link-hint, #switchToClassicBtn:hover .island-link-hint { color: var(--accent-cyan); }

/* =========================================
   PREMIUM GLASS MODAL & CYBER FORM
   ========================================= */
.glass-modal {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(10, 10, 10, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.cyber-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cyber-input:focus {
    background: rgba(14, 165, 233, 0.05) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.15) !important;
    transform: translateY(-2px);
}
.cyber-form .form-floating label { color: rgba(255, 255, 255, 0.4); transition: all 0.3s ease; padding-left: 1rem; }
.cyber-input:focus ~ label, .cyber-input:not(:placeholder-shown) ~ label {
    color: var(--accent-cyan); font-weight: 600; transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}
.cyber-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: white !important;
}

/* =========================================
   FOOTER SPACING 
   ========================================= */
footer { position: relative; z-index: 10; }
footer .container { padding-bottom: 110px !important; }
@media (max-width: 991px) { footer .container { padding-bottom: 0 !important; } }

/* =========================================
   DIGITAL YASEEN AI TERMINAL
   ========================================= */
.chat-terminal {
    position: fixed; right: 0; top: 0; 
    height: 100%; /* Fallback for older devices */
    height: 100dvh; /* The magic fix: Dynamic height avoids mobile URL bars! */
    width: 400px; max-width: 100vw;
    background: rgba(12, 12, 12, 0.95); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.1); z-index: 3000; display: flex; flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: -10px 0 40px rgba(0,0,0,0.8);
}
.chat-terminal.closed { transform: translateX(100%); }
.chat-header { padding: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.message { padding: 12px 16px; border-radius: 12px; font-size: 0.9rem; line-height: 1.6; max-width: 85%; word-wrap: break-word; }
.ai-message { background: rgba(14, 165, 233, 0.08); border: 1px solid rgba(14, 165, 233, 0.2); color: #e0f2fe; align-self: flex-start; border-bottom-left-radius: 2px; }
.user-message { background: var(--gradient-orange); color: #000; font-weight: 500; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-input-area { 
    padding: 20px; 
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); /* Adds padding for the iPhone home bar */
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    display: flex; gap: 10px; 
    flex-shrink: 0; /* Prevents the text box from being squashed on small screens */
}
.btn-ai-trigger:hover { transform: scale(1.05); }

/* =========================================
   EMERGENCY OVERLAP FIX 
   ========================================= */
@media screen and (max-width: 1450px) {
    .first-name, .last-name { display: none !important; visibility: hidden !important; width: 0 !important; height: 0 !important; overflow: hidden !important; }
    #smart-island { transform: translateX(-50%) scale(0.85) !important; white-space: nowrap !important; }
    .smart-island { padding: 4px 10px !important; }
    .island-link { padding: 6px 10px !important; font-size: 0.7rem !important; }
}

/* =========================================
   ENHANCED THEME TOGGLE BUTTON
   ========================================= */
.theme-toggle-btn {
    color: rgba(255, 255, 255, 0.9) !important; border: 1px solid rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.05) !important; border-radius: 50% !important; 
    width: 36px !important; height: 36px !important; display: flex !important;
    align-items: center !important; justify-content: center !important; margin: 0 8px !important;
    transition: all 0.3s ease !important; padding: 0 !important; cursor: pointer;
}
.theme-toggle-btn:hover { color: var(--accent-amber) !important; border-color: var(--accent-amber) !important; background: rgba(255, 255, 255, 0.1) !important; transform: scale(1.1) !important; }

/* =========================================
   LIGHT MODE DYNAMIC OVERRIDES
   ========================================= */
body.light-mode {
    --bg-color: #f4f4f5 !important; --bg-lighter: #ffffff !important;
    --text-main: #18181b !important; --text-muted: #52525b !important;
    background-color: var(--bg-color) !important; color: var(--text-main) !important;
}
body.light-mode .text-white { color: #18181b !important; }
body.light-mode .bg-darker { background-color: var(--bg-lighter) !important; }
body.light-mode .bg-black { background-color: #ffffff !important; }
body.light-mode .glass-card { background: linear-gradient(145deg, #ffffff, #f4f4f5) !important; border: 1px solid #e4e4e7 !important; box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important; }
body.light-mode .glass-modal { background: rgba(255,255,255,0.95) !important; }
body.light-mode .tool-item { background-color: #ffffff !important; box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; }
body.light-mode .navbar { background-color: rgba(255, 255, 255, 0.95) !important; border-bottom: 1px solid #e4e4e7 !important; }
body.light-mode .navbar-dark .navbar-nav .nav-link, body.light-mode .navbar-brand { color: #18181b !important; }
body.light-mode #smart-island { background: rgba(255, 255, 255, 0.85) !important; }
body.light-mode .island-link, body.light-mode .island-move-btn, body.light-mode .btn-modern-toggle-link { color: #18181b !important; }
body.light-mode .theme-toggle-btn { color: #18181b !important; border-color: rgba(0, 0, 0, 0.2) !important; background: rgba(0, 0, 0, 0.03) !important; }
body.light-mode .theme-toggle-btn:hover { color: var(--accent-orange) !important; border-color: var(--accent-orange) !important; background: rgba(0, 0, 0, 0.08) !important; }
body.light-mode .chat-terminal { background: rgba(255, 255, 255, 0.95) !important; border-left: 1px solid #e4e4e7 !important; }
body.light-mode .cyber-input { background: #ffffff !important; border: 1px solid #d4d4d8 !important; color: #18181b !important; }
body.light-mode .text-muted-custom { color: var(--text-muted) !important; }
body.light-mode .brand-name-fixed span { color: #18181b !important; }
body.light-mode .cyber-form .form-floating label { color: #71717a !important; }

/* =========================================
   LIGHT MODE REFINEMENTS (Constellation Edition)
   ========================================= */
body.light-mode .dynamic-main-ring,
body.light-mode .dynamic-sat-dot,
body.light-mode .logo-text-yk,
body.light-mode .brand-logo-svg circle,
body.light-mode .brand-logo-svg text { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)) !important; }

/* Constellation Stars in Light Mode */
body.light-mode .tech-node-circle {
    background: transparent !important; border: none !important; box-shadow: none !important;
}

body.light-mode .tech-node-circle::before {
    background: var(--accent-cyan) !important;
    box-shadow: 0 0 10px 2px rgba(14, 165, 233, 0.4) !important;
}

body.light-mode .tech-node-circle:hover::before {
    background: var(--accent-orange) !important;
    box-shadow: 0 0 15px 4px rgba(249, 115, 22, 0.5) !important;
}

body.light-mode .node-icon-circle {
    color: #18181b !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)) !important;
}

body.light-mode .tech-node-circle:hover .node-icon-circle {
    color: var(--accent-orange) !important;
}

body.light-mode .node-title-circle {
    color: #52525b !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}

body.light-mode .tech-node-circle:hover .node-title-circle {
    color: var(--accent-orange) !important;
}

body.light-mode .stationary-center-panel {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #18181b !important;
}

body.light-mode .badge-ai {
    background-color: rgba(14, 165, 233, 0.1) !important; color: #0369a1 !important; 
    border-color: rgba(14, 165, 233, 0.4) !important; box-shadow: none !important; font-weight: 700 !important;
}

body.light-mode .chat-terminal .ai-message { color: #0f172a !important; background: rgba(14, 165, 233, 0.15) !important; border-color: rgba(14, 165, 233, 0.3) !important; }
body.light-mode .chat-terminal .user-message { color: #ffffff !important; }
body.light-mode .chat-header h5 { color: #18181b !important; }

/* Invert the hamburger menu icon color in light mode */
body.light-mode .navbar-toggler,
[data-theme="light"] .navbar-toggler,
.light-theme .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.5); /* Makes the border visible */
}

body.light-mode .navbar-toggler-icon,
[data-theme="light"] .navbar-toggler-icon,
.light-theme .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(0%);
}

/* --- ORBIT FOCUS OVERLAY --- */
.orbit-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0); /* Starts shrunk to zero */
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* The White Background */
    border-radius: 50%; /* Perfect circle on desktop */
    z-index: 100; /* Puts it above everything else in the orbit */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem;
    opacity: 0;
    pointer-events: none; /* Can't be clicked when hidden */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* The Active State (When Clicked) */
.orbit-overlay.active {
    transform: translate(-50%, -50%) scale(1); /* Expands to full size */
    opacity: 1;
    pointer-events: auto;
}

/* The Close Button inside the Overlay */
#closeOrbitOverlay {
    position: absolute;
    top: 15%;
    right: 15%;
    z-index: 101;
    cursor: pointer;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .orbit-overlay {
        width: 95vw; /* Takes up almost the whole screen width */
        height: auto; /* Adapts to text height */
        min-height: 300px;
        /* Critical: Changes from a circle to a rounded rectangle on mobile so text fits! */
        border-radius: 20px; 
        padding: 2rem;
    }
    
    #closeOrbitOverlay {
        top: 15px;
        right: 15px;
    }
}

/* =========================================
   ULTIMATE FIX FOR ORBIT SYNC (TEXT HORIZONTAL)
   ========================================= */

/* Mobile: Force BOTH the main ring and the counter-rotating text to keep running together */
@media (hover: none) and (pointer: coarse) {
    .circle-viz-wrapper:hover .rotating-container,
    .circle-viz-wrapper:hover .tech-node-circle,
    .rotating-container:hover,
    .rotating-container:hover .tech-node-circle,
    .tech-node-circle:hover {
        animation-play-state: running !important;
    }
}

/* Desktop: Force BOTH the main ring and the counter-rotating text to pause together */
@media (hover: hover) and (pointer: fine) {
    .circle-viz-wrapper:hover .rotating-container,
    .circle-viz-wrapper:hover .tech-node-circle {
        animation-play-state: paused !important;
    }
}

/* =========================================
   ORBIT NODE SHARPNESS & MOBILE OVERFLOW FIX
   ========================================= */

/* 1. Hardware lock to stop the "wobble" and keep text dead-center */
.tech-node-circle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    
    /* Forces the GPU to render it as a solid 3D object to prevent sub-pixel jitter */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    
    /* REMOVED overflow: hidden; because it causes the hard cut-off on curved borders */
    padding: 2px !important;
}

/* =========================================
   ORBIT NODE MOBILE CONTENT TRUNCATION FIX
   ========================================= */
@media (max-width: 768px) {
    .tech-node-circle {
        width: 75px !important; 
        height: 75px !important; 
    }

    .node-title-circle {
        font-size: 0.5rem !important; 
        line-height: 1.1 !important; 
        white-space: normal !important;
        word-break: break-word !important;
    }
    
    .node-icon-circle {
        font-size: 1rem !important; 
        margin-bottom: 0 !important;
        line-height: 1 !important;
    }
}

/* =========================================
   HEADLESS TRANSLATION ENGINE (INVISIBLE UI)
   ========================================= */

/* 1. Nuke the banner, tooltips, skiptranslate iframes, and floating bubbles */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.skiptranslate,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
#google_translate_element,
div[id^="goog-gt-"],
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 2. Stop Google's "translated" state from pushing the body down 40px */
html.translated-ltr,
body.translated-ltr,
html.translated-rtl,
body.translated-rtl,
html,
body {
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 3. Remove the weird yellow hover highlights on text */
.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* =========================================
   ANTI-SQUISH NAV BUTTONS FIX
   ========================================= */
.navbar-nav .btn,
.navbar-nav button,
#smart-island button {
    white-space: nowrap !important; /* Prevents text from stacking on two lines */
    flex-shrink: 0 !important; /* Prevents the button from shrinking horizontally */
}

/* =========================================
   PREMIUM TERMINAL CLOSE BUTTON (BULLETPROOF)
   ========================================= */
.chat-close-circle {
    background: var(--gradient-orange) !important; 
    color: #000 !important; 
    border: none !important;
    outline: none !important; /* Kills default browser borders */
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.6rem !important; 
    font-weight: bold !important;
    line-height: 0 !important; 
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    flex-shrink: 0 !important;
    padding-bottom: 3px !important;
    
    /* NEW: Completely stops the ugly blue text highlighting */
    -webkit-user-select: none !important; 
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important; 
    text-decoration: none !important;
}

/* Ensure hover, focus, and click states stay perfectly clean */
.chat-close-circle:hover,
.chat-close-circle:focus,
.chat-close-circle:active {
    transform: scale(1.15) !important;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.6) !important;
    outline: none !important;
    text-decoration: none !important;
}

/* =========================================
   DESKTOP NAVBAR SCROLL ANIMATION
   ========================================= */
@media (min-width: 992px) {
    /* Set up the text for a smooth sliding animation for BOTH navbars */
    .navbar-brand span.first-name, 
    .navbar-brand span.last-name,
    .brand-name-fixed {
        display: inline-block;
        transition: max-width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease, margin 0.4s ease, padding 0.4s ease;
        max-width: 300px; /* Gives plenty of room for the full name */
        overflow: hidden;
        white-space: nowrap;
        vertical-align: middle;
    }

    /* When the user scrolls, mathematically shrink it to zero for BOTH navbars */
    body.nav-scrolled .navbar-brand span.first-name,
    body.nav-scrolled .navbar-brand span.last-name,
    body.nav-scrolled .brand-name-fixed {
        max-width: 0 !important;
        opacity: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}