/* ═══════════════════════════════════════════════════════════════════════
   HandsOnIT — Main Stylesheet
   Brand: Dark navy bg · Orange accent · Blue/Cyan highlights
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
    --bg:          #070d1a;
    --bg-card:     #0d1b2e;
    --bg-elevated: #112236;
    --border:      #1a2d4a;
    --border-hover:#2a4a70;

    --orange:      #f97316;
    --orange-dark: #ea580c;
    --blue:        #3b82f6;
    --blue-dark:   #2563eb;
    --cyan:        #06b6d4;

    --text:        #f1f5f9;
    --text-muted:  #94a3b8;
    --text-faint:  #64748b;

    --radius:      8px;
    --radius-lg:   12px;
    --shadow:      0 4px 24px rgba(0,0,0,.5);

    --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:   'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    --container:   1200px;
    --header-h:    64px;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}
.site-main { flex: 1; }
.page-content { padding: 48px 20px; max-width: var(--container); margin: 0 auto; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 13, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}
.site-logo img { height: 44px; width: auto; }
.site-logo:hover { text-decoration: none; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1;
}
.main-nav ul li a {
    display: block;
    padding: 6px 10px;
    color: var(--text-muted);
    font-size: 14px;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--text);
    background: var(--bg-elevated);
    text-decoration: none;
}
.main-nav ul li a.active { color: var(--orange); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.nav-search-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}
.nav-search-icon:hover { color: var(--text); background: var(--bg-elevated); text-decoration: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .2s, color .2s, border-color .2s, transform .1s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.btn-yt { background: #ff0000; color: #fff; border-color: #ff0000; font-size: 13px; padding: 7px 14px; }
.btn-yt:hover { background: #cc0000; border-color: #cc0000; }

.btn-lg { padding: 12px 28px; font-size: 16px; }

/* ─── Badges & Tags ───────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-category { background: rgba(249,115,22,.15); color: var(--orange); border: 1px solid rgba(249,115,22,.3); }

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
    transition: color .2s, border-color .2s;
}
.tag:hover { color: var(--cyan); border-color: var(--cyan); text-decoration: none; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero-inner {
    min-height: 520px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card);
    display: flex;
    align-items: flex-end;
    position: relative;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(7,13,26,.97) 0%,
        rgba(7,13,26,.7) 50%,
        rgba(7,13,26,.2) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 48px;
    padding-bottom: 64px;
    max-width: 760px;
}
.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 12px 0;
    color: var(--text);
}
.hero-excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 600px;
}
.hero-meta {
    display: flex;
    gap: 16px;
    color: var(--text-faint);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ─── Article Cards ───────────────────────────────────────────────────────── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .25s, transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.article-card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-elevated);
}
.article-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.article-card:hover .article-card-thumb img { transform: scale(1.04); }
.article-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: rgba(7,13,26,.8);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--orange);
    border: 1px solid rgba(249,115,22,.3);
}
.article-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.article-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}
.article-card-title a { color: var(--text); }
.article-card-title a:hover { color: var(--orange); text-decoration: none; }
.article-card-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}
.article-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-faint);
    margin-top: auto;
}

/* ─── Section Titles ──────────────────────────────────────────────────────── */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 12px;
}
.section-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.articles-section { margin-bottom: 64px; }

/* ─── YouTube Section ─────────────────────────────────────────────────────── */
.yt-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 64px;
}
.yt-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.yt-card {
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: border-color .2s, transform .2s;
}
.yt-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.yt-thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}
.yt-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.yt-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.3);
    transition: background .2s;
}
.yt-card:hover .yt-play-btn { background: rgba(0,0,0,.5); }
.yt-card-title {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ─── YouTube Embed Card (article page) ───────────────────────────────────── */
.yt-embed-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 32px 0;
    cursor: pointer;
    transition: border-color .2s;
    max-width: 700px;
}
.yt-embed-card:hover { border-color: var(--orange); }
.yt-embed-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}
.yt-embed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-embed-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    transition: background .2s;
}
.yt-embed-card:hover .yt-embed-play { background: rgba(0,0,0,.55); }
.yt-embed-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 14px;
}

/* ─── YouTube Modal ───────────────────────────────────────────────────────── */
.yt-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.yt-modal[hidden] { display: none; }
.yt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(4px);
}
.yt-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
}
.yt-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    opacity: .7;
    transition: opacity .2s;
}
.yt-modal-close:hover { opacity: 1; }
.yt-modal-iframe-wrap {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.yt-modal-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── Category Header ─────────────────────────────────────────────────────── */
.category-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
}
.category-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}
.category-icon-lg { font-size: 3rem; line-height: 1; }
.category-header h1 { font-size: 2rem; font-weight: 800; }
.category-header p { color: var(--text-muted); margin-top: 4px; }

.tag-filter-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    display: flex;
    overflow-x: auto;
}
.tag-filter-bar .container {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: color .2s, border-color .2s, background .2s;
}
.tag-pill:hover, .tag-pill.active {
    color: var(--orange);
    border-color: var(--orange);
    background: rgba(249,115,22,.1);
    text-decoration: none;
}
.tag-count {
    background: var(--bg);
    color: var(--text-faint);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
}

/* ─── Article Full Page ───────────────────────────────────────────────────── */
.article-full { padding: 48px 0; }
.article-header { margin-bottom: 32px; }
.article-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-muted);
}
.article-date, .article-readtime, .article-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.article-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
}
.article-lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.article-hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    max-height: 480px;
}
.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 480px;
}

/* ─── Prose (Article Body) ────────────────────────────────────────────────── */
.prose {
    max-width: 780px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 32px;
}
.prose h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 40px 0 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.prose h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--cyan);
}
.prose h4 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 8px; }
.prose p { margin-bottom: 20px; }
.prose a { color: var(--blue); }
.prose a:hover { color: var(--cyan); }
.prose strong { color: var(--text); }
.prose em { color: var(--text-muted); }
.prose ul, .prose ol { margin: 16px 0 20px 0; padding-left: 0; }
.prose ul li, .prose ol li {
    padding: 4px 0 4px 24px;
    position: relative;
    color: var(--text-muted);
}
.prose ul li::before {
    content: '▸';
    position: absolute;
    left: 4px;
    color: var(--orange);
}
.prose ol { counter-reset: list; }
.prose ol li::before {
    content: counter(list) '.';
    counter-increment: list;
    position: absolute;
    left: 0;
    color: var(--orange);
    font-weight: 700;
}
.prose blockquote {
    border-left: 3px solid var(--orange);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-style: italic;
}
.prose hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}
.prose img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 20px 0;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.prose th, .prose td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.prose th { background: var(--bg-elevated); color: var(--text); font-weight: 600; }
.prose td { color: var(--text-muted); }

/* Code blocks */
.prose code {
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
    color: var(--cyan);
}
.prose pre {
    background: #0a0f1e;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
}
.prose pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .9rem;
    color: #e2e8f0;
    line-height: 1.7;
}
/* Bash/terminal blocks */
.prose pre.language-bash,
.prose pre.language-sh,
.prose pre.language-shell {
    background: #040810;
    border-color: #1e3a1e;
}
.prose pre.language-bash::before,
.prose pre.language-sh::before,
.prose pre.language-shell::before {
    content: '$ terminal';
    display: block;
    font-size: 11px;
    color: #4ade80;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    letter-spacing: .05em;
    opacity: .7;
}

/* ─── Article Tags & Share ────────────────────────────────────────────────── */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 24px;
}
.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}
.share-btn {
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    transition: opacity .2s;
}
.share-btn:hover { opacity: .8; text-decoration: none; }
.share-twitter  { background: #1da1f2; color: #fff; }
.share-linkedin { background: #0077b5; color: #fff; }

/* ─── Comments ────────────────────────────────────────────────────────────── */
.comments-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 48px 0;
}
.comments-list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.comment {
    display: flex;
    gap: 16px;
}
.comment-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}
.comment-body { flex: 1; }
.comment-meta {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}
.comment-meta strong { color: var(--text); }
.comment-meta time { font-size: 12px; color: var(--text-faint); }
.comment-body p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.comments-empty { color: var(--text-muted); margin-bottom: 32px; }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.comment-form-wrap {
    border-top: 1px solid var(--border);
    padding-top: 32px;
}
.comment-form-wrap h3 { margin-bottom: 20px; font-size: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.form-group small { font-weight: 400; color: var(--text-faint); }
.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 10px 14px;
    font-size: 15px;
    font-family: var(--font);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select option { background: var(--bg-card); }

/* ─── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3); color: #4ade80; }
.alert-error   { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: #f87171; }
.form-success  { color: #4ade80; font-size: 14px; }
.form-error    { color: #f87171; font-size: 14px; }

/* ─── Search ──────────────────────────────────────────────────────────────── */
.search-header { margin-bottom: 32px; }
.search-header h1 { margin-bottom: 16px; }
.search-form { margin-bottom: 8px; }
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 16px;
    max-width: 600px;
    transition: border-color .2s;
}
.search-input-wrap:focus-within { border-color: var(--blue); }
.search-input-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 12px;
    font-size: 16px;
    color: var(--text);
    outline: none;
}
.search-input-wrap button { flex-shrink: 0; }
.search-results-info { color: var(--text-muted); margin-bottom: 24px; }
.search-results-info strong { color: var(--text); }

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: color .2s, border-color .2s, background .2s;
    text-decoration: none;
}
.pagination-btn:hover { color: var(--text); border-color: var(--border-hover); text-decoration: none; }
.pagination-btn.active { color: #fff; background: var(--orange); border-color: var(--orange); }

/* ─── Newsletter Strip ────────────────────────────────────────────────────── */
.newsletter-strip {
    background: linear-gradient(135deg, var(--bg-card) 0%, #0d1f38 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 48px 0;
}
.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.newsletter-text h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.newsletter-text p { color: var(--text-muted); }
.newsletter-input-group {
    display: flex;
    gap: 8px;
}
.newsletter-input-group input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 10px 16px;
    font-size: 15px;
    min-width: 260px;
    transition: border-color .2s;
}
.newsletter-input-group input:focus {
    outline: none;
    border-color: var(--blue);
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 56px 0 0;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: 14px; margin: 12px 0 16px; }
.social-links { display: flex; gap: 12px; }
.social-links a {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: color .2s, border-color .2s;
}
.social-links a:hover { color: var(--orange); border-color: var(--orange); }
.footer-nav h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.footer-nav ul li { margin-bottom: 8px; }
.footer-nav ul li a { color: var(--text-muted); font-size: 14px; transition: color .2s; }
.footer-nav ul li a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
    color: var(--text-faint);
    font-size: 13px;
}

/* ─── Error / Info Pages ──────────────────────────────────────────────────── */
.error-page, .info-page {
    text-align: center;
    padding: 80px 20px;
    max-width: 480px;
    margin: 0 auto;
}
.error-code {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--orange), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.error-page h1, .info-page h1 { font-size: 1.8rem; margin-bottom: 12px; }
.error-page p, .info-page p { color: var(--text-muted); margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.info-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state { color: var(--text-muted); padding: 40px 0; text-align: center; font-size: 1.1rem; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root { --header-h: 56px; }

    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(7,13,26,.97);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .main-nav.open { display: flex; }
    .main-nav ul { flex-direction: column; width: 100%; }
    .main-nav ul li a { padding: 10px 12px; font-size: 15px; }
    .nav-actions { margin-left: 0; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); width: 100%; }

    .hero-inner { min-height: 380px; }
    .hero-content { padding-bottom: 40px; }

    .articles-grid { grid-template-columns: 1fr; }

    .yt-section { padding: 24px; }
    .yt-section-header { flex-direction: column; }
    .yt-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; padding-bottom: 32px; }

    .form-row { grid-template-columns: 1fr; }

    .newsletter-inner { flex-direction: column; gap: 20px; }
    .newsletter-input-group { flex-direction: column; }
    .newsletter-input-group input { min-width: unset; width: 100%; }

    .article-full { padding: 24px 0; }
    .prose { font-size: 1rem; }
    .prose h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .page-content { padding: 24px 16px; }
    .hero-title { font-size: 1.6rem; }
}
