/* ════════════════════════════════════════════════
   IGS Blog — shared stylesheet
   Used by /blog/index.html and /blog/posts/*.html
   Theme: indigo/violet base + warm gold accent
   ════════════════════════════════════════════════ */

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

:root {
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-light: #818cf8;
  --purple: #8b5cf6;
  --gold: #fbbf24;
  --gold-dark: #c8972b;
  --gold-light: #fcd34d;
  --bg: #0f0f1a;
  --surface: #16162a;
  --surface2: #1e1e35;
  --surface3: #242442;
  --border: rgba(99,102,241,0.18);
  --border-gold: rgba(251,191,36,0.22);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --error: #f43f5e;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 54px 0 60px;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99,102,241,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(251,191,36,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(139,92,246,0.10) 0%, transparent 60%);
  line-height: 1.6;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 1080px; }
.wrap--article { max-width: 1180px; }

/* ── Topbar ──────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 54px;
  background: #0a0a14;
  border-bottom: 1px solid rgba(99,102,241,0.15);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  backdrop-filter: blur(12px);
}
.topbar-brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.topbar-logo { height: 26px; filter: brightness(0) invert(1); }
.topbar-sitenav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; }
.topbar-sitenav::-webkit-scrollbar { display: none; }
.snav-link {
  display: inline-flex; align-items: center;
  padding: 5px 13px; border-radius: 20px; border: 1px solid transparent;
  font-size: .81rem; font-weight: 500; color: #888;
  text-decoration: none; transition: all .2s; white-space: nowrap;
}
.snav-link:hover { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.snav-link--active { color: var(--gold); background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.28); }
.topbar-hint { font-size:.75rem; color:#555; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 820px) {
  .topbar-hint { display: none; }
  .topbar-sitenav { gap: 0; }
  .snav-link { padding: 5px 9px; font-size: .77rem; }
}

/* ── Shared headings ─────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  line-height: 1.25;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251,191,36,0.10);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge svg { width: 14px; height: 14px; }

.section__title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════════════════════
   BLOG LISTING PAGE
   ════════════════════════════════════════════════ */

.blog-hero {
  text-align: center;
  padding: 56px 0 36px;
}
.blog-hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 800;
  margin: 16px 0 12px;
  background: linear-gradient(135deg, #fff 28%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}
.blog-hero p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Category filter chips */
.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 0 32px;
}
.cat-chip {
  padding: 8px 16px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DM Sans', sans-serif;
}
.cat-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }
.cat-chip.is-active {
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(200,151,43,0.14));
  border-color: rgba(251,191,36,0.40);
  color: var(--gold-light);
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  padding-bottom: 40px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: 0 16px 36px rgba(0,0,0,0.30);
}
.post-card__cover {
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card__cover--web    { background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 60%, #6366f1 100%); }
.post-card__cover--gold   { background: linear-gradient(135deg, #1a1208 0%, #6b4416 35%, #c8972b 75%, #fcd34d 100%); }
.post-card__cover--invoice{ background: linear-gradient(135deg, #c8972b 0%, #f59e0b 50%, #fbbf24 100%); }
.post-card__cover--tools  { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }

.post-card__cover svg {
  width: 65%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.20));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover .post-card__cover svg { transform: scale(1.04); }

.post-card__chip {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(15,15,26,0.75);
  border: 1px solid rgba(251,191,36,0.30);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.post-card__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.post-card__meta {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.post-card__meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: var(--text-dim);
}
.post-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 2px 0;
}
.post-card__desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.post-card__cta {
  margin-top: auto;
  padding-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card__cta::after {
  content: "→";
  transition: transform 0.2s;
}
.post-card:hover .post-card__cta::after { transform: translateX(3px); }

/* Newsletter strip */
.newsletter {
  margin: 40px 0 16px;
  padding: 30px 32px;
  background:
    radial-gradient(ellipse 80% 60% at 0% 50%, rgba(99,102,241,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 100% 50%, rgba(251,191,36,0.10) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.newsletter h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.newsletter p { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.newsletter form {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 280px;
  margin-left: auto;
}
.newsletter input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
.newsletter input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(251,191,36,0.15); }
.newsletter button {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a2a;
  border: none;
  padding: 12px 22px;
  border-radius: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s;
}
.newsletter button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(251,191,36,0.35); }

/* ════════════════════════════════════════════════
   ARTICLE / POST PAGE
   ════════════════════════════════════════════════ */

.crumbs {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 30px 0 0;
  flex-wrap: wrap;
}
.crumbs a { color: var(--accent-light); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { color: var(--text-dim); }

.article-head {
  padding: 22px 0 32px;
  max-width: 820px;
}
.article-head .badge { margin-bottom: 18px; }
.article-head h1 {
  font-size: clamp(28px, 4.8vw, 46px);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 22%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}
.article-head .lede {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
}
.article-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }
.article-meta b { color: var(--text); font-weight: 600; }

/* Cover */
.article-cover {
  height: 280px;
  border-radius: 18px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.article-cover svg { max-width: 50%; height: auto; filter: drop-shadow(0 12px 32px rgba(0,0,0,0.25)); }
.article-cover--web    { background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 60%, #6366f1 100%); }
.article-cover--gold   { background: linear-gradient(135deg, #1a1208 0%, #6b4416 35%, #c8972b 75%, #fcd34d 100%); }
.article-cover--invoice{ background: linear-gradient(135deg, #c8972b 0%, #f59e0b 50%, #fbbf24 100%); }

/* ── Article layout with sidebar ────────────── */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-side { order: -1; }
}

/* ── Article body typography ────────────────── */
.article-body {
  font-size: 16px;
  line-height: 1.78;
  color: #d8def0;
  max-width: 740px;
}
.article-body p { margin-bottom: 1.15em; }
.article-body h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(99,102,241,0.18);
  scroll-margin-top: 80px;
}
.article-body h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 19px;
  font-weight: 700;
  color: var(--gold-light);
  scroll-margin-top: 80px;
}
.article-body ul, .article-body ol {
  margin: 0 0 1.15em 22px;
  padding: 0;
}
.article-body li { margin-bottom: 0.4em; }
.article-body ul li::marker { color: var(--gold); }
.article-body strong, .article-body b { color: var(--text); font-weight: 700; }
.article-body a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px dashed rgba(129,140,248,0.4);
  transition: color 0.18s, border-color 0.18s;
}
.article-body a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.article-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  background: var(--surface);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  color: var(--text);
  font-style: italic;
  font-size: 15.5px;
}
.article-body code {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 13.5px;
  color: var(--gold-light);
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
.article-body thead {
  background: var(--surface2);
}
.article-body th, .article-body td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.article-body th { color: var(--gold-light); font-weight: 700; }
.article-body tr:last-child td { border-bottom: none; }

/* Callout boxes */
.callout {
  margin: 1.6em 0;
  padding: 16px 20px;
  background:
    radial-gradient(ellipse 80% 80% at 0% 0%, rgba(251,191,36,0.10) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  font-size: 14.5px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout__icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}
.callout__body { flex: 1; line-height: 1.6; }
.callout__body strong { color: var(--gold-light); }

/* Inline CTA banner inside article */
.inline-cta {
  margin: 2em 0;
  padding: 22px 26px;
  background:
    radial-gradient(ellipse 80% 80% at 100% 0%, rgba(251,191,36,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 80% 80% at 0% 100%, rgba(99,102,241,0.16) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.inline-cta__text { flex: 1; min-width: 220px; }
.inline-cta h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.inline-cta p { font-size: 13.5px; color: var(--text-muted); margin: 0; line-height: 1.55; }
.inline-cta .btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a2a;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s;
}
.inline-cta .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(251,191,36,0.35); }

/* ── Sidebar ────────────────────────────────── */
.article-side {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
}
@media (max-width: 980px) { .article-side { position: static; } }

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.side-card h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* TOC */
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-list a {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: all 0.18s;
}
.toc-list a:hover {
  color: var(--text);
  background: rgba(99,102,241,0.06);
}
.toc-list a.is-active {
  color: var(--gold-light);
  background: rgba(251,191,36,0.06);
  border-left-color: var(--gold);
}

/* Author card */
.author-card {
  display: flex;
  gap: 12px;
  align-items: center;
}
.author-card .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.author-card .name { color: var(--text); font-weight: 700; font-size: 14px; }
.author-card .role { color: var(--text-muted); font-size: 12px; }

/* CTA card */
.cta-card {
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(251,191,36,0.14) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--border-gold);
}
.cta-card .icon-box {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.cta-card .icon-box svg { width: 22px; height: 22px; color: #1a1a2a; }
.cta-card h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.cta-card p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.cta-card a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}
.cta-card a:hover { color: var(--gold-light); }

/* Related posts in sidebar */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.related-item {
  display: block;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s;
}
.related-item:hover { border-color: var(--border-gold); transform: translateX(2px); }
.related-item .r-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 2px;
}
.related-item .r-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

/* Share row */
.share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  align-items: center;
}
.share-row .label { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.share-row a {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.18s;
}
.share-row a:hover { color: var(--gold); border-color: var(--border-gold); }
.share-row a svg { width: 16px; height: 16px; }

/* Bottom related grid (when no sidebar / mobile fallback) */
.bottom-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.bottom-related h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ── Footer ─────────────────────────────────── */
.footnav {
  margin-top: 50px;
  text-align: center;
  padding: 22px 16px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-size: 12px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.footnav a { color: var(--accent-light); text-decoration: none; font-weight: 600; }
.footnav a:hover { color: var(--gold); }

/* ── Reading progress bar ───────────────────── */
.read-progress {
  position: fixed;
  top: 54px;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 199;
  transition: width 0.1s linear;
}

/* Print */
@media print {
  .topbar, .read-progress, .article-side, .share-row, .inline-cta, .footnav, .bottom-related { display: none !important; }
  body { background: #fff; color: #111; padding: 0; }
  .article-cover { background: #f5f5f5 !important; }
  .article-body { color: #111; max-width: 100%; }
  h1, h2, h3 { color: #111 !important; -webkit-text-fill-color: #111 !important; background: none !important; }
}
