/* ============================================================
   ITandSupply Blog — style.css  v1
   Professional IT design: dark mode, cyan accents, monospace
   ============================================================ */

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d1117;
  --bg-surface:  #161b22;
  --bg-card:     #1a2030;
  --border:      rgba(255,255,255,0.08);
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --accent:      #06b6d4;
  --accent-dim:  rgba(6,182,212,0.12);
  --green:       #3fb950;
  --amber:       #d29922;
  --gray:        #6e7681;
  --red:         #f85149;
  --radius:      10px;
  --max-wrap:    860px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }

/* ── Layout helpers ──────────────────────────────────────── */
.blog-wrap {
  max-width: var(--max-wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ── Header ──────────────────────────────────────────────── */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.blog-header-inner {
  max-width: 1100px;
  margin-inline: auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.blog-brand {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.blog-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.blog-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-nav a:hover,
.blog-nav a[aria-current="page"] { color: var(--text); }

/* ── Blog Index Hero ─────────────────────────────────────── */
.blog-index-hero {
  background: linear-gradient(160deg, #0f1724 0%, #0d1117 60%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}
.blog-kicker {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.blog-index-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}
.blog-intro {
  max-width: 600px;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Blog Index Main ─────────────────────────────────────── */
.blog-index-main { flex: 1; padding-bottom: 4rem; }
.blog-index-main .blog-wrap { padding-top: 2.5rem; }

/* ── Blog Grid ───────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  border-color: rgba(6,182,212,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.blog-card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }
.blog-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.1rem 1rem;
}
.blog-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.blog-card-body h2 { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.blog-card-body h2 a { color: var(--text); text-decoration: none; }
.blog-card-body h2 a:hover { color: var(--accent); }
.blog-card-body > p { font-size: 0.85rem; color: var(--text-muted); flex: 1; }
.blog-card-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.25rem;
}

/* ── Content-type badges ─────────────────────────────────── */
.ct-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  white-space: nowrap;
}
.ct-official   { background: rgba(6,182,212,0.15); color: var(--accent); border: 1px solid rgba(6,182,212,0.35); }
.ct-confirmed  { background: rgba(63,185,80,0.12); color: var(--green);  border: 1px solid rgba(63,185,80,0.3); }
.ct-analysis   { background: rgba(210,153,34,0.12); color: var(--amber); border: 1px solid rgba(210,153,34,0.3); }
.ct-rumor      { background: rgba(110,118,129,0.15); color: var(--gray); border: 1px solid rgba(110,118,129,0.3); }

/* ── Category pill ───────────────────────────────────────── */
.blog-category {
  font-size: 0.65rem;
  font-family: 'Fira Code', monospace;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.5em;
}

/* ── Empty state ─────────────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.blog-empty i { font-size: 2.5rem; margin-bottom: 1rem; color: var(--accent); opacity: 0.4; }

/* ── Article page ────────────────────────────────────────── */
.article-page { flex: 1; padding-bottom: 4rem; }

.article-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.article-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 0.75rem;
}
.article-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 1rem;
}
.article-byline {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ── Hero image — CENTRED, MAX 860px ────────────────────── */
.article-image-wrap {
  margin: 2rem auto;
  max-width: var(--max-wrap);
  padding-inline: 1.25rem;
}
.article-image-wrap img {
  width: 100%;
  max-width: var(--max-wrap);
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

/* ── Article notice ──────────────────────────────────────── */
.article-notice {
  background: rgba(210,153,34,0.08);
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--amber);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.article-notice i { flex-shrink: 0; margin-top: 0.1rem; }

/* ── Article body ────────────────────────────────────────── */
.article-body {
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}
.article-body p { margin-bottom: 1.1rem; color: var(--text); }
.article-body ul,
.article-body ol { margin: 0 0 1.1rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body em { font-style: italic; }
.article-body a { color: var(--accent); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}
.article-body details {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.article-body summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

/* ── Tags ────────────────────────────────────────────────── */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 2rem 0 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.article-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2em 0.55em;
}

/* ── Sources ─────────────────────────────────────────────── */
.article-sources {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-sources h3 {
  font-size: 0.8rem;
  font-family: 'Fira Code', monospace;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.article-sources ul { list-style: none; margin: 0; padding: 0; }
.article-sources li { font-size: 0.85rem; padding: 0.25rem 0; }
.article-sources a { color: var(--accent); }

/* ── Share ───────────────────────────────────────────────── */
.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 2rem 0 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.article-share span { color: var(--text-muted); font-weight: 600; }
.article-share a {
  padding: 0.3em 0.8em;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: border-color 0.2s, color 0.2s;
}
.article-share a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Disclaimer ──────────────────────────────────────────── */
.article-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1.5rem;
}
.article-disclaimer a { color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────── */
.blog-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: auto;
  background: rgba(0,0,0,0.2);
}
.blog-footer .blog-wrap {
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.blog-accent { color: var(--accent); }
.blog-footer a { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-nav { gap: 1rem; }
  .blog-nav a:not(:first-child):not(:last-child) { display: none; }
  .blog-footer .blog-wrap { flex-direction: column; text-align: center; }
  .article-hero h1 { font-size: 1.5rem; }
}
