/*
 * CyberAsk Site Global Stylesheet
 * Provides consistent sticky header, shared fixes applied across all pages.
 * Loaded as the last stylesheet so overrides per-page inline styles.
 */

/* ──────────────────────────────────────────────
   Sticky Header — normalise across every page
   ────────────────────────────────────────────── */
header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    /* Consistent compact padding: same on every page */
    padding: 0.85rem clamp(1.75rem, 5vw, 6rem) !important;
    /* Frosted-glass dark background so vanta doesn't bleed through */
    background: rgba(2, 6, 23, 0.96) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.12) !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

/* Subtle shadow applied via JS when the page is scrolled */
header.ca-scrolled {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.55) !important;
    border-bottom-color: rgba(56, 189, 248, 0.22) !important;
}

/* Ensure logo stays at a consistent size */
header .logo {
    font-size: 1.25rem !important;
    white-space: nowrap;
}

/* Nav links — keep compact in sticky bar */
header nav ul,
header .nav-links {
    gap: 1.25rem !important;
}

header nav a,
header .nav-links a {
    font-size: 0.9rem !important;
}

/* ──────────────────────────────────────────────
   Body top padding compensation
   Give the first section breathing room after sticky header
   ────────────────────────────────────────────── */
body > main:first-of-type,
body > section:first-of-type {
    padding-top: 2rem;
}

/* ──────────────────────────────────────────────
   Blog card meta (date + read time)
   ────────────────────────────────────────────── */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.55);
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.blog-meta .meta-sep {
    opacity: 0.4;
}

.blog-meta time {
    color: rgba(56, 189, 248, 0.8);
}

.blog-meta .read-time {
    color: rgba(248, 250, 252, 0.55);
}

/* Blog post header meta row */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.6);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-meta time {
    color: #38bdf8;
    font-weight: 600;
}

.post-meta .post-author {
    color: rgba(248, 250, 252, 0.55);
}

.post-meta .post-category {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ──────────────────────────────────────────────
   Focus ring normalisation (accessibility)
   ────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 3px;
}

/* ──────────────────────────────────────────────
   Admin badge (shown in nav when admin session)
   ────────────────────────────────────────────── */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #f97316;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
}

.admin-badge:hover {
    background: rgba(249, 115, 22, 0.22);
    border-color: #f97316;
}
