/* Shared site chrome for every Vexorium page: layout container, sticky header,
   on-page navigator, breadcrumb and footer. Page styles live inline in each page. */
:root {
    --site-bg: #050515;
    --site-cyan: #00ffff;
    --site-text: #e0e0f0;
    --site-muted: #a9abc6;
    --site-line: rgba(255, 255, 255, 0.1);
    --site-gutter: 20px;
    --site-bar-h: 64px;
    --site-subnav-h: 44px;
    /* Anchor targets land below the header and the on-page navigator. */
    --site-offset: calc(var(--site-bar-h) + var(--site-subnav-h) + 16px);
}

html {
    scroll-padding-top: var(--site-offset);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

.container {
    width: min(100% - max(var(--site-gutter), env(safe-area-inset-left, 0px))
                    - max(var(--site-gutter), env(safe-area-inset-right, 0px)), 1160px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 6px;
    color: var(--site-bg);
    background: var(--site-cyan);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus { top: 12px; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--site-line);
    background: var(--site-bg);
    font-family: 'Exo 2', sans-serif;
    line-height: 1.4;
}

.site-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--site-bar-h);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--site-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
}

/* The V mark from vexorium-logo.png, on the logo's white background */
.site-logo-mark {
    flex: none;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    padding: 4px;
    border-radius: 8px;
    background: #ffffff;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--site-text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover { color: #ffffff; }

.site-nav a[aria-current]::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 8px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--site-cyan);
}

.site-nav .site-contact {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(0, 255, 255, 0.55);
    border-radius: 6px;
    color: var(--site-cyan);
}

.site-nav .site-contact:hover {
    color: var(--site-bg);
    background: var(--site-cyan);
}

/* On-page navigator: revealed by site.js once the first screen scrolls away */
.page-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    border-bottom: 1px solid var(--site-line);
    background: #0a0a20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.site-header.is-scrolled .page-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.page-nav-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--site-subnav-h);
}

.page-nav-label {
    flex: none;
    color: var(--site-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-nav-links {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.page-nav-links::-webkit-scrollbar { display: none; }

.page-nav-links a {
    display: flex;
    align-items: center;
    height: var(--site-subnav-h);
    padding: 0 10px;
    border-bottom: 2px solid transparent;
    color: var(--site-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.page-nav-links a:hover { color: #ffffff; }

.page-nav-links a[aria-current] {
    border-bottom-color: var(--site-cyan);
    color: var(--site-cyan);
}

.to-top {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: var(--site-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.to-top:hover {
    border-color: var(--site-cyan);
    color: var(--site-cyan);
}

.site-header a:focus-visible,
.breadcrumb a:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* The link row scrolls, which clips anything drawn outside it. */
.site-header .page-nav-links a:focus-visible { outline-offset: -2px; }

/* Breadcrumb on pages below the homepage */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 0;
    color: var(--site-muted);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0;
    list-style: none;
    text-transform: none;
}

.breadcrumb li + li::before {
    content: '/';
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
    color: var(--site-text);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--site-cyan);
    text-decoration: underline;
}

/* Footer */
.site-footer {
    padding: 28px 0 36px;
    border-top: 1px solid var(--site-line);
    color: var(--site-muted);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--site-text);
    text-decoration: none;
}

.site-footer a:hover { color: var(--site-cyan); }

.site-footer p { margin: 0; }

@media (max-width: 900px) {
    .page-nav-label { display: none; }
    .page-nav-inner { gap: 8px; }
    .page-nav-links {
        margin-left: -8px;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    }
    .page-nav-links a { padding: 0 8px; }
}

@media (max-width: 720px) {
    :root {
        --site-gutter: 16px;
        --site-bar-h: 56px;
    }

    .site-logo { gap: 8px; font-size: 1.05rem; }
    .site-logo-mark { width: 30px; height: 30px; padding: 3px; border-radius: 7px; }
    .site-nav { gap: 14px; }
    .site-nav a { font-size: 0.875rem; }
    .site-nav .site-contact { padding: 0 12px; }
    .site-contact-extra { display: none; }
    .page-nav-links a { font-size: 0.85rem; }
}

/* Phones: keep the logo and all three links on one row. */
@media (max-width: 419px) {
    .site-bar { gap: 8px; }
    .site-logo { gap: 6px; font-size: 0.9rem; letter-spacing: 0; }
    .site-logo-mark { width: 28px; height: 28px; }
    .site-nav { gap: 10px; }
    .site-nav a { font-size: 0.8125rem; }
    .site-nav .site-contact { padding: 0 8px; }
}

/* Smallest phones: the V mark alone stands in for the name. */
@media (max-width: 359px) {
    .site-logo-text { display: none; }
}

@media print {
    .skip-link, .site-header, .breadcrumb { display: none; }
    .site-footer nav { display: none; }
}
