@layer reset, base, components, utilities, houdini;

@layer houdini {

    /* CSS Houdini - Liquid Gradient System */
    @property --pos-x {
        syntax: '<percentage>';
        initial-value: 11%;
        inherits: true;
    }

    @property --pos-y {
        syntax: '<percentage>';
        initial-value: 140%;
        inherits: true;
    }

    @property --spread-x {
        syntax: '<percentage>';
        initial-value: 150%;
        inherits: true;
    }

    @property --spread-y {
        syntax: '<percentage>';
        initial-value: 180%;
        inherits: true;
    }

    @property --color-1 {
        syntax: '<color>';
        initial-value: #000;
        inherits: true;
    }

    @property --color-2 {
        syntax: '<color>';
        initial-value: #1a1400;
        inherits: true;
    }

    @property --color-3 {
        syntax: '<color>';
        initial-value: #4d3d00;
        inherits: true;
    }

    @property --color-4 {
        syntax: '<color>';
        initial-value: #806600;
        inherits: true;
    }

    @property --color-5 {
        syntax: '<color>';
        initial-value: #b38f00;
        inherits: true;
    }

    @property --stop-1 {
        syntax: '<percentage>';
        initial-value: 37%;
        inherits: true;
    }

    @property --stop-2 {
        syntax: '<percentage>';
        initial-value: 61%;
        inherits: true;
    }

    @property --stop-3 {
        syntax: '<percentage>';
        initial-value: 78%;
        inherits: true;
    }

    @property --stop-4 {
        syntax: '<percentage>';
        initial-value: 89%;
        inherits: true;
    }

    @property --stop-5 {
        syntax: '<percentage>';
        initial-value: 100%;
        inherits: true;
    }

    @property --border-angle {
        syntax: '<angle>';
        initial-value: 20deg;
        inherits: true;
    }

    @property --border-color-1 {
        syntax: '<color>';
        initial-value: hsla(45, 100%, 50%, 0.2);
        inherits: true;
    }

    @property --border-color-2 {
        syntax: '<color>';
        initial-value: hsla(45, 100%, 40%, 0.75);
        inherits: true;
    }

    @property --start {
        syntax: '<angle>';
        initial-value: 0deg;
        inherits: true;
    }

    @property --mx {
        syntax: '<percentage>';
        initial-value: 50%;
        inherits: true;
    }

    @property --my {
        syntax: '<percentage>';
        initial-value: 50%;
        inherits: true;
    }

    @property --bg-main {
        syntax: '<color>';
        initial-value: #000;
        inherits: true;
    }

    @property --bg-secondary {
        syntax: '<color>';
        initial-value: #050505;
        inherits: true;
    }

    @property --text-primary {
        syntax: '<color>';
        initial-value: #fff;
        inherits: true;
    }

    @property --text-secondary {
        syntax: '<color>';
        initial-value: #a1a1a6;
        inherits: true;
    }
}

@layer base {
    :root {
        /* MPS Official Palette */
        --mps-gold: #FFB81C;
        --mps-navy: #002D62;
        --mps-red: #E31B23;

        /* Dynamic Theme Variables (Default: Dark) */
        --primary: var(--mps-gold);
        --secondary: var(--mps-navy);
        --accent: var(--mps-red);

        --bg-main: #000000;
        --bg-secondary: #050505;
        --text-primary: #FFFFFF;
        --text-secondary: #A1A1A6;
        --silver: #F5F5F7;

        --glass-bg: rgba(255, 255, 255, 0.05);
        --glass-border: rgba(255, 255, 255, 0.1);
        --bg-glass: rgba(15, 15, 15, 0.7);
        --border-glass: rgba(255, 255, 255, 0.1);

        --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        --transition-speed: 0.4s;

        --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
        --pattern-color: rgba(255, 255, 255, 0.08);
        --primary-glow: rgba(255, 184, 28, 0.4);
    }

    [data-theme="light"] {
        --bg-main: #FFFFFF;
        --bg-secondary: #F5F5F7;
        --text-primary: #1D1D1F;
        --text-secondary: #424245;
        --silver: #1D1D1F;

        --glass-bg: rgba(0, 0, 0, 0.05);
        --glass-border: rgba(0, 0, 0, 0.15);
        --bg-glass: rgba(255, 255, 255, 0.85);
        --border-glass: rgba(0, 0, 0, 0.15);

        --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        --pattern-color: rgba(0, 0, 0, 0.06);
        --primary-glow: rgba(0, 45, 98, 0.3);
    }

}

@layer reset {
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        -webkit-tap-highlight-color: transparent;
        /* Snapier transitions - specifically excluding background to prevent Houdini conflicts */
        transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease,
            transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@layer components {

    *:focus {
        outline: none;
    }

    *:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 4px;
    }

    button:active,
    a:active,
    .nav-item:active,
    .profile-card:active,
    .glass-card:active,
    .partner-card:active,
    .testimonial-card:active {
        transform: scale(0.97) !important;
        opacity: 0.8 !important;
        transition: transform 0.1s ease, opacity 0.1s ease !important;
    }

    /* Hide default scrollbar - Lenis handles scrolling */
    html {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    ::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    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-scrolling iframe {
        pointer-events: none;
    }

    body {
        font-family: var(--font-family);
        background-color: var(--bg-main);
        color: var(--text-primary);
        line-height: 1.6;
        overflow-x: hidden;
        /* Extra padding at bottom for floating nav on tablet/mobile */
        padding-bottom: 6rem;
    }

    @media (min-width: 85rem) {
        body {
            padding-bottom: 0;
        }
    }

    /* Floating Lamp Navigation */
    .nav-container {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        bottom: 1.5rem;
    }

    @media (min-width: 85rem) {
        .nav-container {
            bottom: auto;
            top: 1.5rem;
        }
    }

    .nav-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(0.5rem);
        -webkit-backdrop-filter: blur(0.5rem);
        padding: 0.375rem;
        border-radius: 624.9375rem;
        box-shadow: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.3);
        transition: background 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
    }

    .nav-item {
        position: relative;
        z-index: 2;
        cursor: pointer;
        text-decoration: none;
        font-size: 0.875rem;
        font-weight: 600;
        padding: 0.625rem 1.5rem;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 3.75rem;
        gap: 0.5rem;
        transition: color 0.3s ease;

        @media (hover: hover) {
            &:hover {
                color: var(--text-primary);
            }
        }

        &.active,
        &:active {
            color: var(--text-primary) !important;
        }

        &:focus {
            color: var(--text-secondary);

            &.active {
                color: var(--text-primary);
            }
        }
    }

    /* Navigation Lamp Indicator */
    .active-indicator {
        position: absolute;
        height: calc(100% - 12px);
        background: var(--primary);
        border-radius: 9999px;
        z-index: 1;
        box-shadow: 0 4px 12px var(--mps-gold);
        opacity: 0;
        top: 50%;
        left: 0;
        will-change: transform, width, opacity;
    }

    /* Top Controls: Liquid Glass Pill */
    .top-controls {
        position: fixed;
        top: 1.5rem;
        right: 2.5rem;
        z-index: 1000;
        display: flex;
        align-items: center;
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(1.5rem) saturate(180%);
        -webkit-backdrop-filter: blur(1.5rem) saturate(180%);
        padding: 0.25rem 0.5rem;
        border-radius: 9999px;
        box-shadow:
            0 10px 40px -10px rgba(0, 0, 0, 0.5),
            inset 0 0 0 1px rgba(255, 255, 255, 0.05),
            inset 0 1px 2px rgba(255, 255, 255, 0.2);
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    [data-theme="light"] .top-controls {
        box-shadow:
            0 10px 40px -10px rgba(0, 0, 0, 0.1),
            inset 0 0 0 1px rgba(0, 0, 0, 0.05),
            inset 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    .control-btn {
        background: transparent;
        border: none;
        color: var(--text-primary);
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;

        @media (hover: hover) {
            &:hover {
                background: rgba(255, 255, 255, 0.1);
                transform: scale(1.05);

                [data-theme="light"] & {
                    background: rgba(0, 0, 0, 0.05);
                }
            }
        }

        i {
            width: 1.125rem;
            height: 1.125rem;
        }
    }

    .control-divider {
        width: 1px;
        height: 1.25rem;
        background: var(--border-glass);
        margin: 0 0.125rem;
        opacity: 0.5;
    }

    .control-btn i {
        width: 1.125rem;
        height: 1.125rem;
    }

    /* Hide Google Translate UI Junk Core */
    .goog-te-banner-frame.skiptranslate,
    .goog-te-gadget-icon,
    .goog-te-gadget-simple img,
    .goog-te-gadget br,
    iframe.goog-te-banner-frame,
    #goog-gt-tt,
    .goog-te-balloon-frame,
    .goog-te-menu-value,
    .skiptranslate {
        display: none !important;
        visibility: hidden !important;
    }

    html,
    body {
        top: 0 !important;
        position: static !important;
    }

    .goog-te-spinner-pos {
        display: none !important;
    }


    /* Custom Language Dropdown */
    .translate-container {
        position: relative;
        display: flex;
        align-items: center;
    }

    .language-dropdown {
        position: absolute;
        top: calc(100% + 1rem);
        right: 0;
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(2rem) saturate(180%);
        -webkit-backdrop-filter: blur(2rem) saturate(180%);
        border-radius: 1.5rem;
        padding: 0.75rem;
        min-width: 12rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        display: none;
        flex-direction: column;
        gap: 0.25rem;
        z-index: 1001;
        opacity: 0;
        transform: translateY(10px) scale(0.95);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

        &.visible {
            display: flex;
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        [data-theme="light"] & {
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        }
    }

    .lang-item {
        padding: 0.75rem 1.25rem;
        border-radius: 0.825rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;

        @media (hover: hover) {
            &:hover {
                background: rgba(255, 255, 255, 0.1);
                padding-left: 1.5rem;
                color: var(--primary);

                [data-theme="light"] & {
                    background: rgba(0, 0, 0, 0.05);
                }
            }
        }

        &.active {
            color: var(--primary);
            background: rgba(255, 184, 28, 0.1);

            [data-theme="light"] & {
                color: var(--secondary);
                background: rgba(0, 45, 98, 0.05);
            }
        }
    }





    #theme-toggle {

        i,
        svg {
            display: none;
        }

        .active-icon {
            display: block !important;
        }
    }

    /* More Google Translate cleanup */
    .goog-te-gadget {
        color: transparent !important;
        font-size: 0 !important;
    }

    .goog-te-gadget .goog-te-combo {
        display: none !important;
    }

    #goog-gt-tt,
    .goog-tooltip,
    .goog-tooltip:hover {
        display: none !important;
        visibility: hidden !important;
    }





    /* The Tubelight (Lamp) Detail */
    .active-indicator::before {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 2rem;
        height: 0.125rem;
        background: var(--primary);
        box-shadow:
            0 0 0.625rem var(--primary),
            0 0 1.25rem var(--primary-glow);
        transition: all 0.4s ease;
    }

    /* Orientation: Indicator at bottom (NavBar at bottom) - Light points UP */
    .active-indicator.lamp-bottom::before {
        top: -0.125rem;
        border-radius: 0 0 0.25rem 0.25rem;
    }

    /* Orientation: Indicator at top (NavBar at top) - Light points DOWN */
    .active-indicator.lamp-top::before {
        bottom: -0.125rem;
        border-radius: 0.25rem 0.25rem 0 0;
    }

    /* Hide/Show text based on screen size */
    .nav-text {
        display: none;
    }

    .nav-icon {
        display: flex;
    }

    .nav-icon i {
        width: 1.125rem;
        height: 1.125rem;
    }

    @media (min-width: 85rem) {
        .nav-text {
            display: inline;
        }

        .nav-icon {
            display: none;
        }
    }

    /* News Dropdown Styles */
    .nav-item-dropdown {
        position: relative;
        display: flex;
        align-items: center;
    }

    .nav-dropdown {
        position: absolute;
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(2rem) saturate(180%);
        -webkit-backdrop-filter: blur(2rem) saturate(180%);
        border-radius: 1.5rem;
        padding: 0.75rem;
        min-width: 15rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        
        /* Smooth transitions instead of display: none */
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: 
            opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0s linear 0.4s; /* Delay visibility hidden until fade-out ends */
        
        z-index: 1001;
    }

    /* Bridge the gap to prevent accidental closing */
    .nav-dropdown::before {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 1.5rem;
        z-index: -1;
    }

    @media (hover: hover) {
        .nav-item-dropdown:hover .nav-dropdown {
            visibility: visible;
            opacity: 1;
            pointer-events: auto;
            transition: 
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear 0s;
            transition-delay: 0s;
        }

        /* Small hack to keep it sticky on exit for desktop only */
        .nav-item-dropdown .nav-dropdown {
            transition-delay: 0.2s;
        }
    }

    .nav-dropdown.mobile-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0) scale(1) !important;
        transition: 
            opacity 0.3s ease,
            transform 0.3s ease,
            visibility 0s linear 0s;
        transition-delay: 0s !important;
    }

    /* Bridge the gap only on desktop */
    @media (hover: hover) {
        .nav-dropdown::before {
            content: '';
            position: absolute;
            left: 0;
            width: 100%;
            height: 1.5rem;
            z-index: -1;
        }
    }
    .nav-dropdown-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        border-radius: 0.825rem;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 600;
        transition: all 0.2s ease;
    }

    .nav-dropdown-link i {
        width: 1.125rem;
        height: 1.125rem;
        color: var(--primary);
    }

    .nav-dropdown-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
        padding-left: 1.25rem;
    }

    [data-theme="light"] .nav-dropdown-link:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    /* Responsive Dropdown Positioning */
    @media (min-width: 85rem) {
        .nav-dropdown {
            top: calc(100% + 1rem);
            left: 50%;
            transform: translateX(-50%) translateY(10px) scale(0.95);
        }

        .nav-dropdown::before {
            top: -1.25rem;
        }

        .nav-item-dropdown:hover .nav-dropdown {
            transform: translateX(-50%) translateY(0) scale(1);
        }
    }

    @media (max-width: 84.9375rem) {
        .nav-dropdown {
            bottom: calc(100% + 1rem);
            left: 50%;
            transform: translateX(-50%) translateY(-10px) scale(0.95);
        }

        .nav-dropdown::before {
            bottom: -1.25rem;
        }

        .nav-item-dropdown:hover .nav-dropdown {
            transform: translateX(-50%) translateY(0) scale(1);
        }
    }

    /* Chevron Icon */
    .nav-dropdown-icon {
        width: 0.825rem !important;
        height: 0.825rem !important;
        margin-left: -0.25rem;
        opacity: 0.5;
        transition: transform 0.3s ease;
    }

    .nav-item-dropdown:hover .nav-dropdown-icon {
        transform: rotate(180deg);
        opacity: 1;
    }

    @media (max-width: 48rem) {
        .nav-dropdown-icon {
            display: none;
        }
    }

    /* Fixed Logo */
    .logo-fixed {
        position: fixed;
        top: 1.5rem;
        left: 2.5rem;
        z-index: 1000;
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--text-primary);
        text-decoration: none;
        letter-spacing: -0.03125rem;
        background: var(--bg-glass);
        padding: 0.5rem 1.25rem 0.5rem 0.75rem;
        border-radius: 9999px;
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(1.5rem) saturate(180%);
        -webkit-backdrop-filter: blur(1.5rem) saturate(180%);
        box-shadow:
            0 10px 40px -10px rgba(0, 0, 0, 0.3),
            inset 0 1px 1px rgba(255, 255, 255, 0.1);
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        align-items: center;
        gap: 0.75rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px) scale(0.95);
        pointer-events: none;

        &.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }

        [data-theme="light"] & {
            box-shadow:
                0 10px 40px -10px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
        }

        .logo-img {
            height: 1.75rem;
            width: auto;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
        }

        @media (hover: hover) {
            &:hover {
                transform: scale(1.02);
                background: var(--glass-border);
            }
        }

        @media (max-width: 48rem) {
            left: 1rem;
            top: 1.25rem;
            padding: 0.625rem 1rem 0.625rem 0.5rem;
            gap: 0.5rem;

            .logo-img {
                height: 1.5rem;
            }

            .logo-text {
                font-size: 0.875rem;
            }
        }
    }

    /* Hero Section */
    .hero {
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        background: #000;
        transition: none !important;

        * :not(.gradient-button) {
            transition: none;
        }

        .hero-video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
        }

        .hero-video-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
            z-index: 2;

            [data-theme="light"] & {
                background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
            }
        }

        .hero-content {
            text-align: center;
            z-index: 5;
            max-width: 56.25rem;
            padding: 0 2rem;
        }
    }

    .hero-headline {
        font-size: 6.25rem;
        font-weight: 800;
        letter-spacing: -0.05em;
        padding-bottom: 1rem;
        line-height: 1.0;
        color: #ffffff !important;
        background-image: linear-gradient(180deg, #ffffff 20%, rgba(255, 255, 255, 0.75) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease !important;
        transition-property: transform, opacity !important;
        filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.3));
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
        animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);

        [data-theme="light"] & {
            -webkit-text-fill-color: transparent !important;
            color: #ffffff !important;
        }

        @media (max-width: 60.5rem) {
            font-size: 4rem;
            letter-spacing: -0.02em;
        }
    }

    .hero-subline {
        font-size: 1.6rem;
        font-weight: 500;
        color: #ffffff !important;
        letter-spacing: -0.0125rem;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        display: inline-block;
        padding: 0.25rem 0.75rem;
        border-radius: 0.5rem;

        [data-theme="light"] & {
            color: #ffffff !important;
        }
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(3rem) scale(0.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }


    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* High-end Gradient Button */
    .gradient-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.6875rem;
        min-width: 8.25rem;
        padding: 1rem 2.25rem;
        font-size: 1rem;
        line-height: 1.1875rem;
        font-weight: 700;
        color: white;
        cursor: pointer;
        border: none;
        appearance: none;
        position: relative;
        background: radial-gradient(var(--spread-x) var(--spread-y) at var(--pos-x) var(--pos-y),
                var(--color-1) var(--stop-1),
                var(--color-2) var(--stop-2),
                var(--color-3) var(--stop-3),
                var(--color-4) var(--stop-4),
                var(--color-5) var(--stop-5));
        transition:
            --pos-x 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --pos-y 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --spread-x 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --spread-y 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --color-1 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --color-2 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --color-3 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --color-4 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --color-5 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --stop-1 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --stop-2 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --stop-3 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --stop-4 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            --stop-5 0.7s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.4s ease;
        text-decoration: none;
        z-index: 5;
        transform: translateZ(0);
        will-change: --pos-x, --pos-y, --color-1, --color-2, --color-3, --color-4, --color-5;

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1px;
            background: linear-gradient(var(--border-angle), var(--border-color-1), var(--border-color-2));
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask-composite: exclude;
            pointer-events: none;
            transition: background 0.5s ease;
        }

        &:hover {
            --pos-x: 0%;
            --pos-y: 95%;
            --spread-x: 121%;
            --spread-y: 121%;
            --color-1: #ffd700;
            --color-2: #d3a900;
            --color-3: #9e7e00;
            --color-4: #3a2e00;
            --color-5: #000000;
            --stop-1: 0%;
            --stop-2: 10%;
            --stop-3: 25%;
            --stop-4: 75%;
            --stop-5: 90%;
            transform: translateY(-2px) translateZ(0);
        }

        &.mps-blue {
            --color-1: #000;
            --color-2: #001a33;
            --color-3: #002d62;
            --color-4: #004080;
            --color-5: #0059b3;
            --border-color-1: hsla(210, 100%, 50%, 0.2);
            --border-color-2: hsla(210, 100%, 40%, 0.75);

            @media (hover: hover) {
                &:hover {
                    --pos-x: 5%;
                    --pos-y: 95%;
                    --spread-x: 121%;
                    --spread-y: 121%;
                    --color-1: #007bff;
                    --color-2: #015ab9;
                    --color-3: #00428e;
                    --color-4: #001a33;
                    --color-5: #000000;
                    --stop-1: 0%;
                    --stop-2: 10%;
                    --stop-3: 25%;
                    --stop-4: 75%;
                    --stop-5: 90%;
                }
            }
        }
    }

    .hero-cta {
        display: flex;
        gap: 1rem;
        justify-content: center;
        align-items: center;
        margin-top: 1rem;
        animation: slideUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
        animation-delay: 0.2s;
    }

    @media (max-width: 48rem) {
        .hero-cta {
            flex-direction: column;
            gap: 0.75rem;
        }
    }

    .container {
        max-width: 75rem;
        margin: 0 auto;
        padding: 0 2rem;
    }

    /* Hero Video Controls */
    .hero-video-controls {
        position: absolute;
        bottom: 2.5rem;
        right: 3rem;
        display: flex;
        gap: 1rem;
        z-index: 10;
    }

    .video-control-btn {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        position: relative;
    }

    .video-control-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    }

    .video-control-btn i,
    .video-control-btn svg {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 1.25rem;
        height: 1.25rem;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .video-control-btn .play-icon {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-45deg);
        pointer-events: none;
    }

    .video-control-btn .pause-icon {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0);
    }

    .video-control-btn.paused .play-icon {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0);
        pointer-events: auto;
    }

    .video-control-btn.paused .pause-icon {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(45deg);
        pointer-events: none;
    }

    /* Video Modal Specifics */
    .video-modal-content {
        max-width: 90vw;
        width: 80rem;
        padding: 1.25rem;
        background: var(--bg-glass);
    }

    .video-modal-content .modal-header {
        position: relative;
        padding: 0;
        margin-bottom: 1rem;
    }

    .video-modal-body {
        padding: 0;
    }

    .video-container {
        position: relative;
        padding-bottom: 56.25%;
        /* 16:9 Aspect Ratio */
        height: 0;
        overflow: hidden;
        border-radius: 1.5rem;
    }

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    @media (max-width: 48rem) {
        .hero-video-controls {
            bottom: 1.5rem;
            right: 1.5rem;
            gap: 0.75rem;
        }

        .video-control-btn {
            width: 3rem;
            height: 3rem;
        }
    }


    /* Profiles Section: Classic Dot Grid */
    .profiles-section {
        padding: 7.5rem 0;
        background-color: var(--bg-main);
        background-image: radial-gradient(var(--pattern-color) 1.5px, transparent 1.5px);
        background-size: 40px 40px;
        background-attachment: scroll;
    }

    .section-title {
        font-size: 3.5rem;
        font-weight: 700;
        text-align: center;
        margin-bottom: 5rem;
        color: var(--text-primary);
        letter-spacing: -0.125rem;
    }

    .section-title.left {
        text-align: left;
        margin-bottom: 1.25rem;
    }

    /* Profile Cards Bento Grid */
    .bento-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto auto auto;
        gap: 1rem;

        .profile-card {
            &:nth-child(1) {
                grid-column: span 4;
                min-height: 32rem;
            }

            &:nth-child(2) {
                grid-column: span 2;
                min-height: 32rem;
            }

            &:nth-child(3),
            &:nth-child(4),
            &:nth-child(5) {
                grid-column: span 2;
                min-height: 22rem;
            }

            /* Multimedia and Gallery on the last row, equal size */
            &:nth-child(6),
            &:nth-child(7) {
                grid-column: span 3;
                min-height: 18rem;
                background-position: center 40%;
            }
        }
    }

    /* Profile Cards */
    .profile-card {
        min-height: 28rem;
        position: relative;
        border-radius: 1.5rem;
        overflow: hidden;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        cursor: pointer;
        transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            border: 1px solid rgba(255, 255, 255, 0.5);
            opacity: 0;
            transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
            z-index: 5;
            pointer-events: none;

            [data-theme="light"] & {
                border-color: rgba(0, 0, 0, 0.2);
            }
        }

        @media (hover: hover) {
            &:hover {
                transform: translateY(-0.75rem);
                box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
                z-index: 10;

                [data-theme="light"] & {
                    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.15);
                    border-color: rgba(0, 0, 0, 0.3);
                }

                &::before {
                    opacity: 1;
                }

                &.coming-soon {
                    transform: none;
                    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.1);
                }

                .profile-overlay::after {
                    opacity: 1;
                }

                .read-more {
                    transform: translateX(0.3125rem);
                }
            }
        }

        &.coming-soon {
            cursor: default;
            filter: grayscale(0.2);
        }
    }

    .coming-soon-badge {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: rgba(255, 184, 28, 0.15);
        color: var(--mps-gold);
        padding: 0.4rem 1rem;
        border-radius: 2rem;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        z-index: 10;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 184, 28, 0.3);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    [data-theme="light"] .coming-soon-badge {
        background: rgba(255, 184, 28, 0.25);
        color: #8a6500;
        border-color: rgba(255, 184, 28, 0.5);
    }

    .profile-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 35%, rgba(0, 0, 0, 0) 70%);
        z-index: 1;
        transition: opacity 0.6s ease;

        /* Progressive Blur implementation */
        backdrop-filter: blur(0.5rem);
        -webkit-backdrop-filter: blur(0.5rem);
        mask-image: linear-gradient(to top, black 0%, black 15%, transparent 65%);
        -webkit-mask-image: linear-gradient(to top, black 0%, black 15%, transparent 65%);
    }

    .profile-overlay::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0) 80%);
        opacity: 0;
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }


    .profile-content {
        position: relative;
        z-index: 2;
        padding: 1.5rem;
    }

    .profile-content h3 {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--card-text-primary, #fff);
        letter-spacing: -0.02em;
        transition: color 0.4s ease;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .profile-content p {
        color: var(--card-text-secondary, rgba(255, 255, 255, 0.9));
        font-size: 0.95rem;
        line-height: 1.5;
        transition: color 0.4s ease;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Base Read More styling */
    .read-more {
        color: var(--primary);
        font-weight: 700;
        font-size: 0.9rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .read-more i {
        width: 1rem;
        height: 1rem;
    }




    /* Contrast specific overrides for individual light-colored images */
    /* If an image is extremely bright, we slightly darken the overlay even more */
    .profile-card.light-bg .profile-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0) 90%) !important;
    }

    /* Glass UI Components */
    .glass-card {
        background: var(--bg-glass);
        backdrop-filter: blur(0.5rem);
        -webkit-backdrop-filter: blur(0.5rem);
        border-radius: 2rem;
        position: relative;
        overflow: hidden;
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
        transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.6s ease;
        z-index: 1;

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            border: 1px solid rgba(255, 255, 255, 0.3);
            opacity: 0;
            transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
            z-index: 5;
            pointer-events: none;

            [data-theme="light"] & {
                border-color: rgba(0, 0, 0, 0.15);
            }
        }

        @media (hover: hover) {
            &:hover {
                transform: translateY(-0.75rem);
                background: var(--bg-glass-hover, rgba(30, 30, 30, 0.9));
                box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);

                [data-theme="light"] & {
                    background: rgba(255, 255, 255, 1);
                    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.1);
                }

                &::before {
                    opacity: 1;
                }

                .card-icon {
                    transform: scale(1.1) rotate(5deg);
                }
            }
        }

        h3 {
            font-weight: 700;
            margin-bottom: 0.625rem;
            color: var(--text-primary);
            letter-spacing: -0.03125rem;
        }

        p {
            color: var(--text-secondary);
            font-size: 1.05rem;
            line-height: 1.6;
        }

        .card-icon {
            width: 4rem;
            height: 4rem;
            margin-bottom: 2rem;
            filter: drop-shadow(0 0.625rem 1.25rem rgba(0, 0, 0, 0.3));
            transition: transform 0.5s ease;
        }
    }

    /* About Section: Fine Micro-Mesh */
    .about-section {
        padding: 6.25rem 0;
        background-color: var(--bg-secondary);
        background-size: 20px 20px;
        background-attachment: scroll;

        .about-grid {
            display: grid;
            grid-template-columns: 1.1fr 0.9fr;
            gap: 8rem;
            align-items: center;
        }

        .about-text {
            display: flex;
            flex-direction: column;
            justify-content: center;

            p {
                font-size: 1.25rem;
                color: var(--text-secondary);
                margin-bottom: 1.5625rem;
                max-width: 40rem;
            }
        }

        .about-stats {
            display: flex;
            flex-direction: column;
            gap: 3.5rem;
            padding-left: 2rem;
            border-left: 1px solid var(--border-glass);

            .stat-item {
                display: flex;
                flex-direction: column;
                align-items: flex-start;

                .stat-number {
                    font-size: 4.5rem;
                    font-weight: 800;
                    color: var(--primary);
                    line-height: 1;
                    margin-bottom: 0.5rem;
                    letter-spacing: -0.05em;

                    [data-theme="light"] & {
                        color: var(--secondary);
                    }
                }

                .stat-label {
                    font-size: 1.15rem;
                    color: var(--text-secondary);
                    font-weight: 600;
                    text-transform: uppercase;
                    letter-spacing: 0.1em;
                }
            }
        }
    }

    /* News Section: Cross/Plus Pattern */
    .news-section {
        padding: 7.5rem 0;
        background-color: var(--bg-main);
        background-image:
            radial-gradient(var(--pattern-color) 2px, transparent 1px),
            radial-gradient(var(--pattern-color) 2px, transparent 1px);
        background-position: 0 0, 20px 20px;
        background-size: 40px 40px;
        background-attachment: scroll;
    }

    .news-carousel-wrapper {
        position: relative;
        width: 100vw;
        margin-left: max(-50vw + 50%, -50rem);
        margin-right: max(-50vw + 50%, -50rem);
        /* The masking creates the "fade out" effect on the left and right edges */
        -webkit-mask-image: linear-gradient(to right,
                transparent,
                black 10%,
                black 90%,
                transparent);
        mask-image: linear-gradient(to right,
                transparent,
                black 10%,
                black 90%,
                transparent);
    }

    .news-carousel {
        display: flex;
        gap: 2rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        touch-action: pan-x;
        padding-bottom: 2rem;
        padding-top: 1rem;
        padding-left: max(1rem, calc(50% - 18rem));
        padding-right: max(1rem, calc(50% - 18rem));
        -ms-overflow-style: none;
        scrollbar-width: none;

        &::-webkit-scrollbar {
            display: none;
        }
    }

    .news-card-footer {
        margin-top: 1rem;
    }

    .news-card {
        flex: 0 0 calc(33.333% - 1.33rem);
        min-width: 18.75rem;
        scroll-snap-align: start;
        min-height: 18.75rem;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        cursor: pointer;
        transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.6s ease;

        &::before {
            border-color: rgba(255, 184, 28, 0.4);

            [data-theme="light"] & {
                border-color: rgba(0, 45, 98, 0.25);
            }
        }

        &.news-landscape-card {
            flex: 0 0 auto;
            width: min(90vw, 36rem) !important;
            aspect-ratio: 16 / 10 !important;
            min-height: 0 !important;
            scroll-snap-align: center;
            cursor: grab;
            touch-action: pan-x;

            .profile-content {
                padding: 2rem;

                h3 {
                    font-size: 1.3rem;
                    font-weight: 700;
                    line-height: 1.6;
                    margin-top: 0;
                    margin-bottom: 8px;
                    color: #ffffff !important;
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    line-clamp: 2;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                }

                p {
                    font-size: 0.95rem;
                    line-height: 1.5;
                    opacity: 0.9;
                    color: #ffffff !important;
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    line-clamp: 2;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                }
            }

            &:active {
                cursor: grabbing;
            }
        }
    }


    .news-tag {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: rgba(255, 184, 28, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        backdrop-filter: blur(8px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(8px) saturate(180%) !important;
        padding: 6px 16px;
        border-radius: 9999px;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: rgb(29, 29, 31) !important;
        z-index: 10;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }


    /* Light mode uses the same gold tags for consistent premium look and contrast */
    [data-theme="light"] .news-tag {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    }

    /* Carousel Dots */
    .carousel-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1.5rem;
    }

    .carousel-dot {
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 9999px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.2);
        position: relative;
        overflow: hidden;
        flex-shrink: 0;
        /* Animate the width morph between dot and pill */
        transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            background 0.3s ease;
    }

    [data-theme="light"] .carousel-dot {
        background: rgba(0, 0, 0, 0.15);
    }

    /* Active dot morphs into a pill */
    .carousel-dot.active {
        width: 2rem;
        background: rgba(255, 184, 28, 0.2);
        /* gold track */
    }

    [data-theme="light"] .carousel-dot.active {
        background: rgba(0, 45, 98, 0.12);
        /* navy track */
    }

    /* The fill that sweeps left → right */
    .carousel-dot.active::after {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--primary);
        border-radius: inherit;
        transform: scaleX(0);
        transform-origin: left center;
        animation: pillTimer 4s linear forwards;
    }

    [data-theme="light"] .carousel-dot.active::after {
        background: var(--secondary);
    }

    /* Freeze the fill when hovering (autoscroll also pauses) */
    .news-carousel-wrapper:hover .carousel-dot.active::after {
        animation-play-state: paused;
    }

    @keyframes pillTimer {
        from {
            transform: scaleX(0);
        }

        to {
            transform: scaleX(1);
        }
    }





    .news-card h3 {
        font-size: 1.8rem;
        margin-bottom: 0.625rem;
        letter-spacing: -0.03125rem;
        color: var(--text-primary);
    }

    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(0.625rem);
        -webkit-backdrop-filter: blur(0.625rem);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
        transition: none !important;
        will-change: opacity;

        @media (max-width: 48rem) {
            padding: 2.5rem 1.25rem;
            box-sizing: border-box;
        }
    }

    .modal-overlay.hidden {
        display: none !important;
    }

    .glass-modal {
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(1.5rem) saturate(180%);
        -webkit-backdrop-filter: blur(1.5rem) saturate(180%);
        border-radius: 2rem;
        padding: 0;
        max-width: 43.75rem;
        width: 90%;
        max-height: 90vh;
        position: relative;
        transform-origin: center;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: none !important;
        will-change: transform, opacity;

        .modal-scroll-area {
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
            position: relative;
            scrollbar-width: none;
            -ms-overflow-style: none;

            &::-webkit-scrollbar {
                display: none;
            }
        }

        .modal-header {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 120;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 1.5rem;
            pointer-events: none;
            width: 100%;
            box-sizing: border-box;

            &>* {
                pointer-events: auto;
            }

            .news-tag {
                position: relative;
                top: 0;
                right: 0;
                margin: 0;
            }
        }

        .modal-close {
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px) saturate(150%);
            -webkit-backdrop-filter: blur(10px) saturate(150%);
            color: white;
            width: 2.8rem;
            height: 2.8rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

            @media (hover: hover) {
                &:hover {
                    background: rgba(255, 255, 255, 0.25);
                    border-color: rgba(255, 255, 255, 0.4);
                    transform: rotate(90deg) scale(1.1);
                    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
                }
            }

            [data-theme="light"] & {
                background: rgba(0, 0, 0, 0.35);
                border-color: rgba(255, 255, 255, 0.2);

                &:hover {
                    background: rgba(0, 0, 0, 0.5);
                    border-color: rgba(255, 255, 255, 0.4);
                }
            }
        }

        .modal-image {
            width: 100%;
            height: 25rem;
            margin: 0;
            background-size: cover;
            background-position: center;
            position: relative;
            flex-shrink: 0;
            z-index: 105;

            &::after {
                content: '';
                position: absolute;
                inset: 0;
                background: linear-gradient(to top, var(--bg-main) 0%, transparent 100%);
                opacity: 0.4;
            }
        }

        .modal-body {
            padding: 3.5rem;
            position: relative;
            z-index: 110;

            h2 {
                font-size: clamp(1.4rem, 4vw, 2.5rem);
                margin-top: 1.5rem;
                margin-bottom: 1.25rem;
                letter-spacing: -0.03em;
                color: var(--text-primary);
                line-height: 1.2;
            }

            .modal-text {
                font-size: 1.15rem;
                line-height: 1.8;
                color: var(--text-secondary);
            }
        }

        @media (max-width: 48rem) {
            border-radius: 1.5rem;
            max-height: 85vh;

            .modal-image {
                height: 15rem;
            }

            .modal-body {
                padding: 1.5rem 1.25rem 2.5rem 1.25rem;
            }
        }
    }

    /* Testimonials Section */
    .testimonials-section {
        padding: 6.25rem 0;
        background-color: var(--bg-main);
    }

    .testimonials-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin-top: 3rem;
    }

    .testimonial-card {
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(1rem);
        -webkit-backdrop-filter: blur(1rem);
        border-radius: 1.5rem;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease;
        cursor: pointer;
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
        position: relative;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            border: 1px solid rgba(255, 255, 255, 0.2);
            opacity: 0;
            transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
            z-index: 5;
            pointer-events: none;

            [data-theme="light"] & {
                border-color: rgba(0, 0, 0, 0.1);
            }
        }

        @media (hover: hover) {
            &:hover {
                transform: translateY(-0.25rem);
                background: var(--bg-glass-hover, rgba(40, 40, 40, 0.9));
                box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.25);

                &::before {
                    opacity: 1;
                }

                [data-theme="light"] & {
                    background: rgba(255, 255, 255, 1);
                    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08);
                }
            }
        }

        .quote-icon {
            width: 2rem;
            height: 2rem;
            color: var(--primary);
            opacity: 0.8;
        }

        .testimonial-text {
            font-size: 0.95rem;
            line-height: 1.5;
            color: var(--text-primary);
            font-style: italic;
            font-weight: 400;
            margin: 0;
        }

        .student-info {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            margin-top: auto;
            padding-top: 1rem;
            border-top: 1px solid var(--glass-border);

            .student-name {
                font-size: 1rem;
                font-weight: 700;
                color: var(--text-primary);
            }

            .student-program {
                font-size: 0.85rem;
                color: var(--text-secondary);
            }
        }
    }

    /* Partners Section */
    .partners-section {
        padding: 6.25rem 0;
        background-color: var(--bg-secondary);
        background-size: 20px 20px;
        background-attachment: scroll;
    }

    .partners-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(16.25rem, 1fr));
        gap: 1rem;
        margin-top: 3rem;
    }

    .partner-card {
        background: var(--bg-glass);
        border: 1px solid var(--border-glass);
        backdrop-filter: blur(1rem);
        -webkit-backdrop-filter: blur(1rem);
        border-radius: 1.5rem;
        padding: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 16 / 9;
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease;
        cursor: pointer;
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
        position: relative;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            border: 1px solid rgba(255, 255, 255, 0.3);
            opacity: 0;
            transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
            z-index: 5;
            pointer-events: none;

            [data-theme="light"] & {
                border-color: rgba(0, 0, 0, 0.15);
            }
        }

        @media (hover: hover) {
            &:hover {
                transform: translateY(-0.5rem);
                background: var(--bg-glass-hover, rgba(30, 30, 30, 0.9));
                box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);

                &::before {
                    opacity: 1;
                }

                [data-theme="light"] & {
                    background: rgba(255, 255, 255, 1);
                    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
                }

                i,
                svg,
                img {
                    transform: scale(1.1);
                    color: var(--primary);

                    [data-theme="light"] & {
                        color: var(--secondary);
                    }
                }
            }
        }

        i,
        svg,
        img {
            color: var(--text-secondary);
            transition: color 0.4s ease, transform 0.4s ease;
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        i,
        svg {
            width: 3rem;
            height: 3rem;
        }
    }


    /* Footer: Fine Micro-Mesh */
    .footer {
        padding: 6.25rem 0 2rem;
        background-color: var(--bg-main);
        background-size: 20px 20px;
        background-attachment: scroll;
        border-top: 1px solid var(--glass-border);
        /* Safe space for the floating nav on smaller screens */
        margin-bottom: 2rem;

        @media (min-width: 85rem) {
            margin-bottom: 0;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: 1.5fr 1fr 0.5fr;
            gap: 2.5rem;
            margin-bottom: 3.75rem;
        }

        .footer-logo {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;

            .footer-logo-img {
                height: 2.5rem;
                width: auto;
                filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
                object-fit: contain;
            }

            h3 {
                margin-bottom: 0 !important;
                line-height: 1 !important;
            }
        }

        .footer-info,
        .footer-contact {
            h3 {
                font-size: 1.5rem;
                margin-bottom: 1.5rem;
                color: var(--text-primary);
            }

            p,
            a {
                color: var(--text-secondary);
                line-height: 1.8;
                text-decoration: none;
                transition: color 0.3s ease;

                @media (hover: hover) {
                    &:hover {
                        color: var(--text-primary);
                        text-decoration: underline;
                    }
                }
            }
        }

        .footer-socials {
            display: flex;
            gap: 1rem;
            justify-content: flex-end;
        }

        .social-link {
            width: 3rem;
            height: 3rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-glass);
            border: 1px solid var(--glass-border);
            color: var(--text-primary);
            transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);

            i {
                width: 1.25rem;
                height: 1.25rem;
                transition: transform 0.4s ease;
            }

            @media (hover: hover) {
                &:hover {
                    background: var(--primary);
                    color: #000;
                    border-color: var(--primary);
                    transform: translateY(-5px);
                    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);

                    i {
                        transform: scale(1.1);
                    }

                    [data-theme="light"] & {
                        color: #fff;
                        background: var(--secondary);
                        border-color: var(--secondary);
                    }
                }
            }
        }

        .footer-bottom {
            border-top: 1px solid var(--glass-border);
            padding-top: 1.875rem;
            text-align: center;

            p {
                color: var(--text-secondary);
                opacity: 0.6;
                font-size: 0.9rem;
            }
        }
    }

    /* Premium Minimalist Loading Animation */
    @keyframes loaderSpin {
        0% {
            transform: rotate(0deg);
            opacity: 1;
        }

        100% {
            transform: rotate(360deg);
            opacity: 1;
        }
    }

    @keyframes loaderLineFade {
        0% {
            opacity: 0.3;
        }

        50% {
            opacity: 1;
        }

        100% {
            opacity: 0.3;
        }
    }

    @keyframes fadeOutLoader {
        0% {
            opacity: 1;
            visibility: visible;
        }

        99% {
            opacity: 0;
            visibility: visible;
        }

        100% {
            opacity: 0;
            visibility: hidden;
        }
    }

    .loader-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999999;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        visibility: visible;
        will-change: opacity, visibility;
        pointer-events: auto;
    }

    .loader-container.removing {
        animation: fadeOutLoader 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards !important;
        pointer-events: none;
    }

    .loader-spinner {
        position: relative;
        width: 6rem;
        height: 6rem;
        animation: loaderSpin 3s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
        will-change: transform;
    }

    .loader-line {
        position: absolute;
        width: 3px;
        height: 3rem;
        background: var(--primary);
        border-radius: 999px;
        left: 50%;
        top: 50%;
        transform-origin: center 50%;
        will-change: opacity;
    }

    .loader-line-1 {
        transform: translateX(-50%) translateY(-100%) rotate(0deg);
        animation: loaderLineFade 1.8s ease-in-out infinite;
    }

    .loader-line-2 {
        transform: translateX(-50%) translateY(-100%) rotate(120deg);
        animation: loaderLineFade 1.8s ease-in-out infinite;
        animation-delay: 0.3s;
    }

    .loader-line-3 {
        transform: translateX(-50%) translateY(-100%) rotate(240deg);
        animation: loaderLineFade 1.8s ease-in-out infinite;
        animation-delay: 0.6s;
    }

}

@layer utilities {

    /* Utility Classes */
    .google-translate-hidden {
        position: absolute;
        top: -9999px;
        left: -9999px;
        opacity: 0;
        pointer-events: none;
    }

    .hidden {
        display: none !important;
    }

    .modal-open {
        transform: scale(1) translateY(0);
        opacity: 1;
        filter: blur(0px);
    }

    /* Dynamic News Sections */
    .dynamic-news-section {
        margin-bottom: 2.5rem;
    }

    .section-subtitle {
        margin-bottom: 1.5rem;
        font-size: 1.75rem;
        font-weight: 700;
    }

    /* Scroll Reveal Animation */
    .reveal {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
        transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
            transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: transform, opacity;
    }

    .reveal.reveal-active,
    .reveal.active {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
    }

    /* Staggered reveal - reduced delays for snappier feel */
    .news-carousel .reveal:nth-child(n) {
        transition-delay: 0.05s;
    }

    @media (max-width: 60.5rem) {
        .hero-headline {
            font-size: 3.5rem;
            letter-spacing: -0.09375rem;
        }

        .hero-subline {
            font-size: 1.2rem;
        }



        .section-title {
            font-size: 2.2rem;
        }

        .footer {
            padding-bottom: 0;
        }

        .about-grid,
        .footer-grid {
            grid-template-columns: 1fr;
            gap: 2.5rem;
        }

        .news-card {
            flex: 0 0 100%;
            /* Show 1 card fully on mobile */
        }

        /* Collapse bento grid to single column on mobile */
        .bento-grid {
            grid-template-columns: 1fr;

            .profile-card {
                grid-column: span 1 !important;
                min-height: 22rem !important;
            }
        }

        .partners-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .partner-card {
            padding: 1.25rem;
        }

        .about-text .section-title {
            text-align: center;
        }

        .about-text p {
            text-align: left;
            margin: 0 0 1.5625rem;
        }

        .about-stats {
            text-align: left;
            padding-left: 0;
            border-left: none;
        }

        .testimonials-grid {
            grid-template-columns: 1fr;
        }

        .footer-info,
        .footer-contact,
        .footer-socials,
        .footer-contact h3 {
            text-align: center;
        }

        .footer-logo {
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;

            .footer-logo-img {
                height: 5rem;
            }

            h3 {
                text-align: center;
            }
        }

        .footer-socials {
            justify-content: center;
        }

        .top-controls {
            right: 1.25rem;
            top: 1.25rem;
            padding: 0.25rem;
        }

        .control-btn {
            width: 2.25rem;
            height: 2.25rem;
        }
    }
}

/* Gallery Modal CSS */
.gallery-modal-content {
    max-width: 90vw;
    width: 65rem;
    max-height: 90vh;
    z-index: 2005;
    /* Must sit on top of everything inside the overlay */
}

/* Modal header override specifically for gallery */
.gallery-modal-content .modal-header {
    position: sticky;
    /* Keep it at the top while scrolling */
    background: inherit;
    z-index: 125;
}

.gallery-modal-content .modal-body {
    padding-top: 1rem;
    /* Reduced from 3.5rem since header is sticky */
}

.gallery-modal-content .modal-body h2 {
    margin-top: 0;
    /* Remove extra space above title */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 2rem;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.8rem;
    background-color: var(--glass-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

#gallery-bento {
    grid-column: span 3 !important;
    min-height: 22rem;
    background-image: linear-gradient(135deg, #FFB81C, #996e10);
}

@media (hover: hover) {
    .gallery-grid img:hover {
        transform: scale(1.05);
    }
}

.hidden-section {
    display: none !important;
}

/* Lightbox Modal */
#lightboxModal {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 3010;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 3010;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    scale: 1.1;
}

.lightbox-nav.prev {
    left: 2rem;
}

.lightbox-nav.next {
    right: 2rem;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 3.5rem;
        height: 3.5rem;
        background: rgba(0, 0, 0, 0.5);
    }

    .lightbox-nav.prev {
        left: 1rem;
    }

    .lightbox-nav.next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1.5rem;
        right: 1.5rem;
    }
}

#lightboxModal.hidden {
    display: none;
    pointer-events: none;
}

#lightboxModal.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}