/* ═══════════════════════════════════════════════════════
   iCompressIt — Blog Stylesheet
   Used by: blog/index.html and all blog/*.html posts
   ═══════════════════════════════════════════════════════ */

/* ── Blog listing page ───────────────────────────────── */
.blog-hero { padding: 48px 24px 32px; }
.blog-hero h1 { font-size: clamp(2rem,5vw,3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 12px; }
.blog-hero p { color: var(--muted); font-size: 1rem; max-width: 520px; line-height: 1.7; }
.blog-breadcrumb { display: flex; gap: 6px; list-style: none; padding: 0; font-size: .75rem; color: var(--muted); margin-bottom: 16px; }
.blog-breadcrumb li + li::before { content: '/'; margin-right: 6px; opacity: .4; }
.blog-breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.blog-breadcrumb a:hover { color: var(--neon); }

.blog-featured { display: block; text-decoration: none; color: inherit; border-radius: 18px; padding: 28px 30px; border: 1px solid rgba(0,255,136,.18); background: linear-gradient(135deg,rgba(0,255,136,.04),rgba(0,255,136,.01)); transition: box-shadow .25s; margin-bottom: 28px; }
.blog-featured:hover { box-shadow: 0 0 40px rgba(0,255,136,.1); }
.blog-featured-badge { display: inline-block; font-size: .68rem; font-weight: 700; color: var(--neon); background: rgba(0,255,136,.1); padding: 3px 10px; border-radius: 5px; margin-bottom: 10px; letter-spacing: .04em; }
.blog-featured h2 { font-size: clamp(1.4rem,3vw,2rem); font-weight: 800; color: #fff; letter-spacing: -.025em; margin-bottom: 10px; line-height: 1.2; }
.blog-featured p { color: #9ca3af; font-size: .93rem; line-height: 1.7; max-width: 680px; margin-bottom: 16px; }
.blog-featured-meta { display: flex; gap: 16px; font-size: .75rem; color: #4b5563; align-items: center; }

/* ── Post layout ─────────────────────────────────────── */
.post-wrap { max-width: 1140px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.post-article { min-width: 0; }

/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .75rem; color: var(--muted); margin-bottom: 24px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; opacity: .4; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--neon); }
.breadcrumb li:last-child { color: #9ca3af; }

/* ── Post header ─────────────────────────────────────── */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.post-tag { padding: 3px 11px; border-radius: 999px; font-size: .68rem; font-weight: 600; background: rgba(0,255,136,.08); color: var(--neon); border: 1px solid rgba(0,255,136,.15); }
.post-h1 { font-size: clamp(1.75rem,3.8vw,2.6rem); font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1.12; margin-bottom: 16px; }
.post-desc { font-size: 1.06rem; color: #9ca3af; line-height: 1.7; margin-bottom: 20px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: .75rem; color: #4b5563; padding: 13px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.post-meta span { display: flex; align-items: center; gap: 5px; }
.post-meta svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.meta-updated { color: #374151; font-style: italic; }

/* ── TOC ─────────────────────────────────────────────── */
.toc { background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; margin-bottom: 32px; }
.toc-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.toc-title::before { content: ''; display: block; width: 3px; height: 12px; border-radius: 2px; background: var(--neon); }
.toc ol { padding-left: 20px; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { color: #9ca3af; font-size: .83rem; text-decoration: none; transition: color .2s; }
.toc a:hover, .toc a.active { color: var(--neon); font-weight: 600; }

/* ── Article body ────────────────────────────────────── */
.article-body { color: #9ca3af; line-height: 1.82; font-size: .93rem; }
.article-body h2 { font-size: 1.55rem; font-weight: 800; color: var(--neon); margin: 44px 0 14px; letter-spacing: -.025em; line-height: 1.2; padding-top: 10px; border-top: 1px solid rgba(0,255,136,.1); scroll-margin-top: 80px; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; color: #d1d5db; margin: 28px 0 10px; scroll-margin-top: 80px; }
.article-body h4 { font-size: .92rem; font-weight: 700; color: #9ca3af; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.article-body p { margin-bottom: 17px; }
.article-body a { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { opacity: .8; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 17px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: #e5e7eb; font-weight: 700; }
.article-body em { color: #d1d5db; }
.article-body blockquote { border-left: 3px solid rgba(0,255,136,.5); padding: 12px 18px; margin: 22px 0; background: rgba(0,255,136,.03); border-radius: 0 10px 10px 0; }
.article-body blockquote p { margin: 0; color: #a3e8c2; font-style: italic; }
.article-body code { background: rgba(255,255,255,.07); color: var(--neon); font-family: var(--mono); font-size: .81rem; padding: 2px 7px; border-radius: 4px; }
.article-body pre { background: rgba(255,255,255,.025); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 18px 0; position: relative; }
.article-body pre code { background: none; padding: 0; color: #86efac; font-size: .83rem; line-height: 1.75; }
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .84rem; }
.article-body th { text-align: left; padding: 10px 14px; color: #d1d5db; font-weight: 600; border-bottom: 2px solid rgba(0,255,136,.18); background: rgba(0,255,136,.03); }
.article-body td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: top; }
.article-body tr:hover td { background: rgba(255,255,255,.015); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 34px 0; }

/* ── Callouts ────────────────────────────────────────── */
.callout { padding: 16px 20px; border-radius: 12px; margin: 22px 0; border: 1px solid; }
.callout-tip  { background: rgba(0,255,136,.04);  border-color: rgba(0,255,136,.22);  color: #a3e8c2; }
.callout-warn { background: rgba(245,158,11,.04); border-color: rgba(245,158,11,.22); color: #fcd34d; }
.callout-info { background: rgba(56,189,248,.04); border-color: rgba(56,189,248,.22); color: #7dd3fc; }
.callout-title { font-weight: 700; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 7px; }
.callout p { margin: 0; font-size: .875rem; line-height: 1.65; }

/* ── Stat boxes ──────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 12px; margin: 22px 0; }
.stat-box { text-align: center; padding: 16px 10px; border-radius: 12px; background: rgba(255,255,255,.02); border: 1px solid var(--border); }
.stat-box-val { font-size: 1.7rem; font-weight: 800; font-family: var(--mono); line-height: 1; }
.stat-box-label { font-size: .68rem; color: var(--muted); margin-top: 5px; letter-spacing: .04em; }

/* ── Badges ──────────────────────────────────────────── */
.b-green  { display:inline-block;padding:2px 8px;border-radius:999px;background:rgba(0,255,136,.1);color:#00ff88;font-size:.72rem;font-weight:600 }
.b-red    { display:inline-block;padding:2px 8px;border-radius:999px;background:rgba(239,68,68,.1);color:#f87171;font-size:.72rem;font-weight:600 }
.b-yellow { display:inline-block;padding:2px 8px;border-radius:999px;background:rgba(245,158,11,.1);color:#fcd34d;font-size:.72rem;font-weight:600 }
.b-blue   { display:inline-block;padding:2px 8px;border-radius:999px;background:rgba(56,189,248,.1);color:#7dd3fc;font-size:.72rem;font-weight:600 }
.b-purple { display:inline-block;padding:2px 8px;border-radius:999px;background:rgba(167,139,250,.1);color:#c4b5fd;font-size:.72rem;font-weight:600 }

/* ── Author / CTA / Related ──────────────────────────── */
.author-box { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 14px; background: rgba(255,255,255,.02); border: 1px solid var(--border); margin-top: 34px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg,#00ff88,#00c96e); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #000; font-size: 1.1rem; }
.author-name { font-weight: 700; color: #fff; font-size: .9rem; margin-bottom: 3px; }
.author-bio  { font-size: .79rem; color: var(--muted); line-height: 1.55; }
.post-cta { margin-top: 42px; border-radius: 18px; padding: 30px; border: 1px solid rgba(0,255,136,.18); background: linear-gradient(135deg,rgba(0,255,136,.05),rgba(0,255,136,.01)); text-align: center; }
.post-cta h3 { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.post-cta p  { color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.related-posts { margin-top: 42px; padding-top: 34px; border-top: 1px solid var(--border); }
.related-posts h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.related-card { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.02); text-decoration: none; color: inherit; transition: border-color .2s; display: block; }
.related-card:hover { border-color: rgba(0,255,136,.22); }
.related-tag { font-size: .64rem; font-weight: 700; color: var(--neon); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }
.related-title { font-size: .83rem; font-weight: 600; color: #d1d5db; line-height: 1.45; }

/* ── Sidebar ─────────────────────────────────────────── */
.post-sidebar { }
.sidebar-sticky { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 14px; }

/* ── Back link ───────────────────────────────────────── */
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); margin-bottom: 28px; text-decoration: none; transition: color .2s; }
.back-link:hover { color: var(--neon); }
.back-link svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; }

/* ── Reading progress bar ────────────────────────────── */
.reading-bar { position: fixed; top: 0px; left: 0; right: 0; height: 3px; z-index: 999; background: rgba(255,255,255,.06); }
.reading-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg,var(--neon),#00ffcc); box-shadow: 0 0 8px rgba(0,255,136,.6); transition: width .1s linear; }

/* ── Copy code btn ───────────────────────────────────── */
.copy-btn { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 6px; font-size: .7rem; background: rgba(0,255,136,.12); color: #00ff88; border: 1px solid rgba(0,255,136,.25); cursor: pointer; font-family: var(--font); font-weight: 600; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 820px) {
  .post-wrap { grid-template-columns: 1fr; padding: 24px 16px; }
  .post-sidebar { display: none; }
  .related-grid { grid-template-columns: 1fr; }
}
