/* =========================================================
   Bare Metal Recce: stylesheet (shared by home and articles)
   Mobile-first. Breakpoints: 700px (tablet), 1000px (desktop)

   Contents
     Base and variables   Stars   Layout   Header / nav   Hero
     Blog grid and cards   Article pages   Footer   Media queries
   ========================================================= */

/* ---------- Base and variables ---------- */
:root {
    --bg-1: #0a0a0a;
    --bg-2: #1a1a2e;
    --cyan: #00ffff;
    --cyan-dim: rgba(0, 255, 255, 0.3);
    --text: #e0e0e0;
    --text-soft: #b0b0b0;
    --text-faint: #8a8a8a;
    --panel: rgba(26, 26, 46, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;/* =========================================================
   Bare Metal Recce: stylesheet (shared by home and articles)
   Mobile-first. Breakpoints: 700px (tablet), 1000px (desktop)

   Contents
     Base and variables   Stars   Layout   Header / nav   Hero
     Blog grid and cards   Article pages   Footer   Media queries
   ========================================================= */

/* ---------- Base and variables ---------- */
:root {
    --bg-1: #0a0a0a;
    --bg-2: #1a1a2e;
    --cyan: #00ffff;
    --cyan-dim: rgba(0, 255, 255, 0.3);
    --text: #e0e0e0;
    --text-soft: #b0b0b0;
    --text-faint: #8a8a8a;
    --panel: rgba(26, 26, 46, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
    background-color: var(--bg-1);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Stars ---------- */
.stars {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
}
.star {
    position: absolute; width: 2px; height: 2px;
    background: #fff; border-radius: 50%;
    animation: twinkle 3s infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- Layout ---------- */
site-header, site-footer { display: block; }
site-header { position: sticky; top: 0; z-index: 100; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

main { flex: 1; }

/* ---------- Header / Nav (mobile first) ---------- */
.site-header {
    padding: 14px 0;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(10, 10, 10, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.logo {
    font-family: 'OCR A Extended', 'OCR A', 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;          /* 44px = comfortable touch target */
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--cyan-dim);
    border-radius: 6px;
    cursor: pointer;
}
.nav-toggle span {
    display: block; height: 2px; width: 100%;
    background: var(--cyan);
    transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

nav { display: none; width: 100%; }
nav.open { display: block; }

nav ul { display: flex; flex-direction: column; list-style: none; }

nav a {
    display: block;
    padding: 14px 4px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    border-top: 1px solid rgba(0, 255, 255, 0.12);
    transition: color 0.3s, text-shadow 0.3s;
}
nav a:hover,
nav a[aria-current="page"] {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 {
    font-size: clamp(30px, 7vw, 48px);
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}
.hero p {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-soft);
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(22px, 4vw, 32px);
    margin: 24px 0 8px;
    text-align: center;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.notice { text-align: center; color: var(--text-soft); padding: 20px 0; }

/* ---------- Blog grid / cards ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 48px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--cyan-dim);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.blog-card.coming-soon { opacity: 0.75; }

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--cyan-dim);
}
.blog-image--placeholder {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(26, 26, 46, 0.7));
}

.blog-content { padding: 22px; display: flex; flex-direction: column; flex: 1; }

.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.blog-category {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(0, 255, 255, 0.2);
    color: var(--cyan);
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card h3 { font-size: 20px; line-height: 1.3; margin-bottom: 10px; color: #fff; }
.blog-card p { color: var(--text-soft); margin-bottom: 14px; }
.blog-meta { font-size: 14px; color: var(--text-faint); margin-bottom: 14px; }

.read-more {
    margin-top: auto;
    align-self: flex-start;
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;                     /* bigger tap area */
    transition: text-shadow 0.3s;
}
.read-more:hover { text-shadow: 0 0 10px rgba(0, 255, 255, 0.8); }

/* ---------- Article pages ---------- */
.article {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 0 56px;
}
.article-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--cyan-dim); }
.article-head h1 {
    font-size: clamp(28px, 6vw, 40px);
    line-height: 1.2;
    color: var(--cyan);
    margin-bottom: 12px;
    text-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
}
.back-link {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 0;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
}
.back-link:hover { color: var(--cyan); }

.article-body { font-size: 17px; line-height: 1.75; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: 26px; color: #fff; margin-top: 1.8em; line-height: 1.3; }
.article-body h3 { font-size: 20px; color: var(--cyan); margin-top: 1.5em; }
.article-body p { color: var(--text); }
.article-body a { color: var(--cyan); text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: 0.4em; }
.article-body img { border-radius: 8px; border: 1px solid var(--cyan-dim); margin-inline: auto; height: auto; }
.article-body figure figcaption { font-size: 14px; color: var(--text-faint); margin-top: 8px; text-align: center; }
.article-body blockquote {
    border-left: 3px solid var(--cyan);
    padding: 4px 0 4px 18px;
    color: var(--text-soft);
}
.article-body code {
    font-family: Consolas, 'SF Mono', Menlo, monospace;
    font-size: 0.92em;
    background: rgba(0, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}
.article-body pre {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--cyan-dim);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;                   /* scroll inside the block on phones */
    -webkit-overflow-scrolling: touch;
}
.article-body pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; }
.article-body table { border-collapse: collapse; width: 100%; min-width: 480px; }
.article-body th, .article-body td { border: 1px solid var(--cyan-dim); padding: 10px 12px; text-align: left; }
.article-body th { background: rgba(0, 255, 255, 0.1); color: var(--cyan); }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding: 24px 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    color: var(--text-faint);
    background: rgba(10, 10, 10, 0.85);
    font-size: 14px;
}

/* =========================================================
   Tablet and up (>= 700px)
   ========================================================= */
@media (min-width: 700px) {
    .container { padding: 0 32px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .hero { padding: 72px 0 32px; }
}

/* =========================================================
   Desktop (>= 1000px): nav sits inline, hamburger hidden
   ========================================================= */
@media (min-width: 1000px) {
    .site-header { padding: 26px 0; }
    .logo { font-size: 34px; letter-spacing: 3px; }
    .nav-toggle { display: none; }

    nav { display: block; width: auto; }
    nav ul { flex-direction: row; gap: 30px; }
    nav a {
        padding: 0;
        border-top: 0;
        position: relative;
    }
    nav a::after {
        content: '';
        position: absolute; left: 0; bottom: -6px;
        width: 0; height: 2px;
        background: var(--cyan);
        transition: width 0.3s;
    }
    nav a:hover::after,
    nav a[aria-current="page"]::after { width: 100%; }

    .blog-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-card:hover {
        transform: translateY(-5px);
        border-color: var(--cyan);
        box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
    }
}

/* Hover effects only on devices that can hover (avoids sticky hover on phones) */
@media (hover: none) {
    .blog-card:hover { transform: none; box-shadow: none; }
}

/* Respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .star { animation: none; opacity: 0.6; }
    * { transition-duration: 0.01ms !important; }
}

    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
    background-color: var(--bg-1);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Stars ---------- */
.stars {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
}
.star {
    position: absolute; width: 2px; height: 2px;
    background: #fff; border-radius: 50%;
    animation: twinkle 3s infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- Layout ---------- */
site-header, site-footer { display: block; }
site-header { position: sticky; top: 0; z-index: 100; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

main { flex: 1; }

/* ---------- Header / Nav (mobile first) ---------- */
.site-header {
    padding: 14px 0;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(10, 10, 10, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.logo {
    font-family: 'OCR A Extended', 'OCR A', 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;          /* 44px = comfortable touch target */
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--cyan-dim);
    border-radius: 6px;
    cursor: pointer;
}
.nav-toggle span {
    display: block; height: 2px; width: 100%;
    background: var(--cyan);
    transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

nav { display: none; width: 100%; }
nav.open { display: block; }

nav ul { display: flex; flex-direction: column; list-style: none; }

nav a {
    display: block;
    padding: 14px 4px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    border-top: 1px solid rgba(0, 255, 255, 0.12);
    transition: color 0.3s, text-shadow 0.3s;
}
nav a:hover,
nav a[aria-current="page"] {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 {
    font-size: clamp(30px, 7vw, 48px);
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}
.hero p {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-soft);
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(22px, 4vw, 32px);
    margin: 24px 0 8px;
    text-align: center;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.notice { text-align: center; color: var(--text-soft); padding: 20px 0; }

/* ---------- Blog grid / cards ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 48px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--cyan-dim);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.blog-card.coming-soon { opacity: 0.75; }

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--cyan-dim);
}
.blog-image--placeholder {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(26, 26, 46, 0.7));
}

.blog-content { padding: 22px; display: flex; flex-direction: column; flex: 1; }

.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.blog-category {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(0, 255, 255, 0.2);
    color: var(--cyan);
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card h3 { font-size: 20px; line-height: 1.3; margin-bottom: 10px; color: #fff; }
.blog-card p { color: var(--text-soft); margin-bottom: 14px; }
.blog-meta { font-size: 14px; color: var(--text-faint); margin-bottom: 14px; }

.read-more {
    margin-top: auto;
    align-self: flex-start;
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;                     /* bigger tap area */
    transition: text-shadow 0.3s;
}
.read-more:hover { text-shadow: 0 0 10px rgba(0, 255, 255, 0.8); }

/* ---------- Article pages ---------- */
.article {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 0 56px;
}
.article-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--cyan-dim); }
.article-head h1 {
    font-size: clamp(28px, 6vw, 40px);
    line-height: 1.2;
    color: var(--cyan);
    margin-bottom: 12px;
    text-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
}
.back-link {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 0;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
}
.back-link:hover { color: var(--cyan); }

.article-body { font-size: 17px; line-height: 1.75; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: 26px; color: #fff; margin-top: 1.8em; line-height: 1.3; }
.article-body h3 { font-size: 20px; color: var(--cyan); margin-top: 1.5em; }
.article-body p { color: var(--text); }
.article-body a { color: var(--cyan); text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: 0.4em; }
.article-body img { border-radius: 8px; border: 1px solid var(--cyan-dim); margin-inline: auto; height: auto; }
.article-body figure figcaption { font-size: 14px; color: var(--text-faint); margin-top: 8px; text-align: center; }
.article-body blockquote {
    border-left: 3px solid var(--cyan);
    padding: 4px 0 4px 18px;
    color: var(--text-soft);
}
.article-body code {
    font-family: Consolas, 'SF Mono', Menlo, monospace;
    font-size: 0.92em;
    background: rgba(0, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}
.article-body pre {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--cyan-dim);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;                   /* scroll inside the block on phones */
    -webkit-overflow-scrolling: touch;
}
.article-body pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; }
.article-body table { border-collapse: collapse; width: 100%; min-width: 480px; }
.article-body th, .article-body td { border: 1px solid var(--cyan-dim); padding: 10px 12px; text-align: left; }
.article-body th { background: rgba(0, 255, 255, 0.1); color: var(--cyan); }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding: 24px 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    color: var(--text-faint);
    background: rgba(10, 10, 10, 0.85);
    font-size: 14px;
}

/* =========================================================
   Tablet and up (>= 700px)
   ========================================================= */
@media (min-width: 700px) {
    .container { padding: 0 32px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .hero { padding: 72px 0 32px; }
}

/* =========================================================
   Desktop (>= 1000px): nav sits inline, hamburger hidden
   ========================================================= */
@media (min-width: 1000px) {
    .site-header { padding: 26px 0; }
    .logo { font-size: 34px; letter-spacing: 3px; }
    .nav-toggle { display: none; }

    nav { display: block; width: auto; }
    nav ul { flex-direction: row; gap: 30px; }
    nav a {
        padding: 0;
        border-top: 0;
        position: relative;
    }
    nav a::after {
        content: '';
        position: absolute; left: 0; bottom: -6px;
        width: 0; height: 2px;
        background: var(--cyan);
        transition: width 0.3s;
    }
    nav a:hover::after,
    nav a[aria-current="page"]::after { width: 100%; }

    .blog-grid { grid-template-columns: repeat(3, 1fr); }
    .blog-card:hover {
        transform: translateY(-5px);
        border-color: var(--cyan);
        box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
    }
}

/* Hover effects only on devices that can hover (avoids sticky hover on phones) */
@media (hover: none) {
    .blog-card:hover { transform: none; box-shadow: none; }
}

/* Respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .star { animation: none; opacity: 0.6; }
    * { transition-duration: 0.01ms !important; }
}
