/* ============================================================
   TechBrosHub — Design System v2
   Aesthetic: "Aurora Console" — a premium dev-tools studio look.
   Deep space-navy ground, glass panels, a signature blue→violet
   signal gradient standing in for the old flat teal, warm amber
   kept as the lone "alert" note for contrast.
   Sora (display) + Inter (body) + JetBrains Mono (data/output)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color tokens */
  --bg-void: #0A0D16;
  --bg-ink: #0D1120;
  --bg-panel: #131829;
  --bg-panel-raised: #1A2136;
  --border-line: #262E48;
  --border-line-soft: #1A2136;

  --text-primary: #F3F5FB;
  --text-secondary: #99A2BE;
  --text-muted: #636C88;

  --signal-blue: #6C8CFF;
  --signal-violet: #9B6BF2;
  --signal-teal: #6C8CFF;       /* legacy alias, remapped to signal blue */
  --signal-teal-dim: #4A5FC7;   /* legacy alias, remapped to signal blue-dim */
  --alert-amber: #F6B44D;
  --alert-red: #FF6B6B;

  --gradient-signal: linear-gradient(135deg, var(--signal-blue) 0%, var(--signal-violet) 100%);
  --gradient-mesh:
    radial-gradient(circle at 12% -10%, rgba(108, 140, 255, 0.16), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(155, 107, 242, 0.14), transparent 40%),
    radial-gradient(circle at 50% 120%, rgba(246, 180, 77, 0.05), transparent 45%);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px rgba(2, 4, 10, 0.45);
  --shadow-lift: 0 20px 45px rgba(2, 4, 10, 0.5), 0 0 0 1px rgba(108, 140, 255, 0.14);
  --shadow-glow-sm: 0 0 0 1px rgba(108, 140, 255, 0.25), 0 6px 18px rgba(108, 140, 255, 0.12);

  /* Theme-aware surfaces (overridden in body.light-theme below) */
  --header-bg: rgba(10, 13, 22, 0.72);
  --header-bg-mobile: rgba(13, 17, 32, 0.98);
  --card-grad-a: rgba(26, 33, 54, 0.7);
  --card-grad-b: rgba(19, 24, 41, 0.7);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-void);
  background-image: var(--gradient-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.015em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

code, .mono { font-family: var(--font-mono); }

/* Selection */
::selection { background: rgba(108, 140, 255, 0.32); color: var(--text-primary); }

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--border-line); border-radius: 10px; border: 2px solid var(--bg-void); }
::-webkit-scrollbar-thumb:hover { background: var(--signal-blue); }

/* Focus states — always visible for keyboard nav */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Status pill / signal dot ---------- */
.signal-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal-blue);
  box-shadow: 0 0 10px var(--signal-blue);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-line-soft);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.brand .brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--gradient-signal);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
  color: #060810;
  box-shadow: 0 4px 14px rgba(108, 140, 255, 0.35);
}
.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.18s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--gradient-signal);
  border-radius: 2px;
}
.nav-cta {
  background: var(--gradient-signal); color: #060810 !important;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.86rem;
  box-shadow: 0 6px 18px rgba(108, 140, 255, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(108, 140, 255, 0.4); }

.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { position: fixed; top: 72px; left: 0; right: 0; background: var(--header-bg-mobile); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-line); flex-direction: column; align-items: flex-start; padding: 22px 24px; gap: 18px; transform: translateY(-130%); transition: transform 0.28s cubic-bezier(.4,0,.2,1); }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.18s cubic-bezier(.4,0,.2,1), box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  font-family: var(--font-body);
}
.btn i { font-size: 1em; }
.btn::before {
  content: '';
  position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  z-index: -1;
  transition: left 0.55s cubic-bezier(.4,0,.2,1);
}
.btn:hover::before { left: 130%; }
.btn-primary { background: var(--gradient-signal); color: #060810; box-shadow: 0 8px 22px rgba(108, 140, 255, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(108, 140, 255, 0.46), 0 0 0 1px rgba(108, 140, 255, 0.25); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: rgba(255, 255, 255, 0.02); color: var(--text-primary); border-color: var(--border-line); }
.btn-outline:hover { border-color: var(--signal-blue); color: var(--signal-blue); background: rgba(108, 140, 255, 0.08); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(108, 140, 255, 0.16); }
.btn-amber { background: var(--alert-amber); color: #241706; }
.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(246, 180, 77, 0.3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:disabled::before { display: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 104px 0 84px;
  border-bottom: 1px solid var(--border-line-soft);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: -20% -10% auto -10%; height: 480px;
  background: radial-gradient(ellipse at 30% 0%, rgba(108, 140, 255, 0.16), transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(155, 107, 242, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--signal-blue);
  border: 1px solid var(--border-line);
  padding: 7px 14px; border-radius: 20px;
  margin-bottom: 24px;
  background: rgba(108, 140, 255, 0.06);
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  max-width: 800px;
  margin-bottom: 22px;
}
.hero h1 .accent {
  background: var(--gradient-signal);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 1.14rem; color: var(--text-secondary);
  max-width: 620px; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 44px; margin-top: 60px; flex-wrap: wrap;
}
.hero-stat .num {
  font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600;
  background: var(--gradient-signal); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stat .label { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }

/* ---------- Section headings ---------- */
.section { padding: 88px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 44px; flex-wrap: wrap; gap: 16px; }
.section-eyebrow { font-family: var(--font-mono); font-size: 0.78rem; color: var(--signal-blue); text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 11px; display: block; }
.section-head h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.section-head p { color: var(--text-secondary); max-width: 520px; margin-top: 8px; }

/* ---------- Cards / Panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--bg-panel-raised), var(--bg-panel));
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

/* Tool card */
.tool-card {
  background: linear-gradient(180deg, var(--card-grad-a), var(--card-grad-b));
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 13px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card:hover { border-color: rgba(108, 140, 255, 0.45); transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.tool-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(155deg, rgba(108, 140, 255, 0.22), rgba(155, 107, 242, 0.14));
  color: var(--signal-blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700;
  border: 1px solid rgba(108, 140, 255, 0.28);
  font-size: 1.35rem;
  box-shadow: 0 6px 16px rgba(108, 140, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease, background 0.25s ease;
}
.tool-icon i { line-height: 1; }
.tool-card:hover .tool-icon, .post-card:hover .tool-icon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 10px 26px rgba(108, 140, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: var(--gradient-signal);
  color: #060810;
  border-color: transparent;
}
.tool-card h3 { font-size: 1.1rem; }
.tool-card p { color: var(--text-secondary); font-size: 0.9rem; flex: 1; }
.tool-card .tool-tag {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em;
}
.tool-tag.live { color: var(--signal-blue); }
.tool-tag.api { color: var(--signal-violet); }

/* Blog card */
.post-card {
  background: linear-gradient(180deg, var(--card-grad-a), var(--card-grad-b));
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease;
}
.post-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.post-card:hover::after { transform: scaleX(1); }
.post-card:hover { border-color: rgba(108, 140, 255, 0.45); transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.post-card-cover {
  height: 164px;
  background: var(--gradient-mesh), linear-gradient(135deg, var(--bg-panel-raised), var(--bg-ink));
  display: flex; align-items: center; justify-content: center;
  color: var(--border-line); font-family: var(--font-mono); font-size: 0.75rem;
  border-bottom: 1px solid var(--border-line-soft);
}
.post-card-body { padding: 24px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.post-card .cat { font-family: var(--font-mono); font-size: 0.72rem; color: var(--signal-blue); text-transform: uppercase; letter-spacing: 0.07em; }
.post-card h3 { font-size: 1.12rem; }
.post-card p { color: var(--text-secondary); font-size: 0.9rem; flex: 1; }
.post-meta { display: flex; gap: 14px; font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-ink);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.94rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--signal-blue);
  box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.field-error { font-size: 0.78rem; color: var(--alert-red); margin-top: 6px; display: none; }

/* ---------- Output / terminal block ---------- */
.output-block {
  background: var(--bg-void);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--signal-blue);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 340px;
  overflow-y: auto;
  min-height: 60px;
  position: relative;
}
.output-block.empty { color: var(--text-muted); }
.output-block .err { color: var(--alert-red); }
.output-block .warn { color: var(--alert-amber); }

.copy-btn {
  background: var(--bg-panel-raised); border: 1px solid var(--border-line); color: var(--text-secondary);
  padding: 7px 14px; border-radius: var(--radius-sm); font-size: 0.78rem; cursor: pointer; font-family: var(--font-mono);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.copy-btn:hover { color: var(--signal-blue); border-color: rgba(108, 140, 255, 0.4); }

/* ---------- Alert / callout ---------- */
.callout {
  border-left: 3px solid var(--signal-blue);
  background: rgba(108, 140, 255, 0.07);
  padding: 15px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem; color: var(--text-secondary);
}
.callout.amber { border-color: var(--alert-amber); background: rgba(246, 180, 77, 0.08); }

.toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 999;
  background: var(--bg-panel-raised); border: 1px solid rgba(108, 140, 255, 0.4);
  color: var(--text-primary); padding: 15px 22px; border-radius: var(--radius-md);
  font-size: 0.88rem; box-shadow: var(--shadow-lift);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: all 0.28s cubic-bezier(.4,0,.2,1);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--alert-red); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-line-soft); padding: 60px 0 30px; background: var(--bg-ink); margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 42px; }
.footer-grid h4 { font-size: 0.85rem; color: var(--text-primary); margin-bottom: 17px; }
.footer-grid a { color: var(--text-secondary); font-size: 0.88rem; display: block; padding: 5px 0; transition: color 0.16s ease; }
.footer-grid a:hover { color: var(--signal-blue); }
.footer-about p { color: var(--text-muted); font-size: 0.86rem; margin-top: 13px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--border-line-soft); font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; gap: 12px; }
.newsletter-inline { display: flex; gap: 8px; margin-top: 15px; }
.newsletter-inline input { flex: 1; }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Page header (inner pages) ---------- */
.page-header { padding: 60px 0 42px; border-bottom: 1px solid var(--border-line-soft); position: relative; }
.page-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 20% 0%, rgba(108, 140, 255, 0.08), transparent 60%);
}
.page-header h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.page-header p { color: var(--text-secondary); margin-top: 13px; max-width: 640px; }

/* ---------- Filter chips ---------- */
.chip-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:34px;
}

.chip{
    padding:10px 20px;
    border-radius:999px;
    border:1px solid rgba(108,140,255,.22);
    background:linear-gradient(145deg,#1b2238,#12182a);
    color:#c8d2f2;
    font-size:.84rem;
    font-weight:600;
    font-family:var(--font-body);
    cursor:pointer;
    position:relative;
    overflow:hidden;
    transition:
        all .28s cubic-bezier(.4,0,.2,1),
        box-shadow .28s ease,
        transform .28s ease;
}

/* Shine Effect */
.chip::before{
    content:"";
    position:absolute;
    top:0;
    left:-120%;
    width:60%;
    height:100%;
    background:linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,.25),
        transparent
    );
    transform:skewX(-20deg);
    transition:left .55s ease;
}

.chip:hover::before{
    left:140%;
}

.chip:hover{
    color:#fff;
    border-color:#6c8cff;
    background:linear-gradient(135deg,#2b57ff,#8b5cf6);
    box-shadow:
        0 8px 24px rgba(108,140,255,.35),
        0 0 0 1px rgba(108,140,255,.25);
    transform:translateY(-2px);
}

.chip.active{
    background:linear-gradient(135deg,#4f7cff,#8b5cf6);
    color:#fff;
    border-color:transparent;
    box-shadow:
        0 10px 28px rgba(108,140,255,.45),
        0 0 18px rgba(108,140,255,.28);
}

.chip:active{
    transform:scale(.96);
}

/* Light Theme */
body.light-theme .chip{
    background:#ffffff;
    color:#42506f;
    border:1px solid rgba(108,140,255,.18);
    box-shadow:0 4px 14px rgba(108,140,255,.08);
}

body.light-theme .chip:hover{
    background:linear-gradient(135deg,#5f7fff,#8b5cf6);
    color:#fff;
    border-color:transparent;
}

body.light-theme .chip.active{
    background:linear-gradient(135deg,#4f7cff,#8b5cf6);
    color:#fff;
    border-color:transparent;
    box-shadow:0 12px 28px rgba(108,140,255,.30);
}
/* ---------- Filter chips ---------- */
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.chip {
  padding: 8px 17px; border-radius: 20px;
  border: 1px solid var(--border-line);
  font-size: 0.82rem; color: var(--text-secondary);
  cursor: pointer; font-family: var(--font-mono);
  background: transparent;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.chip.active, .chip:hover { border-color: var(--signal-blue); color: var(--signal-blue); background: rgba(67, 145, 255, 0.06); }

/* ---------- Article page ---------- */
.article-body { max-width: 740px; margin: 0 auto; }
.article-body h2 { margin: 36px 0 15px; font-size: 1.5rem; }
.article-body h3 { margin: 28px 0 13px; font-size: 1.2rem; }
.article-body p { color: var(--text-secondary); margin-bottom: 17px; font-size: 1.02rem; }
.article-body code { background: var(--bg-panel); padding: 2px 7px; border-radius: 5px; color: var(--signal-blue); font-size: 0.88em; }
.article-body pre { background: var(--bg-void); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 17px; overflow-x: auto; margin-bottom: 19px; }
.article-body ul, .article-body ol { color: var(--text-secondary); margin: 0 0 17px 22px; }
.article-body a { color: var(--signal-blue); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }
.loading-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-line); border-top-color: var(--signal-blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 10px; border-radius: 10px; background: rgba(246, 180, 77, 0.13); color: var(--alert-amber); }
.badge.ok { background: rgba(108, 140, 255, 0.13); color: var(--signal-blue); }
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-muted); }


/* Light theme */
body.light-theme{
  --bg-void:#f4f7fb;
  --bg-ink:#ffffff;
  --bg-panel:#ffffff;
  --bg-panel-raised:#f8faff;
  --border-line:#d8e0ef;
  --border-line-soft:#e8edf8;
  --text-primary:#111827;
  --text-secondary:#4b5563;
  --text-muted:#6b7280;
}
.theme-toggle{
background:rgba(255,255,255,0.02);border:1px solid var(--border-line);
color:var(--signal-blue);border-radius:999px;
width:38px;height:38px;padding:0;cursor:pointer;margin-left:12px;
display:flex;align-items:center;justify-content:center;font-size:1rem;
transition:border-color .2s ease,color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.theme-toggle:hover{border-color:var(--signal-blue);box-shadow:0 0 0 4px rgba(108,140,255,0.12);transform:translateY(-1px);}
*{transition:background .25s,color .25s,border-color .25s;}


/* === Enhanced Light Theme Effects === */
body.light-theme{
  --bg-void:#f4f8ff;
  --bg-ink:#fbfdff;
  --bg-panel:#ffffff;
  --bg-panel-raised:#f7faff;
  --border-line:#d6e3ff;
  --border-line-soft:#e8f0ff;
  --text-primary:#172033;
  --text-secondary:#50607f;
  --text-muted:#73819b;
  --header-bg: rgba(255, 255, 255, 0.78);
  --header-bg-mobile: rgba(255, 255, 255, 0.98);
  --card-grad-a: rgba(255, 255, 255, 0.98);
  --card-grad-b: rgba(240, 247, 255, 0.95);
  --gradient-mesh:
    radial-gradient(circle at 0% 0%, rgba(99,102,241,.20), transparent 35%),
    radial-gradient(circle at 100% 0%, rgba(6,182,212,.18), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(236,72,153,.12), transparent 42%),
    linear-gradient(135deg,#f8fbff,#eef5ff);
  background-image:var(--gradient-mesh)!important;
}
body.light-theme .site-header{
  border-bottom:1px solid rgba(123,146,255,.18);
  box-shadow:0 2px 20px rgba(96,119,255,.06);
}
body.light-theme .card,
body.light-theme .service-card,
body.light-theme .feature-card,
body.light-theme .glass,
body.light-theme .panel,
body.light-theme .box,
body.light-theme .about-card,
body.light-theme .team-card,
body.light-theme .pricing-card,
body.light-theme .contact-card,
body.light-theme .blog-card,
body.light-theme .tool-card,
body.light-theme .post-card{
 background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(240,247,255,.95))!important;
 border:1px solid rgba(123,146,255,.18)!important;
 box-shadow:0 12px 35px rgba(96,119,255,.12),0 0 0 1px rgba(255,255,255,.7) inset!important;
 backdrop-filter:blur(12px);
 transition:transform .3s ease,box-shadow .3s ease;
}
body.light-theme .card:hover,
body.light-theme .service-card:hover,
body.light-theme .feature-card:hover,
body.light-theme .glass:hover,
body.light-theme .panel:hover,
body.light-theme .box:hover,
body.light-theme .about-card:hover,
body.light-theme .team-card:hover,
body.light-theme .pricing-card:hover,
body.light-theme .contact-card:hover,
body.light-theme .blog-card:hover,
body.light-theme .tool-card:hover,
body.light-theme .post-card:hover{
 transform:translateY(-6px);
 box-shadow:0 22px 50px rgba(99,102,241,.18),0 8px 20px rgba(6,182,212,.10)!important;
}
body.light-theme .tool-icon{
 background: rgba(108, 140, 255, 0.12)!important;
 border-color: rgba(108, 140, 255, 0.22)!important;
 color: var(--signal-blue)!important;
 box-shadow: 0 6px 16px rgba(108, 140, 255, 0.10)!important;
}
body.light-theme .tool-card:hover .tool-icon,
body.light-theme .post-card:hover .tool-icon{
 background: var(--gradient-signal)!important;
 color: #ffffff!important;
}
body.light-theme .post-card-cover{
 color: rgba(80,96,127,.55);
 border-bottom: 1px solid rgba(123,146,255,.14);
}
body.light-theme .output-block{
 background:#0d1120;
 color:#8fb0ff;
}
body.light-theme section{
 position:relative;
}
body.light-theme section::before{
 content:"";
 position:absolute;inset:0;
 background:linear-gradient(135deg,rgba(99,102,241,.03),rgba(6,182,212,.03));
 pointer-events:none;
}

/* ---------- Explore More marquee (blog/writeup single-post pages) ---------- */
.explore-section { padding: 54px 0 76px; border-top: 1px solid var(--border-line-soft); margin-top: 12px; }
.explore-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.explore-heading h2 { font-size: 1.3rem; margin: 0; }
.explore-heading .explore-sub { color: var(--text-secondary); font-size: 0.86rem; }
.explore-marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}
.explore-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: explore-marquee-ltr 42s linear infinite;
}
.explore-marquee:hover .explore-track,
.explore-marquee:focus-within .explore-track { animation-play-state: paused; }
@keyframes explore-marquee-ltr {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0%); }
}
.explore-card {
  flex: 0 0 auto;
  width: 320px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--card-grad-a), var(--card-grad-b));
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease;
}
.explore-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.explore-card:hover::after { transform: scaleX(1); }
.explore-card:hover { border-color: rgba(108, 140, 255, 0.45); transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.explore-card-cover {
  height: 160px;
  flex: 0 0 auto;
  background: var(--gradient-mesh), linear-gradient(135deg, var(--bg-panel-raised), var(--bg-ink));
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border-line-soft);
  overflow: hidden;
}
.explore-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.explore-card-cover .explore-card-icon-fallback {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-ink);
  border: 1px solid rgba(108, 140, 255, 0.28);
  color: var(--signal-blue);
  font-size: 1.2rem;
}
.explore-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.explore-card .cat { font-family: var(--font-mono); font-size: 0.68rem; color: var(--signal-blue); text-transform: uppercase; letter-spacing: 0.06em; }
.explore-card h4 { font-size: 1rem; margin: 0; color: var(--text-primary); font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.explore-card .explore-meta { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.explore-card .explore-cta { font-size: 0.8rem; color: var(--signal-blue); font-weight: 500; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.explore-card .explore-cta i { transition: transform 0.25s ease; }
.explore-card:hover .explore-cta i { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .explore-track { animation: none; }
  .explore-marquee { overflow-x: auto; }
}
@media (max-width: 640px) {
  .explore-card { width: 260px; }
  .explore-card-cover { height: 130px; }
}

/* ============================================================
   RESPONSIVE — added, everything above is unchanged
   Breakpoints: 1024px (tablet), 768px (small tablet / large phone),
   480px (phone), 380px (small phone)
   ============================================================ */

/* ---------- 1024px — tablet ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .hero { padding: 84px 0 64px; }
  .section { padding: 68px 0; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .explore-card { width: 280px; }
}

/* ---------- 860px is the existing nav breakpoint; align header height ---------- */
@media (max-width: 860px) {
  .nav-row { height: 64px; }
}

/* ---------- 768px — small tablet / large phone ---------- */
@media (max-width: 768px) {
  .container { padding: 0 18px; }

  .hero { padding: 56px 0 48px; text-align: left; }
  .hero h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); margin-bottom: 16px; }
  .hero p.lead { font-size: 1rem; margin-bottom: 26px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; min-width: 140px; }
  .hero-stats { gap: 26px 36px; margin-top: 40px; }
  .hero-stat .num { font-size: 1.4rem; }

  .section { padding: 52px 0; }
  .section-head { margin-bottom: 30px; gap: 10px; }
  .section-head h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

  .tool-card { padding: 22px; }
  .post-card-body { padding: 20px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; margin-bottom: 30px; }
  .footer-about p { max-width: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 20px; }
  .newsletter-inline { flex-direction: column; }

  .page-header { padding: 44px 0 32px; }

  .article-body h2 { font-size: 1.3rem; margin: 28px 0 12px; }
  .article-body h3 { font-size: 1.1rem; margin: 22px 0 10px; }
  .article-body p { font-size: 0.98rem; }

  .toast { left: 16px; right: 16px; bottom: 16px; }

  .explore-card { width: 240px; }
  .explore-card-cover { height: 120px; }
  .explore-heading { margin-bottom: 18px; }
}

/* ---------- 480px — phone ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .brand { font-size: 1.08rem; gap: 8px; }
  .brand .brand-mark { width: 28px; height: 28px; }
  .nav-cta { padding: 8px 14px; font-size: 0.8rem; }

  .hero { padding: 44px 0 36px; }
  .hero-eyebrow { font-size: 0.7rem; padding: 6px 12px; margin-bottom: 18px; }
  .hero h1 { font-size: clamp(1.65rem, 8vw, 2.1rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 20px 28px; margin-top: 30px; }

  .section { padding: 40px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }

  .card-grid { grid-template-columns: 1fr; gap: 14px; }

  .tool-card { padding: 20px; }
  .tool-icon { width: 46px; height: 46px; font-size: 1.15rem; }
  .post-card-cover { height: 140px; }
  .post-card-body { padding: 18px; }
  .post-meta { flex-wrap: wrap; gap: 10px; }

  .btn { padding: 12px 18px; font-size: 0.88rem; }
  .btn-sm { padding: 8px 14px; font-size: 0.78rem; }

  .field input, .field textarea, .field select { padding: 11px 13px; font-size: 0.9rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .site-footer { padding: 44px 0 24px; margin-top: 44px; }

  .page-header { padding: 36px 0 26px; }
  .page-header h1 { font-size: clamp(1.55rem, 8vw, 2rem); }

  .chip-row { gap: 8px; margin-bottom: 24px; }
  .chip { padding: 7px 14px; font-size: 0.78rem; }

  .article-body { max-width: 100%; }

  .output-block { padding: 14px; font-size: 0.78rem; max-height: 260px; }

  .explore-section { padding: 40px 0 56px; }
  .explore-card { width: 220px; }
  .explore-card-cover { height: 110px; }
}

/* ---------- 380px — small phone ---------- */
@media (max-width: 380px) {
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { flex-direction: column; gap: 14px; }
  .card-grid { gap: 12px; }
  .tool-card, .post-card-body { padding: 16px; }
  .footer-bottom { font-size: 0.75rem; }
  .explore-card { width: 200px; }
}

/* ---------- Inline-style overrides — homepage newsletter .panel ----------
   index.html hardcodes style="padding:48px; ... flex-wrap:wrap" on .panel
   and style="min-width:320px" on .newsletter-form. Inline styles beat
   normal CSS specificity, so these need !important to take effect.
   Prefer moving these off index.html into classes when you get a chance —
   see newsletter-panel / newsletter-form-hero for the clean version below. */
@media (max-width: 700px) {
  .panel {
    padding: 28px 20px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
  }
  .panel .newsletter-form {
    min-width: 0 !important;
    width: 100% !important;
    flex-direction: column !important;
  }
  .panel .newsletter-form input,
  .panel .newsletter-form button {
    width: 100% !important;
  }
}

/* ---------- Clean version (use once inline styles are removed) ---------- */
.newsletter-panel {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.newsletter-form-hero {
  display: flex;
  gap: 10px;
  min-width: 320px;
}
@media (max-width: 700px) {
  .newsletter-panel { padding: 28px 20px; flex-direction: column; align-items: stretch; gap: 18px; }
  .newsletter-form-hero { min-width: 0; width: 100%; flex-direction: column; }
  .newsletter-form-hero input,
  .newsletter-form-hero button { width: 100%; }
}