:root {
    --hm-nav-height: 74px;
    --hm-nav-bg: rgba(7, 7, 10, 0.92);
    --hm-nav-border: rgba(255, 255, 255, 0.08);
    --hm-nav-text: #f2f2f4;
    --hm-nav-muted: #9a9aac;
    --hm-nav-panel: rgba(14, 14, 20, 0.97);
    --hm-nav-panel-border: rgba(255, 255, 255, 0.09);
    --hm-nav-red: #e0001e;
    --hm-nav-cyan: #00d4ff;
    --hm-nav-lime: #b8ff00;
    --hm-nav-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hm-masthead {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1400;
    background: var(--hm-nav-bg);
    border-bottom: 1px solid var(--hm-nav-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hm-masthead::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.45), transparent);
    pointer-events: none;
}

.hm-masthead-inner {
    max-width: 1280px;
    min-height: var(--hm-nav-height);
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
}

.hm-brand {
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.hm-brand-mark {
    color: var(--hm-nav-text);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    line-height: 1;
    text-transform: uppercase;
}

.hm-brand-subtitle {
    color: var(--hm-nav-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hm-quicklinks {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hm-quicklinks a {
    color: var(--hm-nav-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    transition: color 0.18s ease, text-shadow 0.18s ease;
}

.hm-quicklinks a:hover,
.hm-quicklinks a:focus-visible,
.hm-quicklinks a[aria-current="page"] {
    color: var(--hm-nav-text);
    text-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

.hm-menu-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.hm-menu-toggle {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 212, 255, 0.24);
    background: rgba(255, 255, 255, 0.02);
    color: var(--hm-nav-text);
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hm-menu-toggle:hover,
.hm-menu-toggle:focus-visible,
.hm-menu-toggle[aria-expanded="true"] {
    border-color: rgba(0, 212, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.18), 0 0 20px rgba(0, 212, 255, 0.14);
    background: rgba(0, 212, 255, 0.05);
}

.hm-menu-toggle--secondary {
    border-color: rgba(224, 0, 30, 0.22);
}

.hm-menu-toggle--secondary:hover,
.hm-menu-toggle--secondary:focus-visible,
.hm-menu-toggle--secondary[aria-expanded="true"] {
    border-color: rgba(224, 0, 30, 0.7);
    box-shadow: 0 0 0 1px rgba(224, 0, 30, 0.16), 0 0 20px rgba(224, 0, 30, 0.14);
    background: rgba(224, 0, 30, 0.05);
}

.hm-menu-label {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.hm-menu-meta {
    color: var(--hm-nav-muted);
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hm-menu-panel {
    position: absolute;
    top: calc(100% + 1px);
    right: 24px;
    width: min(1040px, calc(100vw - 48px));
    padding: 18px;
    background: var(--hm-nav-panel);
    border: 1px solid var(--hm-nav-panel-border);
    box-shadow: var(--hm-nav-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.hm-menu-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hm-menu-panel--secondary {
    width: min(720px, calc(100vw - 48px));
}

.hm-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.hm-menu-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hm-menu-section {
    min-width: 0;
}

.hm-menu-heading {
    margin: 0 0 12px;
    color: var(--hm-nav-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

.hm-menu-link {
    margin-bottom: 10px;
    padding: 12px 12px 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.hm-menu-link:last-child {
    margin-bottom: 0;
}

.hm-menu-link:hover,
.hm-menu-link:focus-visible {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.hm-link-chip {
    min-width: 48px;
    padding: 7px 9px;
    border: 1px solid rgba(0, 212, 255, 0.22);
    color: var(--hm-nav-cyan);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.hm-menu-panel--secondary .hm-link-chip,
.hm-menu-toggle--secondary + .hm-menu-panel .hm-link-chip {
    border-color: rgba(224, 0, 30, 0.22);
    color: #ff6475;
}

.hm-link-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.hm-link-title {
    color: var(--hm-nav-text);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.hm-link-subtitle {
    color: var(--hm-nav-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

body.hm-menu-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .hm-masthead-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .hm-quicklinks,
    .hm-menu-actions {
        justify-content: flex-start;
    }

    .hm-menu-panel {
        left: 24px;
        right: 24px;
        width: auto;
    }
}

@media (max-width: 820px) {
    .hm-masthead-inner {
        padding: 12px 16px;
    }

    .hm-quicklinks {
        gap: 12px;
    }

    .hm-quicklinks a {
        font-size: 0.72rem;
    }

    .hm-menu-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-menu-toggle {
        align-items: stretch;
    }

    .hm-menu-grid,
    .hm-menu-grid--secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hm-brand-mark {
        font-size: 0.92rem;
        letter-spacing: 0.18em;
    }

    .hm-brand-subtitle {
        font-size: 0.62rem;
    }

    .hm-quicklinks {
        display: none;
    }

    .hm-menu-actions {
        grid-template-columns: 1fr;
    }

    .hm-menu-panel {
        left: 12px;
        right: 12px;
        padding: 14px;
    }

    .hm-link-title {
        font-size: 0.88rem;
    }

    .hm-link-subtitle {
        font-size: 0.76rem;
    }
}
