/* ==========================================================================
   Command — Precision in Secure Operations
   Dark-only theme, tuned for long-form reading by SecOps + executive readers.
   Inter is loaded from Google Fonts. Palette built on the brand wordmark.
   accent #5b8def (the "C")  |  ink text #e6edf3
   ========================================================================== */

:root {
    color-scheme: dark;
    --bg: #0f1620;
    --surface: #161d27;
    --surface-2: #1b2330;
    --ink: #e6edf3;
    --ink-soft: #c4cdd8;
    --muted: #8b97a6;
    --border: #2a3340;
    --accent: #5b8def;
    --accent-dark: #80a8ff;
    --accent-soft: #1a2740;
    --nav-bg: #10161f;
    --nav-border: #222c39;
    --code-bg: #0c1118;
    --inline-code-bg: #1b2330;
    --inline-code-text: #9ec1ff;
    --tag-bg: #1a2740;
    --tag-text: #9ec1ff;
    --tag-border: #2c3a5a;
    --footer-bg: #0b1119;
    --footer-text: #c4cdd8;
    --footer-muted: #7a8694;
    --radius: 0.6rem;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--ink-soft);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.65;
    font-feature-settings: "cv05", "cv08", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: #0b1119; }

/* Visible keyboard focus across all interactive elements */
*:focus { outline: none; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.nav-link:focus-visible,
.theme-toggle:focus-visible,
.page-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* --- Navigation ---------------------------------------------------------- */
.navbar {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}
.navbar-brand { display: flex; align-items: center; padding: 0; }
.navbar-brand img { height: 26px; width: auto; display: block; }
.navbar-nav { align-items: center; }
.navbar-nav .nav-link {
    color: var(--ink-soft) !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.5rem 0.9rem;
    border-radius: 0.4rem;
    font-family: inherit;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent) !important;
    background-color: var(--accent-soft);
}

/* --- Main content surface ------------------------------------------------ */
.kubecontainer {
    background-color: var(--surface);
    padding: 2.75rem 2.75rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 576px) { .kubecontainer { padding: 1.75rem 1.25rem; } }

/* --- Typography ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.011em;
}
h1 { font-size: 2.3rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.lead { color: var(--ink-soft); }
.text-muted { color: var(--muted) !important; }

/* Hero subline under the H1 */
.hero-sub {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    margin-bottom: 1.25rem;
}

/* --- Advisory focus (home) ---------------------------------------------- */
.advisory-focus {
    margin-top: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}
.advisory-focus h3 {
    font-size: 0.92rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.advisory-focus p { color: var(--ink-soft); margin: 0; }

/* --- Article meta & tags ------------------------------------------------- */
.article-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.article-meta i { margin-right: 0.35rem; color: var(--accent); }
.article-title-link { text-decoration: none; }
.article-title-link h3 { color: var(--ink); transition: color 0.15s ease; }
.article-title-link:hover h3 { color: var(--accent); }

.tags { margin-bottom: 0.5rem; }
.tag {
    display: inline-block;
    background-color: var(--tag-bg);
    color: var(--tag-text);
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--tag-border);
    border-radius: 999px;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tag a { color: var(--tag-text); text-decoration: none; }
.tag:hover { background-color: var(--accent); border-color: var(--accent); }
.tag:hover a { color: #0b1119; }

.readmore { margin-top: 1em; }
.readmore a { color: var(--accent); text-decoration: none; font-weight: 600; }
.readmore a:hover { color: var(--accent-dark); text-decoration: underline; }

/* --- Article body (readability-tuned) ----------------------------------- */
.content { color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.75; }
.content p { margin-bottom: 1.15rem; }
.content h2, .content h3, .content h4 { margin-top: 2.2rem; margin-bottom: 0.8rem; }
.content ul, .content ol { margin-bottom: 1.15rem; padding-left: 1.4rem; }
.content li { margin-bottom: 0.4rem; }
.content li > ul, .content li > ol { margin-top: 0.4rem; margin-bottom: 0.4rem; }
.content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.content a:hover { color: var(--accent-dark); border-bottom-color: currentColor; }
.content img { max-width: 100%; height: auto; border-radius: 0.4rem; }
.content blockquote {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    margin: 1.5rem 0;
    padding: 0.85rem 1.2rem;
    color: var(--ink-soft);
    border-radius: 0 0.4rem 0.4rem 0;
}
.content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.97rem; }
.content th, .content td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.content thead th { background: var(--accent-soft); color: var(--ink); }
.content tbody tr:nth-child(even) { background: var(--surface-2); }
.content :not(pre) > code {
    background: var(--inline-code-bg);
    color: var(--inline-code-text);
    padding: 0.12rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.88em;
}
.blog-image { height: auto; width: 100%; }

/* --- Credentials & Training (About) ------------------------------------- */
.credentials { margin-top: 1.25rem; }
.cred-group { margin-bottom: 1.75rem; }
.cred-group h3 {
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.cred-list { list-style: none; padding: 0; margin: 0; }
.cred-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.85rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.cred-list li:last-child { border-bottom: none; }
.cred-code {
    flex: 0 0 auto;
    min-width: 3.4rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--tag-border);
    border-radius: 0.35rem;
    padding: 0.18rem 0.5rem;
}
.cred-name { color: var(--ink); font-weight: 500; }
.cred-meta { color: var(--muted); font-size: 0.88rem; margin-left: auto; }
.cred-meta a { color: var(--accent); text-decoration: none; border-bottom: none; }
.cred-meta a:hover { color: var(--accent-dark); text-decoration: underline; }
.cred-note { color: var(--muted); font-size: 0.9rem; margin: 0.4rem 0 0; }

/* --- Diagrams (pre-rendered dark-native SVG) ---------------------------- */
picture { display: block; }
.hero-diagram { display: block; margin: 2rem auto; max-width: min(100%, 860px); height: auto; }
@media (max-width: 640px) { .hero-diagram { max-width: min(100%, 420px); } }
figure.diagram { text-align: center; margin: 1.75rem 0; }
figure.diagram img { max-width: min(100%, 560px); height: auto; }

/* --- Code blocks & copy button ------------------------------------------ */
pre {
    position: relative;
    margin: 1.4rem 0;
    padding: 1rem 1.1rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}
pre code { background: none; padding: 0; }
.codehilite { background: transparent; }
.btn-copy {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    z-index: 10;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--accent);
    color: #0b1119;
    border: none;
    border-radius: 0.35rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.15s ease;
}
pre:hover .btn-copy, .btn-copy:focus { opacity: 0.95; }

/* --- Pagination ---------------------------------------------------------- */
.pagination .page-link { color: var(--accent); background: var(--surface); border-color: var(--border); }
.pagination .page-link:hover { background: var(--accent-soft); color: var(--accent-dark); }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: #0b1119; }

/* --- Cards --------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink-soft); }

/* --- Terminal window chrome (used in some articles) --------------------- */
.buttons { display: flex; gap: 0.5rem; }
.buttons span { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

/* --- Footer & quote ------------------------------------------------------ */
.footer { background: var(--footer-bg); color: var(--footer-muted); margin-top: 3rem; }
.quote { text-align: center; font-style: italic; font-size: 1.15rem; color: var(--footer-text); margin: 0; padding: 2.5rem 1.5rem 1rem; }
.quote p { margin: 0; line-height: 1.6; color: var(--footer-text); }
p.quote-author { font-size: 0.95rem; color: var(--footer-muted); margin-top: 0.5rem; font-style: normal; }
.footer-note { font-size: 0.88rem; line-height: 1.5; }
.footer .text-muted { color: var(--footer-muted) !important; }
.footer a.text-muted { transition: color 0.15s ease; }
.footer a.text-muted:hover { color: var(--footer-text) !important; }

/* --- Error pages --------------------------------------------------------- */
.content-section { padding: 1rem 0 2rem; }

/* ==========================================================================
   Command visual system — eyebrow labels, callouts, command status, code shell
   ========================================================================== */
.section-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    margin: 1.25rem 0 0.4rem;
}

.callout {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
}
.callout .callout-label {
    display: block;
    font-size: 0.72rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.callout p { margin: 0; color: var(--ink); font-weight: 500; }

.draft-banner {
    background: #3a2d18;
    border: 1px solid #f0a830;
    color: #f0a830;
    border-radius: 0.4rem;
    padding: 0.7rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}
.draft-banner strong { letter-spacing: 0.08em; }

/* Collapsible code (premium treatment: filename bar + Show/Hide) */
.code-collapse { margin: 1.6rem 0; }
.code-collapse > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 0.7rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--ink-soft);
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.code-collapse > summary::-webkit-details-marker { display: none; }
.code-collapse > summary::before { content: "▸"; color: var(--muted); }
.code-collapse[open] > summary::before { content: "▾"; }
.code-collapse > summary::after {
    content: "Show";
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
}
.code-collapse[open] > summary::after { content: "Hide"; }
.code-collapse > summary:hover { color: var(--accent); border-color: var(--accent); }
.code-collapse[open] > summary { border-radius: 0.5rem 0.5rem 0 0; border-bottom: none; }
.code-collapse[open] .codehilite { border-top-left-radius: 0; border-top-right-radius: 0; }
.code-collapse[open] pre {
    margin: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    max-height: 560px;
}
