*,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        html {
            margin: 0;
            padding: 0;
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            font-family: 'Montserrat', sans-serif;
        }

        /* ── Sidebar (desktop) + mobile header (match home) ── */
        #hae-sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: 72px;
            height: 100vh;
            background: white;
            border-right: 1px solid #e3e2e8;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding: 1.75rem 0;
            z-index: 40;
            overflow: visible;
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
        }

        #hae-sidebar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: #4CA1E7;
        }

        #hae-main {
            margin-left: 72px;
        }

        /* Mobile header (logo + hamburger) shown on small screens instead of sidebar */
        #about-mobile-header,
        #contact-mobile-header,
        .hae-inner-mobile-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 64px;
            padding: 0 1.25rem;
            display: none;
            align-items: center;
            justify-content: space-between;
            background: #ffffff;
            z-index: 45;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
        }

        #about-mobile-header img,
        #contact-mobile-header img,
        .hae-inner-mobile-header img {
            height: 36px;
            width: auto;
            object-fit: contain;
        }

        @media (max-width: 767px) {
            #hae-sidebar {
                display: none;
            }

            #about-mobile-header,
            #contact-mobile-header,
            #home-mobile-header,
            #projects-mobile-header,
            .hae-mobile-header {
                display: flex;
            }

            #hae-main {
                margin-left: 0 !important;
            }

            #mega-menu {
                left: 0;
                max-width: 100vw;
                width: min(300px, 100vw);
                transform: translateX(-100%);
            }

            #mega-menu.is-open {
                transform: translateX(0);
            }
        }

        .vtext {
            writing-mode: vertical-rl;
            transform: rotate(180deg);
            white-space: nowrap;
            line-height: 1;
        }

        /* Make nav dots more visible and fix active state */
        .nav-dot-wrap {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            cursor: pointer;
            text-decoration: none;
        }

        .nav-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #e3e2e8;
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .nav-dot-wrap:hover .nav-dot {
            background: #00aeef !important;
            width: 10px !important;
            height: 10px !important;
            box-shadow: 0 0 10px rgba(0, 174, 239, 0.5);
        }

        .nav-dot.active {
            background: #00aeef !important;
            width: 12px !important;
            height: 12px !important;
            box-shadow: 0 0 15px rgba(0, 174, 239, 0.8);
            border: 2px solid white;
        }

        /* Tooltip styling */
        .nav-tip {
            position: absolute;
            left: calc(100% + 14px);
            top: 50%;
            transform: translateY(-50%) translateX(-6px);
            background: #0d1428;
            color: white;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            padding: 6px 12px;
            border-radius: 4px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }

        .nav-tip::before {
            content: '';
            position: absolute;
            right: 100%;
            top: 50%;
            transform: translateY(-50%);
            border: 5px solid transparent;
            border-right-color: #0d1428;
        }

        .nav-dot-wrap:hover .nav-tip {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }

        .ham-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            width: 34px;
            height: 34px;
            border-radius: 8px;
            border: none;
            background: transparent;
            padding: 0;
            outline: none;
            cursor: pointer;
            transition: background 0.2s;
            flex-shrink: 0;
            appearance: none;
        }

        .ham-btn:hover {
            background: rgba(76, 161, 231, 0.08);
        }

        .ham-btn span {
            display: block;
            width: 17px;
            height: 1.5px;
            background: #21356A;
            border-radius: 2px;
            transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: center;
            pointer-events: none;
        }

        .ham-btn.is-open span:nth-child(1) {
            transform: translateY(5.5px) rotate(45deg);
            background: #4CA1E7;
        }

        .ham-btn.is-open span:nth-child(2) {
            opacity: 0;
            transform: scaleX(0);
        }

        .ham-btn.is-open span:nth-child(3) {
            transform: translateY(-5.5px) rotate(-45deg);
            background: #4CA1E7;
        }

        .ham-btn:focus-visible {
            outline: 2px solid #4CA1E7;
            outline-offset: 2px;
        }

        /* Special styling for Get in touch */
        .nav-dot-wrap.get-in-touch .get-in-touch-text {
            color: #00aeef;
            transition: color 0.2s;
            font-size: 9px !important;
            font-weight: 800 !important;
        }

        .nav-dot-wrap.get-in-touch:hover .get-in-touch-text {
            color: #25408f;
            transform: scale(1.05);
            transition: all 0.2s;
        }

        .sidebar-social {
            color: #3C71C2;
            font-size: 1rem;
            transition: color 0.2s, transform 0.2s;
            text-decoration: none;
        }

        .sidebar-social:hover {
            color: #4CA1E7;
            transform: translateY(-2px);
        }

        /* ── Mega menu (shared with home) ── */
        #mega-menu {
            position: fixed;
            top: 0;
            left: 72px;
            width: 300px;
            max-width: calc(100vw - 72px);
            min-width: 0;
            height: 100vh;
            background: #0d1428;
            z-index: 39;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            text-align: left;
            padding: 2rem 1.75rem;
            transform: translateX(calc(-100% - 72px));
            transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 6px 0 36px rgba(0, 0, 0, 0.28);
            overflow-y: auto;
            overflow-x: hidden;
        }

        #mega-menu.is-open {
            transform: translateX(0);
        }

        #mega-menu>* {
            width: 100%;
            box-sizing: border-box;
            min-width: 0;
        }

        #menu-bd {
            position: fixed;
            inset: 0;
            background: rgba(10, 15, 40, 0.5);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 38;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.32s ease;
        }

        #menu-bd.is-open {
            opacity: 1;
            pointer-events: all;
        }

        #mega-menu .m-cat {
            font-size: 9px;
            font-weight: 800;
            letter-spacing: 0.3em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.28);
            margin: 0 0 0.6rem 0;
            padding: 0;
            text-align: left;
        }

        .m-cat+.m-cat {
            margin-top: 1.5rem;
        }

        #mega-menu .m-link {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            column-gap: 0.8rem;
            padding: 0.65rem 0;
            width: 100%;
            text-align: left;
            color: rgba(255, 255, 255, 0.62);
            text-decoration: none !important;
            font-weight: 600;
            font-size: 0.85rem;
            line-height: 1.35;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: color 0.18s ease, background 0.18s ease;
        }

        .m-link.no-border {
            border-bottom: none;
        }

        #mega-menu .m-link.m-link-child {
            padding-left: 1.85rem;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.52);
        }

        #mega-menu .m-link.m-link-child .m-icon {
            width: 26px;
            height: 26px;
            font-size: 0.78rem;
        }

        #mega-menu .m-link.m-link-current {
            color: #4CA1E7;
            background: rgba(76, 161, 231, 0.12);
            border-radius: 10px;
            padding-left: 0.35rem;
            padding-right: 0.35rem;
        }

        #mega-menu .m-link.m-link-current .m-icon {
            background: #4CA1E7;
            color: #fff;
        }

        #mega-menu .m-link.m-link-current .m-arrow {
            color: #4CA1E7;
            opacity: 1;
        }

        .m-link:hover {
            color: #4CA1E7;
        }

        .m-link:hover .m-icon {
            background: #4CA1E7;
            color: white;
        }

        .m-link.m-link-current:hover .m-icon {
            background: #4CA1E7;
            color: #fff;
        }

        .m-link:focus-visible {
            outline: 2px dashed #4CA1E7;
            outline-offset: 2px;
        }

        .m-icon {
            width: 30px;
            height: 30px;
            border-radius: 7px;
            background: rgba(255, 255, 255, 0.06);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            color: #4CA1E7;
            flex-shrink: 0;
            transition: all 0.18s;
        }

        .m-arrow {
            justify-self: end;
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.18);
            transition: all 0.18s;
        }

        .m-link:hover .m-arrow {
            color: #4CA1E7;
            transform: translateX(3px);
        }

        .m-social {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.14);
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(255, 255, 255, 0.45);
            font-size: 0.85rem;
            text-decoration: none;
            transition: all 0.2s;
        }

        .m-social:hover {
            background: #4CA1E7;
            border-color: #4CA1E7;
            color: white;
            transform: translateY(-2px);
        }

        @keyframes slideInL {
            from {
                opacity: 0;
                transform: translateX(-14px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        #mega-menu.is-open .m-anim {
            animation: slideInL 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        #mega-menu.is-open .m-anim:nth-child(1) {
            animation-delay: 40ms;
        }

        #mega-menu.is-open .m-anim:nth-child(2) {
            animation-delay: 55ms;
        }

        #mega-menu.is-open .m-anim:nth-child(3) {
            animation-delay: 75ms;
        }

        #mega-menu.is-open .m-anim:nth-child(4) {
            animation-delay: 100ms;
        }

        #mega-menu.is-open .m-anim:nth-child(5) {
            animation-delay: 125ms;
        }

        #mega-menu.is-open .m-anim:nth-child(6) {
            animation-delay: 150ms;
        }

        #mega-menu.is-open .m-anim:nth-child(7) {
            animation-delay: 175ms;
        }

        #mega-menu.is-open .m-anim:nth-child(8) {
            animation-delay: 200ms;
        }

        #mega-menu.is-open .m-anim:nth-child(9) {
            animation-delay: 225ms;
        }

        #mega-menu.is-open .m-anim:nth-child(10) {
            animation-delay: 250ms;
        }

        #mega-menu.is-open .m-anim:nth-child(11) {
            animation-delay: 275ms;
        }

        #mega-menu.is-open .m-anim:nth-child(12) {
            animation-delay: 300ms;
        }

        #mega-menu.is-open .m-anim:nth-child(13) {
            animation-delay: 325ms;
        }

        #mega-menu.is-open .m-anim:nth-child(14) {
            animation-delay: 350ms;
        }

        
#home-mobile-header,
.hae-mobile-header,
#projects-mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 1.25rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    z-index: 45;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

#home-mobile-header img,
.hae-mobile-header img,
#projects-mobile-header img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

#hae-top {
    margin-left: -72px;
    width: calc(100% + 72px);
    padding-left: 72px;
}

@media (max-width: 767px) {
    #hae-top {
        margin-left: 0 !important;
        width: 100vw !important;
        padding-left: 0 !important;
        left: 0;
        position: relative;
    }
}
