/* Web7 developer navigation — click-driven services menu */
.developer-nav {
    position: relative;
    gap: .35rem;
    padding: .38rem;
    border: 1px solid rgba(91, 65, 138, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 12px 35px rgba(60, 34, 102, .07), inset 0 1px 0 rgba(255,255,255,.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .developer-nav {
    border-color: rgba(188, 157, 255, .12);
    background: rgba(20, 6, 36, .78);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255,255,255,.035);
}

.developer-nav-link {
    --nav-x: 50%;
    --nav-y: 50%;
    position: relative;
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 0 .92rem;
    color: inherit;
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: -.01em;
    isolation: isolate;
    transition: color .24s ease, border-color .24s ease, background .24s ease, transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease;
}

.developer-nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    border-radius: inherit;
    opacity: 0;
    background:
        radial-gradient(circle at var(--nav-x) var(--nav-y), rgba(96, 67, 255, .16), transparent 42%),
        linear-gradient(135deg, rgba(49,104,255,.06), rgba(125,63,246,.09));
    transition: opacity .22s ease;
}

.developer-nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3168ff 0%, #7440f5 54%, #a84dff 100%);
    box-shadow: 0 0 16px rgba(116, 64, 245, .42);
    transform: translateX(-50%);
    transition: width .3s cubic-bezier(.2,.8,.2,1);
}

.dark .developer-nav-link::before {
    background:
        radial-gradient(circle at var(--nav-x) var(--nav-y), rgba(155, 108, 255, .23), transparent 42%),
        linear-gradient(135deg, rgba(56,50,135,.22), rgba(110,53,225,.14));
}

.developer-nav-link:hover,
.developer-nav-link:focus-visible,
.developer-nav-link.is-active,
.services-nav.is-open > .developer-nav-link {
    color: #6934ef;
    border-color: rgba(109,54,242,.13);
    background: rgba(109,54,242,.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 8px 20px rgba(92,48,181,.07);
    transform: translateY(-1px);
}

.dark .developer-nav-link:hover,
.dark .developer-nav-link:focus-visible,
.dark .developer-nav-link.is-active,
.dark .services-nav.is-open > .developer-nav-link {
    color: #d3bcff;
    border-color: rgba(174,137,255,.13);
    background: rgba(126,72,244,.09);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 10px 24px rgba(0,0,0,.14);
}

.developer-nav-link:hover::before,
.developer-nav-link:focus-visible::before,
.developer-nav-link.is-active::before,
.services-nav.is-open > .developer-nav-link::before {
    opacity: 1;
}

.developer-nav-link:hover::after,
.developer-nav-link:focus-visible::after,
.developer-nav-link.is-active::after,
.services-nav.is-open > .developer-nav-link::after {
    width: 68%;
}

.developer-nav-glyph {
    width: 0;
    overflow: hidden;
    opacity: 0;
    color: #7040ef;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .71rem;
    font-weight: 800;
    white-space: nowrap;
    transform: translateX(6px);
    transition: width .24s cubic-bezier(.2,.8,.2,1), opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}

.dark .developer-nav-glyph {
    color: #b69aff;
}

.developer-nav-link:hover .developer-nav-glyph,
.developer-nav-link:focus-visible .developer-nav-glyph,
.developer-nav-link.is-active .developer-nav-glyph,
.services-nav.is-open > .developer-nav-link .developer-nav-glyph {
    width: 1.45rem;
    opacity: 1;
    transform: translateX(0);
}

.developer-nav-cursor {
    width: 0;
    height: 15px;
    border-radius: 2px;
    background: linear-gradient(#4b6fff, #9746ff);
    opacity: 0;
    box-shadow: 0 0 8px rgba(113, 66, 242, .28);
}

.developer-nav-link:hover .developer-nav-cursor,
.developer-nav-link:focus-visible .developer-nav-cursor {
    width: 2px;
    opacity: 1;
    animation: web7CursorBlink .9s steps(1, end) infinite;
}

.services-nav {
    position: relative;
}

.services-chevron {
    transition: transform .24s cubic-bezier(.2,.8,.2,1);
}

.services-nav.is-open .services-chevron {
    transform: rotate(180deg);
}

.services-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 80;
    width: 390px;
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid rgba(109,54,242,.13);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 26px 80px rgba(44, 20, 82, .18);
}

.dark .services-menu {
    border-color: rgba(174,137,255,.15);
    background: #12031f;
    box-shadow: 0 30px 90px rgba(0,0,0,.48);
}

.services-menu.is-open {
    display: block !important;
    animation: developerMenuIn .22s cubic-bezier(.2,.8,.2,1) both;
}

.services-menu-terminal {
    display: flex;
    align-items: center;
    gap: .38rem;
    min-height: 39px;
    border-bottom: 1px solid rgba(109,54,242,.09);
    background: #f8f6ff;
    padding: 0 .9rem;
}

.dark .services-menu-terminal {
    border-bottom-color: rgba(174,137,255,.09);
    background: #0d0217;
}

.terminal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.terminal-dot-red { background: #ff6b7b; }
.terminal-dot-yellow { background: #f4ba4b; }
.terminal-dot-green { background: #42c982; }

.terminal-path {
    margin-left: .42rem;
    color: #817493;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .68rem;
    letter-spacing: .01em;
}

.dark .terminal-path {
    color: #9f8daf;
}

.services-menu-content {
    padding: .55rem;
}

.service-menu-link {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .82rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: .76rem .8rem;
    transition: border-color .22s ease, background .22s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}

.service-menu-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(#3168ff, #8b42ff);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform .22s ease;
}

.service-menu-link:hover,
.service-menu-link:focus-visible {
    border-color: rgba(109,54,242,.1);
    background: #faf8ff;
    transform: translateX(2px);
}

.dark .service-menu-link:hover,
.dark .service-menu-link:focus-visible {
    border-color: rgba(174,137,255,.1);
    background: rgba(126,72,244,.08);
}

.service-menu-link:hover::before,
.service-menu-link:focus-visible::before {
    transform: scaleY(1);
}

.service-menu-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: #6d36f2;
    background: linear-gradient(145deg, rgba(49,104,255,.09), rgba(126,58,242,.12));
    transition: transform .24s cubic-bezier(.2,.8,.2,1), background .22s ease;
}

.dark .service-menu-icon {
    color: #c4a6ff;
    background: linear-gradient(145deg, rgba(49,104,255,.12), rgba(126,58,242,.18));
}

.service-menu-link:hover .service-menu-icon,
.service-menu-link:focus-visible .service-menu-icon {
    transform: rotate(-4deg) scale(1.05);
}

.service-menu-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.service-menu-title {
    display: block;
    font-size: .86rem;
    font-weight: 800;
}

.service-menu-description {
    display: block;
    margin-top: .2rem;
    color: var(--web7-muted);
    font-size: .72rem;
    line-height: 1.45;
}

.service-menu-arrow {
    color: #7650e9;
    opacity: .55;
    transform: translate(-3px, 3px);
    transition: opacity .22s ease, transform .22s ease;
}

.service-menu-link:hover .service-menu-arrow,
.service-menu-link:focus-visible .service-menu-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.service-menu-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .3rem;
    border: 1px solid rgba(109,54,242,.12);
    border-radius: 13px;
    background: #f4efff;
    padding: .72rem .85rem;
    color: #6d36f2;
    font-size: .78rem;
    font-weight: 800;
    transition: background .22s ease, transform .22s ease;
}

.dark .service-menu-all {
    border-color: rgba(174,137,255,.12);
    background: rgba(126,72,244,.12);
    color: #c4a6ff;
}

.service-menu-all:hover,
.service-menu-all:focus-visible {
    background: #ebe3ff;
    transform: translateY(-1px);
}

.dark .service-menu-all:hover,
.dark .service-menu-all:focus-visible {
    background: rgba(126,72,244,.18);
}

.mobile-nav-link {
    display: block;
    border-radius: 12px;
    padding: .65rem .75rem;
    font-size: .875rem;
    font-weight: 800;
    transition: background .2s ease, color .2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    color: #6d36f2;
    background: rgba(109,54,242,.08);
}

.dark .mobile-nav-link:hover,
.dark .mobile-nav-link:focus-visible {
    color: #cdb5ff;
    background: rgba(126,72,244,.1);
}

/* Theme switch */
.theme-switch-track {
    width: 74px !important;
    height: 38px !important;
    padding: 3px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(91, 65, 138, .16) !important;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,240,255,.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 24px rgba(65,38,118,.08) !important;
    overflow: hidden;
}

.dark .theme-switch-track {
    border-color: rgba(188, 157, 255, .17) !important;
    background: linear-gradient(135deg, rgba(30,12,50,.98), rgba(13,3,26,.99)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 28px rgba(0,0,0,.28) !important;
}

.theme-switch-track::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: radial-gradient(circle at 25% 35%, rgba(255,202,92,.17), transparent 28%), radial-gradient(circle at 78% 50%, rgba(135,82,255,.17), transparent 34%);
    pointer-events: none;
}

.theme-switch-track > span:first-child,
.theme-switch-track > span:nth-child(2) {
    z-index: 2;
    font-size: 12px !important;
    opacity: .72;
    transition: opacity .25s ease, transform .25s ease;
}

.theme-switch-track > span:first-child { left: 9px !important; }
.theme-switch-track > span:nth-child(2) { right: 9px !important; }

.theme-switch-thumb {
    width: 30px !important;
    height: 30px !important;
    position: absolute !important;
    left: 3px !important;
    top: 3px !important;
    border: 1px solid rgba(255,255,255,.75);
    background: linear-gradient(145deg, #ffffff, #eee8ff) !important;
    box-shadow: 0 5px 14px rgba(69,42,116,.18), inset 0 1px 0 rgba(255,255,255,.95) !important;
    transform: translateX(0) !important;
    transition: transform .34s cubic-bezier(.2,.85,.2,1), background .3s ease, box-shadow .3s ease !important;
}

.dark .theme-switch-thumb {
    transform: translateX(36px) !important;
    background: linear-gradient(145deg, #8356ff, #4b24c6) !important;
    border-color: rgba(207,190,255,.35);
    box-shadow: 0 5px 18px rgba(101,56,230,.38), inset 0 1px 0 rgba(255,255,255,.2) !important;
}

.theme-switch-track:hover .theme-switch-thumb {
    box-shadow: 0 7px 20px rgba(91,54,165,.24), 0 0 0 4px rgba(112,70,231,.06) !important;
}

@keyframes developerMenuIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(.975);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes web7CursorBlink {
    0%, 46% { opacity: 1; }
    47%, 100% { opacity: .12; }
}

@media (prefers-reduced-motion: reduce) {
    .developer-nav-link,
    .developer-nav-glyph,
    .developer-nav-cursor,
    .services-chevron,
    .theme-switch-thumb {
        animation: none !important;
        transition-duration: .001ms !important;
    }
}
