@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,700&family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ==========================================================================
   DESIGN SYSTEM CORE TOKENS (LIGHT MODE DEFAULT)
   ========================================================================== */
:root {
    /* Base Surface Architecture - Clean White Solid */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    /* Refined Minimal Accent Tokens */
    --accent-sage: #059669;
    --accent-sage-light: rgba(5, 150, 105, 0.08);
    --accent-blue: #0284c7;
    --accent-blue-light: rgba(2, 132, 199, 0.08);
    --accent-cyan: #0284c7;
    --accent-emerald: #059669;
    --accent-glow: transparent;
    --accent-gradient: #0284c7;
    --accent-gradient-glow: #0284c7;
    --accent-red: #e11d48;
    --accent-red-light: rgba(225, 29, 72, 0.08);

    /* Minimalist Card & UI Framing */
    --menu-bg: rgba(255, 255, 255, 0.96);
    --card-border: rgba(0, 0, 0, 0.07);
    --card-border-hover: rgba(0, 0, 0, 0.15);
    --card-border-glow: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-hover: rgba(255, 255, 255, 0.98);
    --pill-border: rgba(0, 0, 0, 0.08);

    /* Geometry & Clean Shadows */
    --radius-max: 14px;
    --radius-lg: 12px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --radius-pill: 100px;
    --shadow-soft: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08);

    /* Cursor Architecture (Light Default) */
    --cursor-dot: #0f172a;
    --cursor-ring: rgba(15, 23, 42, 0.4);
    --cursor-ring-hover: #0f172a;
    --cursor-ring-hover-bg: rgba(15, 23, 42, 0.06);

    /* Typography Hierarchy */
    --font-display: 'Plus Jakarta Sans', 'Outfit', -apple-system, sans-serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Space Grotesk', monospace;
}

/* ==========================================================================
   LIGHT MODE EXPLICIT SELECTORS
   ========================================================================== */
html.theme-light,
body.theme-light {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --accent-sage: #059669;
    --accent-sage-light: rgba(5, 150, 105, 0.08);
    --accent-blue: #0284c7;
    --accent-blue-light: rgba(2, 132, 199, 0.08);
    --accent-cyan: #0284c7;
    --accent-emerald: #059669;
    --accent-glow: transparent;
    --accent-gradient: #0284c7;
    --accent-gradient-glow: #0284c7;
    --accent-red: #e11d48;
    --accent-red-light: rgba(225, 29, 72, 0.08);

    --menu-bg: rgba(255, 255, 255, 0.96);
    --card-border: rgba(0, 0, 0, 0.07);
    --card-border-hover: rgba(0, 0, 0, 0.15);
    --card-border-glow: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-hover: rgba(255, 255, 255, 0.98);
    --pill-border: rgba(0, 0, 0, 0.08);

    --shadow-soft: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08);

    --cursor-dot: #0f172a;
    --cursor-ring: rgba(15, 23, 42, 0.4);
    --cursor-ring-hover: #0f172a;
    --cursor-ring-hover-bg: rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   DARK MODE DESIGN SYSTEM TOKENS
   ========================================================================== */
html.theme-dark,
body.theme-dark {
    --bg-base: #111216;
    --bg-surface: #181920;
    --bg-surface-elevated: #20222a;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --accent-sage: #ffffff;
    --accent-sage-light: rgba(255, 255, 255, 0.08);
    --accent-blue: #94a3b8;
    --accent-blue-light: rgba(148, 163, 184, 0.08);
    --accent-cyan: #38bdf8;
    --accent-emerald: #10b981;
    --accent-glow: transparent;
    --accent-gradient: #ffffff;
    --accent-gradient-glow: #ffffff;
    --accent-red: #f43f5e;
    --accent-red-light: rgba(244, 63, 94, 0.12);

    --menu-bg: #111216;
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(255, 255, 255, 0.22);
    --card-border-glow: transparent;
    --card-bg: #181920;
    --card-bg-hover: #20222a;
    --pill-border: rgba(255, 255, 255, 0.08);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);

    --cursor-dot: #ffffff;
    --cursor-ring: rgba(255, 255, 255, 0.4);
    --cursor-ring-hover: #ffffff;
    --cursor-ring-hover-bg: rgba(255, 255, 255, 0.12);
}


::selection {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.theme-light ::selection {
    background-color: rgba(0, 0, 0, 0.15);
    color: #000000;
}

/* ==========================================================================
   GLOBAL RESETS & CLEAN MINIMALIST BACKGROUND
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
}

*:focus,
*:focus-visible,
*:active {
    outline: none !important;
}

button, a, input, select, textarea, [tabindex], [role="button"] {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

button::-moz-focus-inner {
    border: 0 !important;
    padding: 0 !important;
}

html {
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-dark);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/* ==========================================================================
   ULTRA-CLEAN PLAIN MATTE SURFACE BACKGROUND
   ========================================================================== */
.ambient-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: -100 !important;
    overflow: hidden;
    background: var(--bg-base) !important;
    pointer-events: none !important;
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light .ambient-bg {
    background: var(--bg-base) !important;
}

/* Neutralize all floating gradient blobs for ultra-minimalist plain surface */
.blob {
    display: none !important;
}


/* ==========================================================================
   CUSTOM HARDWARE DUAL-ELEMENT CURSOR RETICLE
   ========================================================================== */
@media (pointer: fine) {
    body.has-custom-cursor,
    body.has-custom-cursor * {
        cursor: none !important;
    }

    body.has-custom-cursor input,
    body.has-custom-cursor textarea,
    body.has-custom-cursor [contenteditable="true"] {
        cursor: text !important;
    }

    .cursor-dot, .cursor-ring {
        position: fixed;
        top: 0;
        left: 0;
        border-radius: 50%;
        pointer-events: none;
        z-index: 999999;
        transform: translate(-50%, -50%);
        will-change: transform, opacity;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease, width 0.22s cubic-bezier(0.16, 1, 0.3, 1), height 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
    }

    body.cursor-active:not(.cursor-idle):not(.cursor-over-iframe) .cursor-dot,
    body.cursor-active:not(.cursor-idle):not(.cursor-over-iframe) .cursor-ring {
        opacity: 1;
        visibility: visible;
    }

    body.cursor-idle .cursor-dot,
    body.cursor-idle .cursor-ring,
    body.cursor-over-iframe .cursor-dot,
    body.cursor-over-iframe .cursor-ring {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .cursor-dot {
        width: 4px;
        height: 4px;
        background-color: var(--cursor-dot, #0f172a);
    }

    .cursor-ring {
        width: 22px;
        height: 22px;
        border: 1.2px solid var(--cursor-ring, rgba(15, 23, 42, 0.32));
        background-color: transparent;
    }

    .cursor-ring.hovered {
        border-color: var(--cursor-ring-hover, #0f172a);
        background-color: var(--cursor-ring-hover-bg, rgba(15, 23, 42, 0.05));
        width: 36px;
        height: 36px;
    }

    /* Explicit Light Mode Overrides */
    html.theme-light .cursor-dot,
    body.theme-light .cursor-dot {
        background-color: #0f172a !important;
    }

    html.theme-light .cursor-ring,
    body.theme-light .cursor-ring {
        border-color: rgba(15, 23, 42, 0.32) !important;
    }

    html.theme-light .cursor-ring.hovered,
    body.theme-light .cursor-ring.hovered {
        border-color: #0f172a !important;
        background-color: rgba(15, 23, 42, 0.06) !important;
    }

    /* Explicit Dark Mode Overrides */
    html.theme-dark .cursor-dot,
    body.theme-dark .cursor-dot {
        background-color: #ffffff !important;
    }

    html.theme-dark .cursor-ring,
    body.theme-dark .cursor-ring {
        border-color: rgba(255, 255, 255, 0.35) !important;
    }

    html.theme-dark .cursor-ring.hovered,
    body.theme-dark .cursor-ring.hovered {
        border-color: #ffffff !important;
        background-color: rgba(255, 255, 255, 0.12) !important;
    }

    /* Exempt iframes from custom cursor concealment so games have natural pointer */
    iframe,
    .game-iframe-wrapper,
    #gameIframeModal iframe {
        cursor: auto !important;
    }
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* ==========================================================================
   LAYOUT MATRICES & UNIVERSAL DYNAMIC SCALING CONTAINERS
   ========================================================================== */
.page-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
    flex-grow: 1;
    position: relative;
}

.page-wrapper > main,
main#swup,
.transition-fade {
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

#smooth-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: clamp(6rem, 12vh, 9rem);
    box-sizing: border-box;
}

.main-screen {
    min-height: 100dvh; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 3rem 1.5rem;
    flex-shrink: 0;
}

.container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3.5rem);
}

section {
    padding: clamp(3.5rem, 7vw, 6.5rem) 0;
    width: 100%;
    position: relative;
}

/* ==========================================================================
   GLOBAL NAVIGATION BAR & SLICK MINIMAL MENU OVERLAY
   ========================================================================== */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: clamp(1.5rem, 3.5vh, 2.5rem) clamp(1.75rem, 5vw, 4.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10005;
    pointer-events: none;
    transition: padding 0.3s ease;
}

/* Bigger, prominent YP Logo */
.logo {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2.8vw, 2.1rem);
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.035em;
    pointer-events: auto;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.logo:hover {
    opacity: 0.7;
    color: var(--text-dark);
    transform: translateY(-1px);
    border: none !important;
}

/* Bigger, slick Hamburger Menu Button */
.hamburger {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: 46px;
    height: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 7px;
    cursor: pointer;
    pointer-events: auto;
    padding: 6px 0 6px 6px !important;
    margin: 0 !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent !important;
}

.hamburger:focus,
.hamburger:focus-visible,
.hamburger:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.hamburger:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.hamburger .line {
    width: 32px;
    height: 2.5px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s ease, background-color 0.2s ease;
}

.hamburger .line:nth-child(2) {
    width: 24px;
}

.hamburger:hover .line:nth-child(2) {
    width: 32px;
}

body.menu-open .hamburger .line:nth-child(1) {
    width: 30px;
    transform: translateY(4.75px) rotate(45deg);
}

body.menu-open .hamburger .line:nth-child(2) {
    width: 30px;
    transform: translateY(-4.75px) rotate(-45deg);
}

/* Fullscreen Slick Minimal Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 9, 13, 0.96);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 10004;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    padding: clamp(5rem, 12vh, 8rem) clamp(1.75rem, 5vw, 4.5rem) clamp(3rem, 6vh, 4.5rem);
}

body.theme-light .menu-overlay {
    background: rgba(255, 255, 255, 0.96);
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Left-Aligned Minimal Menu Links - Aligned with YP Logo */
.menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: clamp(0.7rem, 2vh, 1.35rem);
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
    width: 100%;
    max-width: 1000px;
    padding: 0;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menu-links::-webkit-scrollbar {
    display: none;
}

.menu-links li {
    overflow: visible;
    width: auto;
    padding: 0;
}

body.menu-open .menu-links li {
    animation: menuSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.menu-open .menu-links li:nth-child(1) { animation-delay: 0.02s; }
body.menu-open .menu-links li:nth-child(2) { animation-delay: 0.04s; }
body.menu-open .menu-links li:nth-child(3) { animation-delay: 0.06s; }
body.menu-open .menu-links li:nth-child(4) { animation-delay: 0.08s; }
body.menu-open .menu-links li:nth-child(5) { animation-delay: 0.10s; }

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-links a {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.8vw, 3.6rem);
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.03em;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease, opacity 0.25s ease;
}

.menu-links a::before {
    content: '';
    position: absolute;
    left: -20px;
    width: 5px;
    height: 0;
    background: var(--accent-cyan, #38bdf8);
    border-radius: 3px;
    opacity: 0;
    transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.menu-links a:hover {
    transform: translateX(18px);
    opacity: 1;
    color: var(--accent-cyan, #38bdf8);
}

.menu-links a:hover::before {
    height: 65%;
    opacity: 1;
}

/* Menu Bottom Controls (Sign Out Icon Button + Settings Button) */
.menu-bottom-controls {
    position: absolute;
    bottom: clamp(2rem, 4vh, 3.5rem);
    right: clamp(2rem, 6vw, 6rem);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    z-index: 10;
}

.menu-action-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red, #f43f5e);
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 0;
    margin: 0;
}

.menu-action-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.menu-action-btn:hover {
    color: #ffffff;
    background: var(--accent-red, #f43f5e);
    border-color: var(--accent-red, #f43f5e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

body.theme-light .menu-action-btn {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.theme-light .menu-action-btn:hover {
    background: var(--accent-red, #e11d48);
    color: #ffffff;
    border-color: var(--accent-red, #e11d48);
}

/* Settings Toggle Button (Icon Button) */
.settings-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.settings-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.settings-toggle-btn:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.settings-toggle-btn:hover svg {
    transform: rotate(45deg);
}

body.theme-light .settings-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.theme-light .settings-toggle-btn:hover {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   STATIONARY SLIDING FOOTER SCREEN & PAGE SHIFT
   ========================================================================== */
.page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    will-change: transform;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

body.footer-open .page-wrapper {
    transform: translateY(-235px) !important;
}

.footer-screen {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-bottom: none; 
    border-radius: 22px 22px 0 0; 
    padding: 2.5rem 2.2rem max(2rem, calc(1.5rem + env(safe-area-inset-bottom))) 2.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    width: 100%;
    max-width: 380px; 
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    position: fixed;
    z-index: 10000;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%); 
    box-sizing: border-box;
    will-change: transform;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
                max-width 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
                padding 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

body.footer-open .footer-screen {
    transform: translate(-50%, 0) !important;
}

.footer-purpose {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 500;
}

.legal-links {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 0.5rem;
}

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover { 
    color: var(--accent-sage); 
}

.contact-trigger-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

.contact-trigger-btn:hover {
    color: var(--text-dark);
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.scroll-arrow {
    position: fixed;
    bottom: max(1.75rem, calc(1rem + env(safe-area-inset-bottom)));
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), 
                visibility 0.4s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                bottom 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem;
    z-index: 10001;
    cursor: pointer;
}

.scroll-arrow.visible {
    opacity: 0.55;
    visibility: visible;
    pointer-events: auto;
}

.scroll-arrow.visible:hover { 
    opacity: 1; 
    color: var(--text-dark); 
    transform: translateX(-50%) translateY(3px);
}

body.footer-open .scroll-arrow {
    bottom: max(15rem, calc(14rem + env(safe-area-inset-bottom)));
    opacity: 0.9 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body.footer-open .scroll-arrow:hover {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(-2px);
}

.arrow-icon { 
    will-change: transform; 
    width: 26px !important;
    height: 26px !important;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body.footer-open .arrow-icon {
    transform: rotate(180deg);
}

/* Hide scroll-arrow completely on Labs hub and games */
.lab-folders-grid ~ .scroll-arrow,
.fun-grid ~ .scroll-arrow,
body[data-page="fun"] .scroll-arrow {
    display: none !important;
}

/* ==========================================================================
   LENIS SMOOTH SCROLL INTEGRATION
   ========================================================================== */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* ==========================================================================
   LABS (EXPERIMENTS) CATEGORY FOLDERS & POPUP MODALS
   ========================================================================== */
.lab-folders-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 6rem;
    position: relative;
    z-index: 5;
}

.lab-folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
    text-decoration: none;
    user-select: none;
}

/* Spotlight overlay disabled for ultra-minimalist plain aesthetic */
.folder-card::before {
    display: none !important;
}

.folder-card {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: none !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.2s ease, 
                background-color 0.2s ease;
    will-change: transform;
}

/* Centered SVG icon inside the shape */
.folder-card svg {
    width: 44px;
    height: 44px;
    color: var(--text-dark, #0f172a) !important;
    stroke: currentColor !important;
    position: relative;
    z-index: 2;
    transition: transform 0.25s ease, color 0.2s ease;
}

.folder-card:hover {
    transform: translateY(-4px);
    border-color: rgba(2, 132, 199, 0.5);
    background: #ffffff;
    box-shadow: none !important;
}

.folder-card:hover svg {
    transform: scale(1.1);
    color: #0284c7 !important;
}

/* Minimalist folder label */
.folder-label {
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-muted, #64748b);
    text-align: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.lab-folder-item:hover .folder-label {
    color: var(--text-dark, #0f172a);
    transform: translateY(-2px);
}

/* Dark mode folder card overrides */
html.theme-dark .folder-card,
body.theme-dark .folder-card {
    background: #181920;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
}

html.theme-dark .folder-card svg,
body.theme-dark .folder-card svg {
    color: #f8fafc !important;
}

html.theme-dark .folder-card:hover,
body.theme-dark .folder-card:hover {
    background: #20222a;
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: none !important;
    transform: translateY(-4px);
}

html.theme-dark .folder-card:hover svg,
body.theme-dark .folder-card:hover svg {
    color: #38bdf8 !important;
}

html.theme-dark .folder-label,
body.theme-dark .folder-label {
    color: #94a3b8;
}

html.theme-dark .lab-folder-item:hover .folder-label,
body.theme-dark .lab-folder-item:hover .folder-label {
    color: #f8fafc;
}

@media (max-width: 840px) {
    .lab-folders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem;
        max-width: 440px;
    }
    .folder-card {
        border-radius: 28px;
    }
    .folder-card svg {
        width: 38px;
        height: 38px;
    }
}

/* Experiments Popup Modal Overlay */
.folder-modal-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vh, 3rem) 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    box-sizing: border-box;
    margin: 0;
}

.folder-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.folder-modal-dialog {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    max-width: 860px;
    width: min(860px, calc(100vw - 2.5rem));
    max-height: 88vh;
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
    margin: auto;
    box-sizing: border-box;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.folder-modal-overlay.active .folder-modal-dialog {
    transform: scale(1) translateY(0);
}

.folder-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem 1.25rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.folder-modal-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-category-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    margin: 0;
    letter-spacing: -0.02em;
}

.folder-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    letter-spacing: 0.01em;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.5);
    display: inline-block;
    animation: folderPulse 1.8s infinite ease-in-out;
}

@keyframes folderPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

.folder-modal-close {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.folder-modal-close:hover {
    color: var(--text-dark, #0f172a);
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.16);
    transform: scale(1.08) rotate(90deg);
}

.folder-modal-body {
    padding: 1.75rem 2rem 2.25rem 2rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    scrollbar-width: thin;
}

.experiment-item-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark, #0f172a);
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 130px;
}

.experiment-item-card:hover {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.45);
    transform: translateY(-2px);
    box-shadow: none !important;
}

.experiment-item-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark, #0f172a);
    margin: 0;
}

.experiment-item-desc {
    font-size: 0.88rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
    margin: 0.35rem 0 0;
    font-weight: 400;
}

.experiment-launch-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--os-accent, #0284c7);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s ease, gap 0.2s ease;
}

.experiment-item-card:hover .experiment-launch-tag {
    gap: 8px;
}

/* ==========================================================================
   EXPLICIT DARK MODE OVERRIDES FOR MODAL & FOLDERS
   ========================================================================== */
html.theme-dark .folder-modal-overlay,
body.theme-dark .folder-modal-overlay {
    background: rgba(5, 7, 12, 0.82);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
}

html.theme-dark .folder-modal-dialog,
body.theme-dark .folder-modal-dialog {
    background: rgba(17, 18, 22, 0.94);
    backdrop-filter: blur(36px) saturate(190%);
    -webkit-backdrop-filter: blur(36px) saturate(190%);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

html.theme-dark .folder-modal-header,
body.theme-dark .folder-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark .modal-category-title,
body.theme-dark .modal-category-title {
    color: #f8fafc;
}

html.theme-dark .folder-count-pill,
body.theme-dark .folder-count-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

html.theme-dark .pulse-dot,
body.theme-dark .pulse-dot {
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

html.theme-dark .folder-modal-close,
body.theme-dark .folder-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

html.theme-dark .folder-modal-close:hover,
body.theme-dark .folder-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

html.theme-dark .experiment-item-card,
body.theme-dark .experiment-item-card {
    background: #181920;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    box-shadow: none !important;
}

html.theme-dark .experiment-item-card:hover,
body.theme-dark .experiment-item-card:hover {
    background: #20222a;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: none !important;
}

html.theme-dark .experiment-item-title,
body.theme-dark .experiment-item-title {
    color: #f8fafc;
}

html.theme-dark .experiment-item-desc,
body.theme-dark .experiment-item-desc {
    color: #94a3b8;
}

html.theme-dark .experiment-launch-tag,
body.theme-dark .experiment-launch-tag {
    color: #38bdf8;
}

/* ==========================================================================
   INTERACTIVE GAME IFRAME MODAL (CABINET)
   ========================================================================== */
.game-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10006;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.6rem, 2vh, 1.75rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    box-sizing: border-box;
}

.game-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.game-modal-dialog {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    max-width: 880px;
    width: min(880px, calc(100vw - 1.5rem));
    height: min(860px, calc(100vh - 2.5rem));
    height: min(860px, calc(100dvh - 2.5rem));
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.game-modal-dialog.is-fullscreen {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
}

.game-modal-overlay.active .game-modal-dialog {
    transform: scale(1) translateY(0);
}

.game-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    flex-shrink: 0;
}

.game-modal-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.game-modal-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.game-modal-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-icon-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.game-icon-btn:hover {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.game-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

.game-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

html.theme-dark .game-modal-dialog,
body.theme-dark .game-modal-dialog {
    background: #12141a;
    border-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .game-modal-header,
body.theme-dark .game-modal-header {
    background: #171922;
    border-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark .game-modal-title,
body.theme-dark .game-modal-title {
    color: #f8fafc;
}

html.theme-dark .game-icon-btn,
body.theme-dark .game-icon-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

html.theme-dark .game-icon-btn:hover,
body.theme-dark .game-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

@media (max-width: 768px) {
    .lab-folders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
        padding-bottom: 4rem;
    }
    .folder-modal-dialog {
        border-radius: 20px;
        max-height: 90dvh;
    }
    .folder-modal-body {
        grid-template-columns: 1fr;
        padding: 1.25rem 1.5rem 1.75rem;
    }
}

/* Universal Tab Buttons & Filter Controls */
.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.6rem 1.35rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: #ffffff;
    color: #090a0f;
    border-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

body.theme-light .tab-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
}

body.theme-light .tab-btn:hover {
    background: rgba(0, 0, 0, 0.07);
    color: var(--text-dark);
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

body.theme-light .tab-btn.active {
    background: #ffffff;
    color: #090a0f;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Light Theme Support */
body.theme-light .footer-screen {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.06);
}

body.theme-light .contact-trigger-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.65);
}

body.theme-light .contact-trigger-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   ENHANCED SETTINGS MODAL / THEME ENGINE DRAWER
   ========================================================================== */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10009;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1.5rem;
}

body.settings-open .settings-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.settings-panel {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
    max-height: 88dvh;
    overflow-y: auto;
    box-shadow: var(--shadow-soft);
    transform: translateY(15px);
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: relative;
}

body.settings-open .settings-panel {
    transform: translateY(0);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}

.settings-close {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-close:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

.settings-section-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.85rem;
}

.theme-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.theme-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
}

.theme-btn.active {
    background: #ffffff;
    color: #090a0f;
    border-color: #ffffff;
}

body.theme-light .theme-btn.active {
    background: #09090b;
    color: #ffffff;
    border-color: #09090b;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.65rem;
}

.color-btn {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    transform: scale(1.15);
    border-color: var(--text-dark);
}

.color-default { background: #ffffff; }
.color-emerald { background: #10b981; }
.color-amber { background: #f59e0b; }
.color-violet { background: #8b5cf6; }
.color-rose { background: #f43f5e; }
.color-monochrome { background: #94a3b8; }

/* ==========================================================================
   CONTACT REQUEST MODAL / POPUP OVERLAY
   ========================================================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 9, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10009;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    padding: 1.5rem;
}

body.theme-light .overlay {
    background: rgba(245, 247, 250, 0.85);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.contact-popup {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 2.75rem) clamp(1.5rem, 4vw, 2.25rem);
    width: 100%;
    max-width: 480px;
    max-height: 90dvh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

body.theme-light .contact-popup {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.overlay.active .contact-popup {
    transform: translateY(0) scale(1);
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--card-border);
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

body.theme-light .close-btn {
    background: rgba(0, 0, 0, 0.04);
}

body.theme-light .close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    width: 100%;
}

.popup-input,
.popup-textarea {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.15rem;
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

body.theme-light .popup-input,
body.theme-light .popup-textarea {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.12);
}

.popup-input:focus,
.popup-textarea:focus {
    border-color: var(--accent-cyan, #38bdf8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.popup-textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.5;
}

.popup-submit-btn {
    background: #ffffff;
    color: #090a0f;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.95rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.popup-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
    opacity: 0.95;
}

body.theme-light .popup-submit-btn {
    background: #09090b;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.theme-light .popup-submit-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   REWORKED EXECUTIVE ABOUT ME PAGE (HERO, CAPABILITIES, EXPERIENCE, CERTS)
   ========================================================================== */
.hero-executive {
    position: relative;
    overflow: hidden;
    min-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 7.5rem;
    padding-bottom: 4.5rem;
}

.hero-executive-wrapper {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 5;
}

/* ==========================================================================
   MINIMALIST ABOUT ME & EXECUTIVE HERO
   ========================================================================== */
.minimal-section {
    padding: clamp(3.5rem, 7vh, 5.5rem) 0;
}

.hero-minimal {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: clamp(6.5rem, 12vh, 8.5rem);
    padding-bottom: clamp(3rem, 6vh, 4.5rem);
}

.hero-minimal-content {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.35rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-pill);
    color: var(--accent-cyan, #38bdf8);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

body.theme-light .status-chip {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.25);
    color: #0284c7;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulseStatus 2s infinite ease-in-out;
}

@keyframes pulseStatus {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin: 0;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    font-weight: 500;
    color: var(--text-muted);
    margin-top: -0.3rem;
    letter-spacing: -0.01em;
}

.hero-bio {
    font-size: clamp(1.02rem, 1.35vw, 1.15rem);
    color: var(--text-muted);
    line-height: 1.75;
    font-weight: 300;
    max-width: 780px;
    margin: 0;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

body.theme-light .meta-pill {
    background: rgba(0, 0, 0, 0.03);
}

.meta-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.meta-pill:active {
    transform: translateY(0) scale(0.98);
}

body.theme-light .meta-pill:hover {
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

body.theme-light .meta-pill:active {
    transform: translateY(0) scale(0.98);
}

/* Timeline Bento Grid */
.timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3.5vw, 2.2rem);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-soft);
}

.timeline-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.timeline-card:active {
    transform: translateY(0) scale(0.995);
}

body.theme-light .timeline-card:hover {
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

body.theme-light .timeline-card:active {
    transform: translateY(0) scale(0.995);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.timeline-company {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.2rem;
    letter-spacing: -0.01em;
}

.timeline-role {
    color: var(--accent-sage, #34d399);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

body.theme-light .timeline-date {
    background: rgba(0, 0, 0, 0.04);
}

.timeline-bullets {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.7;
    font-weight: 300;
}

.timeline-bullets li {
    margin-bottom: 0.4rem;
}

.timeline-bullets li:last-child {
    margin-bottom: 0;
}

/* Competencies Bento Matrix */
.skills-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.skills-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skills-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

body.theme-light .skills-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.skills-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.skills-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-badge {
    font-size: 0.85rem;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-weight: 400;
    transition: all 0.2s ease;
}

body.theme-light .skill-badge {
    background: rgba(0, 0, 0, 0.03);
}

.skill-badge:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Dual Column Education & Volunteering */
.dual-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.85rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

body.theme-light .info-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.cert-links-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.cert-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

body.theme-light .cert-link-item {
    background: rgba(0, 0, 0, 0.02);
}

.cert-link-item:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

body.theme-light .cert-link-item:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 640px) {
    .cert-links-list {
        grid-template-columns: 1fr;
    }
}

.hero-top-badge {
    display: none !important;
}

.status-pulse-dot {
    display: none !important;
}

.hero-executive-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin: 0;
}

.hero-executive-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    margin-top: -0.4rem;
}

.hero-executive-bio {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--text-muted);
    line-height: 1.75;
    font-weight: 300;
    max-width: 800px;
    margin: 0;
}

.hero-executive-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.2s ease;
}

body.theme-light .hero-meta-item {
    background: rgba(0, 0, 0, 0.03);
}

.hero-meta-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
}

.hero-meta-divider {
    color: var(--text-muted);
    opacity: 0.3;
}

/* Hero Metrics Ribbon */
.hero-metrics-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 2.2rem;
    gap: 1.5rem;
    margin: 0.5rem 0;
    box-shadow: var(--shadow-soft);
    width: 100%;
    transition: all 0.25s ease;
}

.hero-metrics-ribbon:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-ribbon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.metric-ribbon-val {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1;
    color: var(--text-dark);
}

.metric-ribbon-lbl {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-executive-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.85rem;
    background: #ffffff;
    color: #090a0f;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: none;
}

.btn-hero-primary:hover {
    opacity: 0.94;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: #ffffff;
    color: #090a0f;
}

.btn-hero-primary:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.theme-light .btn-hero-primary {
    background: #09090b;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

body.theme-light .btn-hero-primary:hover {
    background: #18181b;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.theme-light .btn-hero-primary:active {
    transform: translateY(0) scale(0.97);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text-dark);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light .btn-hero-secondary {
    background: rgba(0, 0, 0, 0.03);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.btn-hero-secondary:active {
    transform: translateY(0) scale(0.97);
    background: rgba(255, 255, 255, 0.12);
}

body.theme-light .btn-hero-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

body.theme-light .btn-hero-secondary:active {
    transform: translateY(0) scale(0.97);
}

/* Modern Section Headers */
.section-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.section-tag-badge {
    display: none !important;
}

.section-title-modern {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-subtitle-modern {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 720px;
    margin-top: 0.5rem;
    line-height: 1.65;
    font-weight: 300;
}

/* ==========================================================================
   CORE CAPABILITIES & BENTO MATRIX
   ========================================================================== */
.capabilities-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.capability-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.capability-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cap-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cap-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cap-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    flex-shrink: 0;
}

body.theme-light .cap-icon-box {
    background: rgba(0, 0, 0, 0.04);
}

.cap-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.cap-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--card-border);
    font-weight: 500;
    text-transform: uppercase;
}

body.theme-light .cap-badge {
    background: rgba(0, 0, 0, 0.04);
}

.cap-skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cap-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

body.theme-light .cap-skill-item {
    background: rgba(0, 0, 0, 0.02);
}

.cap-skill-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.cap-skill-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cap-skill-name svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.cap-skill-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid var(--card-border);
}

body.theme-light .cap-skill-tag {
    background: rgba(0, 0, 0, 0.04);
}

.safety-banner-box {
    margin-top: auto;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-emerald);
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-deck {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.lang-card {
    padding: 0.9rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: all 0.25s ease;
}

body.theme-light .lang-card {
    background: rgba(15, 23, 42, 0.03);
}

.lang-card:hover {
    background: var(--accent-sage-light);
    border-color: var(--accent-sage);
}

.lang-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.lang-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-sage);
    background: var(--accent-sage-light);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.lang-bar {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: var(--card-border);
    overflow: hidden;
}

.lang-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
}

/* ==========================================================================
   WORK EXPERIENCE TIMELINE MATRIX
   ========================================================================== */
.experience-matrix {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.exp-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.exp-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.exp-company-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-logo-chip {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
    flex-shrink: 0;
}

body.theme-light .company-logo-chip {
    background: rgba(0, 0, 0, 0.04);
}

.exp-company-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}

.exp-role-title {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

.exp-meta-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge-active {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge-past {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    font-weight: 500;
}

body.theme-light .status-badge-past {
    background: rgba(0, 0, 0, 0.03);
}

.exp-date-chip {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.exp-pill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.exp-pill-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

body.theme-light .exp-pill-tag {
    background: rgba(0, 0, 0, 0.03);
}

.exp-highlights-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exp-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

body.theme-light .exp-highlight-item {
    background: rgba(0, 0, 0, 0.02);
}

.exp-highlight-item strong {
    color: var(--text-dark);
    font-weight: 600;
}

.exp-bullet-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 4px;
}

/* ==========================================================================
   COMMUNITY IMPACT & VOLUNTEERING
   ========================================================================== */
.impact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-soft);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.impact-subcard {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

body.theme-light .impact-subcard {
    background: rgba(0, 0, 0, 0.02);
}

.impact-subcard:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.impact-subcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.impact-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.impact-year-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    font-weight: 500;
}

.impact-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   OFFICIAL USBE CTE CREDENTIALS SHOWCASE
   ========================================================================== */
.credentials-cta-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-max);
    padding: clamp(2rem, 4vw, 3.5rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.cert-chips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    width: 100%;
    max-width: 1000px;
}

.cert-chip-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

body.theme-light .cert-chip-card {
    background: rgba(0, 0, 0, 0.02);
}

.cert-chip-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
}

.cert-chip-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
}

.cert-chip-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.cert-chip-card:hover .cert-chip-arrow {
    color: var(--text-dark);
    transform: translateX(3px);
}

.btn-credentials-main {
    background: #ffffff;
    color: #090a0f;
    text-decoration: none;
    padding: 0.9rem 2.25rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.98rem;
    font-family: var(--font-display);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-credentials-main:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

body.theme-light .btn-credentials-main {
    background: #09090b;
    color: #ffffff;
}

/* ==========================================================================
   PORTAL, CERTIFICATIONS, FUN HUB & AUTH INTERACTION SURFACES
   ========================================================================== */
.portal-card, .login-card, .restricted-card, .content-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-max);
    padding: clamp(2rem, 4vw, 3.5rem);
    width: 100%;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.portal-card {
    max-width: 960px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.portal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
}

.app-badge {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.portal-title, .login-title, .status-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.portal-desc, .login-desc, .status-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 650px;
    font-weight: 300;
}

/* Destinations & Certifications Grids */
#destinations-grid, #certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.destination-card, .cert-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    min-height: 140px;
}

body.theme-light .destination-card,
body.theme-light .cert-card {
    background: rgba(15, 23, 42, 0.025);
}

.destination-card:hover, .cert-card:hover {
    border-color: var(--accent-sage);
    background: var(--accent-sage-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.dest-title, .cert-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.dest-desc, .cert-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 300;
    margin-top: 0.5rem;
}

.dest-arrow, .cert-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.destination-card:hover .dest-arrow,
.cert-card:hover .cert-arrow {
    color: var(--accent-sage);
    transform: translateX(4px);
}

/* Fun Hub Components */
.fun-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-top: 7rem;
}

.fun-title {
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    font-family: var(--font-display);
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.fun-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.8rem;
    font-weight: 300;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-soft);
}

.tab-btn:hover, .tab-btn.active {
    background: var(--accent-sage);
    color: #ffffff;
    border-color: var(--accent-sage);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.fun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    padding: 0 clamp(1rem, 4vw, 3.5rem) 10vh;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.fun-card {
    background: var(--card-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-max);
    padding: 2rem;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.fun-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-sage);
    background: var(--card-bg-hover);
    box-shadow: var(--shadow-hover);
}

.card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    font-family: var(--font-mono);
}

.badge-original { 
    background: rgba(255, 255, 255, 0.08); 
    color: var(--text-muted); 
    border: 1px solid var(--card-border); 
}

.badge-new { 
    background: var(--accent-sage-light); 
    color: var(--accent-sage); 
    border: 1px solid var(--accent-sage); 
}

.badge-popular { 
    background: rgba(245, 158, 11, 0.15); 
    color: #f59e0b; 
    border: 1px solid rgba(245, 158, 11, 0.3); 
}

.fun-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.fun-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent-sage-light);
    border: 1px solid var(--card-border);
    color: var(--accent-sage);
    transition: all 0.3s ease;
}

.fun-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}



/* Contact Modal */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    height: 100dvh;
    background: rgba(8, 8, 10, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
    padding: 1.5rem;
}

body.theme-light .overlay {
    background: rgba(250, 250, 250, 0.82);
}

.overlay.active, body.contact-open .overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.contact-popup {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease;
}

body.theme-light .contact-popup {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
}

.overlay.active .contact-popup, body.contact-open .contact-popup {
    transform: scale(1) translateY(0);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.close-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.25);
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.popup-input, .popup-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.theme-light .popup-input,
body.theme-light .popup-textarea {
    background: rgba(15, 23, 42, 0.03);
}

.popup-input:focus, .popup-textarea:focus {
    border-color: var(--accent-sage);
    box-shadow: 0 0 0 2px var(--accent-sage-light);
}

.popup-textarea {
    min-height: 130px;
    resize: vertical;
}

.popup-submit-btn {
    background: #ffffff;
    color: #090a0f;
    border: none;
    padding: 0.95rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

body.theme-light .popup-submit-btn {
    background: #09090b;
    color: #ffffff;
}

/* Global Back Button */
.back-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    z-index: 10000;
    font-family: var(--font-display);
    font-size: 0.9rem;
    box-shadow: var(--shadow-soft);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
    transform: translateY(-1px);
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10020;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
    width: 90%;
    max-width: 440px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    text-align: center;
    pointer-events: auto;
}

/* ==========================================================================
   MODULE: SWUP V4 PRECISION PAGE TRANSITION ENGINE
   Silky smooth enter/exit curves with top micro-progress telemetry
   ========================================================================== */
#swup-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--text-dark);
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transform: translateZ(0);
    transition: width 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

#swup-progress.active {
    opacity: 1;
}

body.theme-light #swup-progress {
    background: var(--text-dark);
}

/* Incoming page & default resting state - luxurious Apple-grade deceleration */
.transition-fade {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Outgoing page: graceful cross-dissolve & subtle 8px lift */
html.is-leaving .transition-fade {
    opacity: 0;
    transform: translateY(-8px) scale(0.995);
    transition: opacity 0.32s cubic-bezier(0.25, 1, 0.5, 1), transform 0.32s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Subtle, smooth scroll reveals with stagger cascade support */
.gs-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.gs-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger cascade helper for grid children */
.gs-stagger > *:nth-child(1) { transition-delay: 0.03s; }
.gs-stagger > *:nth-child(2) { transition-delay: 0.06s; }
.gs-stagger > *:nth-child(3) { transition-delay: 0.09s; }
.gs-stagger > *:nth-child(4) { transition-delay: 0.12s; }
.gs-stagger > *:nth-child(5) { transition-delay: 0.15s; }
.gs-stagger > *:nth-child(6) { transition-delay: 0.18s; }


/* ==========================================================================
   DYNAMIC RESPONSIVE SCALING BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .capabilities-matrix {
        grid-template-columns: 1fr;
    }
    .cert-chips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-metrics-ribbon {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1.25rem 1.5rem;
    }
    .hero-executive {
        padding-top: 6.5rem;
        padding-bottom: 3rem;
        min-height: auto;
    }
    .hero-executive-title {
        font-size: clamp(2.4rem, 8vw, 3.8rem);
    }
    .hero-metrics-ribbon {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    .impact-grid {
        grid-template-columns: 1fr;
    }
    .cert-chips-grid {
        grid-template-columns: 1fr;
    }
    .exp-card {
        padding: 1.75rem 1.4rem;
    }
    .capability-card {
        padding: 1.75rem 1.4rem;
    }
    .credentials-cta-box {
        padding: 2.5rem 1.4rem;
    }
    .footer-screen {
        width: 95%;
        max-width: 440px;
    }
    .footer-card {
        padding: 1.8rem 1.5rem 1.4rem 1.5rem;
        gap: 1rem;
        border-radius: 24px 24px 0 0;
    }
    .footer-purpose {
        font-size: 1.05rem;
    }
    .contact-trigger-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    .legal-links {
        gap: 1.5rem;
    }
    .settings-panel {
        padding: 2rem 1.5rem;
        max-height: 90dvh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .hero-top-badge {
        font-size: 0.72rem;
        padding: 6px 14px;
        letter-spacing: 1px;
    }
    .hero-executive-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    .portal-card, .login-card, .restricted-card, .content-container {
        padding: 2rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    .color-options {
        grid-template-columns: repeat(3, 1fr);
    }
    .back-btn {
        bottom: 1.25rem;
        left: 1.25rem;
        padding: 10px 18px;
        font-size: 0.88rem;
    }
}

@media (max-height: 600px) {
    .settings-panel, .contact-popup {
        max-height: 85dvh;
        overflow-y: auto;
        padding: 1.5rem;
    }
    .hero-executive {
        padding-top: 5rem;
    }
}

/* ==========================================================================
   OFFICIAL CERTIFICATIONS PAGE SYSTEM
   ========================================================================== */
.certifications-section {
    min-height: 100vh;
    padding-top: clamp(6.5rem, 12vh, 8.5rem);
    padding-bottom: clamp(5rem, 10vh, 8rem);
    width: 100%;
}

.certifications-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 10;
    margin: 0 auto;
}

#certifications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    width: 100%;
    margin-top: 1rem;
}

.cert-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    position: relative;
    min-height: 120px;
    box-shadow: var(--shadow-soft);
}

.cert-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

body.theme-light .cert-card:hover {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.cert-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    letter-spacing: -0.01em;
}

.cert-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 300;
}

.cert-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.cert-card:hover .cert-arrow {
    color: var(--text-dark);
    transform: translateX(3px);
}

.back-link {
    align-self: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
    font-family: var(--font-display);
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link:hover {
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

body.theme-light .back-link:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
    #certifications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    #certifications-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==========================================================================
   COMMAND PORTAL & DESTINATIONS SYSTEM
   ========================================================================== */
.portal-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6.5rem, 12vh, 8.5rem) 1.5rem clamp(4rem, 8vh, 6rem) 1.5rem;
    width: 100%;
}

.portal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 4vw, 3.2rem) clamp(1.5rem, 3vw, 2.75rem);
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    box-shadow: var(--shadow-soft);
    margin: auto;
    position: relative;
    z-index: 10;
}

.portal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
}

.portal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin: 0;
}

.portal-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    margin: 0;
}

#destinations-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.destination-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.6rem 1.6rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background-color 0.25s ease;
    position: relative;
    opacity: 0;
    min-height: 115px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

body.theme-light .destination-card {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.destination-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

body.theme-light .destination-card:hover {
    border-color: rgba(0, 0, 0, 0.18);
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.dest-title {
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
    letter-spacing: -0.01em;
}

.dest-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.5rem;
    font-weight: 300;
}

.dest-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.destination-card:hover .dest-arrow {
    color: var(--text-dark);
    transform: translateX(4px);
}

/* ==========================================================================
   LABS HEADER SYSTEM
   ========================================================================== */
.labs-header {
    text-align: center;
    padding: clamp(5.5rem, 11vh, 7.5rem) 1.5rem 3rem;
    max-width: 820px;
    margin: 0 auto;
}

.labs-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 800;
    margin: 0 0 0.85rem;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.labs-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-muted);
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 300;
    max-width: 600px;
}

/* ==========================================================================
   CONTENT & LEGAL PAGES SYSTEM
   ========================================================================== */
.legal-page-section {
    min-height: 100vh;
    padding: clamp(6.5rem, 12vh, 8.5rem) 1.5rem clamp(4rem, 8vh, 6rem) 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-max);
    padding: clamp(2rem, 5vw, 4.5rem);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 10;
}

.content-container h1 { 
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.2rem); 
    color: var(--text-dark); 
    margin-bottom: 0.5rem; 
    letter-spacing: -0.02em;
    font-weight: 800;
}

.date-badge { 
    display: inline-block;
    color: var(--accent-sage); 
    font-size: 0.82rem; 
    font-weight: 600;
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-bottom: 2.5rem; 
    background: var(--accent-sage-light);
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--accent-sage);
    font-family: var(--font-mono);
}

.content-container h2 { 
    font-family: var(--font-display);
    font-size: 1.5rem; 
    color: var(--text-dark); 
    margin-top: 2.5rem; 
    margin-bottom: 1.2rem; 
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--card-border);
    font-weight: 700;
}

.content-container p { 
    margin-bottom: 1.2rem; 
    color: var(--text-muted); 
    font-weight: 300; 
    text-align: left;
    line-height: 1.7;
}

.content-container ul { 
    margin-bottom: 1.2rem; 
    color: var(--text-muted); 
    font-weight: 300; 
    padding-left: 1.5rem; 
}

.content-container li { 
    margin-bottom: 0.6rem; 
}

.content-container a { 
    color: var(--accent-cyan, #38bdf8); 
    text-decoration: underline; 
}

/* ==========================================================================
   MODULE: UNIFIED HIGH-CONTRAST AUTHENTICATION & ACCESS SCREENS
   Shared across login.html, not-whitelisted.html, and dynamic portal routes
   ========================================================================== */
.ambient-bg {
    z-index: -100 !important;
    background: var(--bg-base) !important;
    pointer-events: none !important;
    width: 100vw;
    height: 100vh;
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

body.theme-light .ambient-bg {
    background: var(--bg-base) !important;
}

.main-screen {
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2rem 1rem;
    display: flex;
    position: relative;
    box-sizing: border-box;
}

/* Auth Card Elevated Glass Surface with High Contrast */
.login-card,
.restricted-card,
.auth-card {
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(22, 23, 29, 0.92);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    backdrop-filter: blur(28px) saturate(140%);
    border-radius: 24px;
    box-shadow: 0 28px 64px -12px rgba(0, 0, 0, 0.75), 
                inset 0 1px 0 rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    z-index: 10;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
    max-width: 460px;
    padding: 4rem 3rem;
    transition: max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                padding 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                gap 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    display: flex;
    position: relative;
    box-sizing: border-box;
}

body.theme-light .login-card,
body.theme-light .restricted-card,
body.theme-light .auth-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(42, 46, 51, 0.12);
    box-shadow: 0 28px 56px -12px rgba(42, 46, 51, 0.14),
                0 0 0 1px rgba(42, 46, 51, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.left-col {
    flex-direction: column;
    width: 100%;
    display: flex;
}

.right-col {
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    display: flex;
}

.card-header {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    display: flex;
}

.app-badge {
    color: var(--accent-sage, #10b981);
    letter-spacing: 4px;
    text-transform: uppercase;
    -webkit-user-select: none;
    user-select: none;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.app-badge.badge-restricted {
    color: var(--accent-red, #f43f5e);
}

.login-title,
.status-title {
    font-family: var(--font-display);
    -webkit-user-select: none;
    user-select: none;
    color: var(--text-dark, #f8fafc);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
    transition: font-size 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light .login-title,
body.theme-light .status-title {
    color: #18181b;
}

.login-desc,
.status-desc {
    color: var(--text-muted, #94a3b8);
    -webkit-user-select: none;
    user-select: none;
    font-size: 1.02rem;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
}

.auth-details {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.15rem 1.4rem;
    border-radius: var(--radius-md, 10px);
    text-align: left;
    box-sizing: border-box;
}

body.theme-light .auth-details {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(42, 46, 51, 0.1);
}

.auth-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 0.35rem;
    display: block;
    font-family: var(--font-mono);
    font-weight: 600;
}

.auth-value {
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--text-dark, #f8fafc);
    font-weight: 600;
    word-break: break-all;
}

body.theme-light .auth-value {
    color: #18181b;
}

.input-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-bottom: 0;
    display: flex;
}

.access-input {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-dark, #ffffff);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 8px;
    background: rgba(0, 0, 0, 0.4);
    outline: none;
    width: 100%;
    padding: 1.25rem 1rem;
    font-size: 1.2rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.access-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.55);
}

.access-input::placeholder {
    color: var(--text-muted, #94a3b8);
    opacity: 0.5;
    -webkit-user-select: none;
    user-select: none;
    letter-spacing: 2px;
    font-weight: 300;
}

body.theme-light .access-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(42, 46, 51, 0.15);
    color: #18181b;
}

body.theme-light .access-input:focus {
    border-color: rgba(9, 9, 11, 0.3);
    box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.1);
    background: #ffffff;
}

.action-group {
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
    width: 100%;
    display: flex;
}

.submit-btn,
.action-btn {
    background: #ffffff;
    color: #090a0f;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    -webkit-user-select: none;
    user-select: none;
    border: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1.15rem;
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    text-decoration: none;
}

.submit-btn:hover,
.action-btn:hover {
    background: #f1f5f9;
    box-shadow: 0 12px 28px -6px rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: #090a0f;
}

body.theme-light .submit-btn,
body.theme-light .action-btn {
    background: #09090b;
    color: #ffffff;
}

body.theme-light .submit-btn:hover,
body.theme-light .action-btn:hover {
    background: #18181b;
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.divider-container {
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 2px;
    -webkit-user-select: none;
    user-select: none;
    align-items: center;
    width: 100%;
    font-size: 0.75rem;
    display: flex;
}

.divider-line {
    background: rgba(255, 255, 255, 0.12);
    flex-grow: 1;
    height: 1px;
}

body.theme-light .divider-line {
    background: rgba(42, 46, 51, 0.12);
}

.divider-text {
    opacity: 0.7;
    padding: 0 1rem;
    font-family: var(--font-mono);
}

.google-btn {
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--text-dark, #f8fafc) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    gap: 0.75rem;
    text-decoration: none;
}

.google-btn:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

body.theme-light .google-btn {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(42, 46, 51, 0.15) !important;
    color: #18181b !important;
}

body.theme-light .google-btn:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(42, 46, 51, 0.3) !important;
    color: #000000 !important;
}

/* Widescreen and Mobile Responsive Adaptations */
@media (height <= 720px) and (width >= 900px) {
    .main-screen {
        min-height: 100vh;
        padding: 1rem;
    }
    .login-card,
    .restricted-card,
    .auth-card {
        flex-direction: row;
        gap: 0;
        max-width: 860px;
        padding: 3.5rem 0;
    }
    .left-col {
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0 3.5rem;
        justify-content: center;
        align-items: center;
        flex: 1;
    }
    body.theme-light .left-col {
        border-right-color: rgba(42, 46, 51, 0.12);
    }
    .right-col {
        padding: 0 3.5rem;
        justify-content: center;
        flex: 1;
    }
}

@media (width <= 480px) {
    .main-screen {
        padding: 1.5rem 1rem;
    }
    .login-card,
    .restricted-card,
    .auth-card {
        border-radius: 28px !important;
        gap: 1.5rem;
        padding: 2.5rem 1.5rem;
    }
    .login-title,
    .status-title {
        font-size: 2rem;
    }
    .access-input {
        letter-spacing: 5px;
        padding: 1.1rem;
        font-size: 1.15rem;
    }
    .submit-btn,
    .action-btn {
        padding: 1.1rem;
        font-size: 1.02rem;
    }
}

