/* ═══════════════════════════════════════
   DEVOPS ARG — Blog Styles
   Terminal aesthetic, dark theme
   ═══════════════════════════════════════ */

:root {
    --void: #0a0f1a;
    --void-light: #111827;
    --bio-green: #22c55e;
    --bio-cyan: #06b6d4;
    --bio-purple: #a855f7;
    --bio-rose: #f43f5e;
    --bio-amber: #f59e0b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --font-m: 'IBM Plex Mono', monospace;
    --font-h: 'Space Grotesk', sans-serif;
}

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

body {
    background: var(--void);
    color: var(--text);
    font-family: var(--font-m);
    min-height: 100vh;
}

a { color: var(--bio-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════ NAV ═══════ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(6, 182, 212, 0.15);
    padding: 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav__brand {
    font-family: var(--font-h); font-weight: 700;
    color: var(--bio-cyan); font-size: 18px; text-decoration: none;
}
.nav__links { display: flex; gap: 24px; }
.nav__links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 13px; letter-spacing: 1px; transition: color 0.2s;
}
.nav__links a:hover, .nav__links a.active { color: var(--bio-cyan); }

/* ═══════ BLOG HERO ═══════ */
.blog-hero {
    padding: 120px 32px 48px;
    text-align: center;
    position: relative;
}
.blog-hero::after {
    content: '';
    position: absolute; bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bio-cyan), transparent);
}
.blog-hero h1 {
    font-family: var(--font-h);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    background: linear-gradient(135deg, var(--bio-cyan), var(--bio-purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.blog-hero p { color: var(--text-muted); margin-top: 12px; font-size: 14px; }
.blog-hero .terminal-prompt { color: var(--bio-green); font-size: 13px; margin-top: 8px; }
.blog-hero--small { padding: 110px 32px 32px; }
.back-link { color: var(--bio-green); font-size: 13px; display: inline-block; margin-top: 8px; }

/* ═══════ TAGS FILTER ═══════ */
.tags-bar {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
    padding: 32px 32px 16px;
}
.tag-btn {
    background: transparent;
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--text-muted);
    font-family: var(--font-m);
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}
.tag-btn:hover, .tag-btn.active {
    border-color: var(--bio-cyan);
    color: var(--bio-cyan);
    background: rgba(6, 182, 212, 0.08);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

/* ═══════ POST GRID ═══════ */
.posts-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ═══════ POST CARD ═══════ */
.post-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.12);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.post-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--bio-cyan), var(--bio-purple));
    opacity: 0; transition: opacity 0.3s;
}
.post-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.1);
}
.post-card:hover::before { opacity: 1; }

.post-card__image {
    width: 100%; height: 180px;
    position: relative; overflow: hidden;
    background: rgba(6, 182, 212, 0.03);
}
.post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(168,85,247,0.1));
    color: var(--text-muted); font-size: 14px; letter-spacing: 2px;
}
.scanline {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(6,182,212,0.015) 2px, rgba(6,182,212,0.015) 4px);
    pointer-events: none;
}

.post-card__content { padding: 24px; }

.post-card__meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 11px; color: var(--text-muted); margin-bottom: 10px;
}
.post-card__date { color: var(--bio-green); }

.post-card__title {
    font-family: var(--font-h); font-size: 19px; font-weight: 600;
    color: var(--text); line-height: 1.3; margin-bottom: 10px;
}
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--bio-cyan); }

.post-card__excerpt {
    font-size: 13px; color: var(--text-muted);
    line-height: 1.6; margin-bottom: 16px;
}

.post-card__tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══════ FEATURED POST ═══════ */
.post-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.post-card--featured .post-card__image { height: 100%; min-height: 280px; }
.post-card--featured .post-card__title { font-size: 26px; }
.post-card--featured .post-card__excerpt { font-size: 14px; }

/* ═══════ TAG BADGES ═══════ */
.post-tag {
    font-size: 10px; padding: 3px 10px; border-radius: 12px;
    letter-spacing: 0.5px; text-decoration: none; display: inline-block;
}
.post-tag--cyan { background: rgba(6,182,212,0.1); color: var(--bio-cyan); border: 1px solid rgba(6,182,212,0.2); }
.post-tag--purple { background: rgba(168,85,247,0.1); color: var(--bio-purple); border: 1px solid rgba(168,85,247,0.2); }
.post-tag--green { background: rgba(34,197,94,0.1); color: var(--bio-green); border: 1px solid rgba(34,197,94,0.2); }
.post-tag--rose { background: rgba(244,63,94,0.1); color: var(--bio-rose); border: 1px solid rgba(244,63,94,0.2); }
.post-tag--amber { background: rgba(245,158,11,0.1); color: var(--bio-amber); border: 1px solid rgba(245,158,11,0.2); }

/* ═══════ ARTICLE PAGE ═══════ */
.article {
    max-width: 780px;
    margin: 0 auto;
    padding: 100px 32px 60px;
}
.article__header { margin-bottom: 40px; }
.article__tags { display: flex; gap: 8px; margin-bottom: 16px; }
.article__title {
    font-family: var(--font-h); font-size: clamp(28px, 4vw, 40px);
    font-weight: 700; color: var(--text); line-height: 1.2; margin-bottom: 16px;
}
.article__meta {
    display: flex; gap: 16px; align-items: center;
    font-size: 12px; color: var(--text-muted);
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.article__author { color: var(--bio-cyan); }

.article__hero-img {
    width: 100%; border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(6,182,212,0.15);
    margin-bottom: 40px; position: relative;
}
.article__hero-img img { width: 100%; display: block; }

/* ═══════ PROSE (Article body) ═══════ */
.prose { font-size: 15px; line-height: 1.8; color: var(--text-muted); }
.prose p { margin-bottom: 20px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }

.prose h2 {
    font-family: var(--font-h); font-size: 24px; font-weight: 600;
    color: var(--text); margin: 48px 0 16px;
    padding-left: 16px;
    border-left: 3px solid var(--bio-cyan);
}
.prose h3 {
    font-family: var(--font-h); font-size: 18px; font-weight: 600;
    color: var(--bio-cyan); margin: 32px 0 12px;
}

.prose ul, .prose ol {
    margin: 0 0 20px 24px;
}
.prose li { margin-bottom: 8px; }

.prose blockquote {
    border-left: 3px solid var(--bio-amber);
    padding: 16px 20px; margin: 24px 0;
    background: rgba(245,158,11,0.04);
    border-radius: 0 8px 8px 0;
}
.prose blockquote p { color: var(--text); margin: 0; font-style: italic; }

.prose code:not(pre code) {
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.15);
    padding: 2px 6px; border-radius: 4px;
    font-size: 13px; color: var(--bio-cyan);
}

.prose pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 8px; padding: 20px;
    margin: 20px 0; overflow-x: auto;
}
.prose pre code {
    font-family: var(--font-m); font-size: 13px;
    line-height: 1.6; color: var(--text);
    background: none; border: none; padding: 0;
}

.prose img {
    max-width: 100%; border-radius: 8px;
    border: 1px solid rgba(6,182,212,0.15);
    margin: 24px 0;
}

.prose a { color: var(--bio-cyan); text-decoration: underline; }
.prose a:hover { color: var(--bio-green); }

/* Syntax highlight overrides */
.prose pre .token.comment { color: #6b7280; }
.prose pre .token.keyword { color: var(--bio-purple); }
.prose pre .token.string { color: var(--bio-green); }
.prose pre .token.function { color: var(--bio-cyan); }
.prose pre .token.number { color: var(--bio-amber); }
.prose pre .token.operator { color: var(--bio-rose); }
.prose pre .token.punctuation { color: var(--text-muted); }
.prose pre .token.property { color: var(--bio-cyan); }
.prose pre .token.atrule { color: var(--bio-purple); }

/* ═══════ ARTICLE NAV (prev/next) ═══════ */
.article__nav {
    display: flex; gap: 16px; margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.article__nav-link {
    flex: 1; padding: 16px; border-radius: 8px;
    border: 1px solid rgba(6,182,212,0.12);
    text-decoration: none; transition: all 0.2s;
}
.article__nav-link:hover {
    border-color: var(--bio-cyan);
    background: rgba(6,182,212,0.04);
}
.article__nav-label {
    display: block; font-size: 10px; color: var(--bio-green);
    letter-spacing: 1px; margin-bottom: 4px;
}
.article__nav-link span:last-child {
    font-family: var(--font-h); font-size: 14px; color: var(--text);
}
.article__nav-link--next { text-align: right; }

/* ═══════ FOOTER ═══════ */
.blog-footer {
    text-align: center; padding: 40px 32px;
    font-size: 12px; color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.blog-footer p { margin-bottom: 4px; }
.blog-footer a { color: var(--bio-cyan); text-decoration: none; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 768px) {
    .nav { padding: 12px 16px; }
    .nav__links { gap: 16px; }
    .blog-hero { padding: 100px 16px 32px; }
    .posts-grid { grid-template-columns: 1fr; padding: 16px; }
    .post-card--featured { grid-template-columns: 1fr; }
    .post-card--featured .post-card__image { min-height: 200px; }
    .article { padding: 90px 16px 40px; }
    .article__title { font-size: 26px; }
    .article__nav { flex-direction: column; }
    .article__nav-link--next { text-align: left; }
    .tags-bar { padding: 16px; }
}
