/* ==========================================================================
   Comment — design system
   ========================================================================== */

:root {
  --bg: #faf9f7;
  --bg-alt: #ffffff;
  --bg-raised: #ffffff;
  --text: #1c1b1f;
  --text-muted: #5c5a63;
  --border: #e8e5df;
  --primary: #5b3df5;
  --primary-dark: #4227d6;
  --accent: #ff7a45;
  --accent-soft: #ffe8dc;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --success: #1f9d6b;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px -8px rgba(20, 20, 30, 0.08);
  --shadow-lg: 0 4px 8px rgba(20, 20, 30, 0.06), 0 20px 48px -12px rgba(20, 20, 30, 0.16);
  --shadow-glow: 0 12px 32px -8px color-mix(in srgb, var(--primary) 35%, transparent);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-head: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --max: 1160px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #100f17;
  --bg-alt: #191722;
  --bg-raised: #201e2b;
  --text: #f5f3fa;
  --text-muted: #a9a5bb;
  --border: #322f42;
  --primary: #8b7bff;
  --primary-dark: #a698ff;
  --accent: #ff9166;
  --accent-soft: #402417;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.35), 0 24px 56px -16px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 16px 40px -10px color-mix(in srgb, var(--primary) 45%, transparent);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100f17;
    --bg-alt: #191722;
    --bg-raised: #201e2b;
    --text: #f5f3fa;
    --text-muted: #a9a5bb;
    --border: #322f42;
    --primary: #8b7bff;
    --primary-dark: #a698ff;
    --accent: #ff9166;
    --accent-soft: #402417;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.35), 0 24px 56px -16px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 16px 40px -10px color-mix(in srgb, var(--primary) 45%, transparent);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
  max-width: 100vw;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.card-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.card-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.card-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.card-grid .reveal:nth-child(6) { transition-delay: 0.3s; }
.cat-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.cat-grid .reveal:nth-child(3) { transition-delay: 0.1s; }
.cat-grid .reveal:nth-child(4) { transition-delay: 0.15s; }
.cat-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.cat-grid .reveal:nth-child(6) { transition-delay: 0.25s; }
.cat-grid .reveal:nth-child(7) { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Animated colorful dividers ---------- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 40px;
}
.section-divider span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--pink), var(--accent), transparent);
  background-size: 250% auto;
  animation: gradient-flow 5s linear infinite;
}
.section-divider i {
  color: var(--primary);
  font-size: 0.7rem;
  animation: divider-pulse 2.4s ease-in-out infinite;
}
@keyframes divider-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.35); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .section-divider span, .section-divider i { animation: none; }
}

.divider-bar {
  height: 4px;
  width: 96px;
  margin: 2.2em auto;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--accent), var(--primary));
  background-size: 300% auto;
  animation: gradient-flow 4s linear infinite;
}
.article-body hr, .article-body .separator {
  border: none;
  height: 4px;
  width: 96px;
  margin: 2.2em auto;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--accent), var(--primary));
  background-size: 300% auto;
  animation: gradient-flow 4s linear infinite;
}
.article-body .separator-dots {
  text-align: center;
  margin: 2em 0;
  letter-spacing: 10px;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ---------- Gradient text ---------- */
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--accent), var(--primary));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 6s ease infinite;
}
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Reading progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--accent));
  z-index: 100;
  transition: width 0.1s ease-out;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 60;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover { transform: translateY(-3px) scale(1.05); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  white-space: nowrap;
}

.logo .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary), var(--pink), var(--accent));
  background-size: 200% auto;
  animation: gradient-flow 4s ease infinite;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a { position: relative; }
.main-nav a:hover, .main-nav a.active {
  background: var(--bg-raised);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--pink));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: rotate(-8deg) scale(1.08); }
.icon-btn { transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease; }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.btn-primary:active { transform: translateY(-1px) scale(0.99); }
.btn-ghost {
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-shine:hover::after { left: 130%; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 60% at 30% 20%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
              radial-gradient(50% 50% at 80% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  z-index: -1;
}
.hero-blobs { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: blob-float 14s ease-in-out infinite;
}
.blob-1 { width: 320px; height: 320px; left: -80px; top: -60px; background: color-mix(in srgb, var(--primary) 60%, transparent); }
.blob-2 { width: 260px; height: 260px; right: -60px; top: 40px; background: color-mix(in srgb, var(--pink) 55%, transparent); animation-delay: -4s; animation-duration: 18s; }
.blob-3 { width: 220px; height: 220px; left: 40%; top: 120px; background: color-mix(in srgb, var(--accent) 55%, transparent); animation-delay: -8s; animation-duration: 16s; }
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.08); }
  66% { transform: translate(-18px, 14px) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }
.hero-inner { max-width: 760px; position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: eyebrow-in 0.6s ease both;
}
@keyframes eyebrow-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -0.02em;
  animation: hero-in 0.7s ease both;
  animation-delay: 0.08s;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 32px;
  animation: hero-in 0.7s ease both;
  animation-delay: 0.16s;
}
@keyframes hero-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-head);
  font-size: 1.7rem;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats span { font-size: 0.82rem; color: var(--text-muted); }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  max-width: 520px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.search-box button { transition: transform 0.2s ease; }
.search-box button:hover { transform: scale(1.1) rotate(8deg); }
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.98rem;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
}
.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Section headings ---------- */
.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; }
.section-head p { color: var(--text-muted); margin: 6px 0 0; }
.section-head .more { font-weight: 600; color: var(--primary); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s ease; }
.section-head .more:hover { gap: 10px; color: var(--pink); }
.section-head h2 { display: flex; align-items: center; gap: 12px; }
.section-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.squiggle { display: block; margin-top: -6px; width: 210px; max-width: 60%; }
.squiggle path {
  stroke: var(--accent);
  stroke-width: 5;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: squiggle-draw 1.2s 0.6s ease forwards;
}
@keyframes squiggle-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .squiggle path { animation: none; stroke-dashoffset: 0; } }

/* ---------- Category chips ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.cat-card {
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--c1, var(--primary)) 50%, var(--border)), color-mix(in srgb, var(--c2, var(--accent)) 50%, var(--border))) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c1, var(--primary)), var(--c2, var(--accent)));
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 0;
}
.cat-card:hover::before { opacity: 0.08; }
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -12px color-mix(in srgb, var(--c1, var(--primary)) 45%, transparent);
}
.cat-card > * { position: relative; z-index: 1; }
.cat-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--c1, var(--primary)), var(--c2, var(--accent)));
  transition: transform 0.25s ease;
}
.cat-card:hover .icon { transform: scale(1.12) rotate(-6deg); }
.cat-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cat-card p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.cat-arrow {
  position: absolute;
  top: 22px; right: 22px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt);
  color: var(--c1, var(--primary));
  font-size: 0.75rem;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cat-card:hover .cat-arrow { opacity: 1; transform: translate(0, 0); }

/* ---------- Article cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.article-card {
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--c1, var(--primary)) 45%, var(--border)), color-mix(in srgb, var(--c2, var(--accent)) 45%, var(--border))) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--c1, var(--primary)) 45%, transparent);
}
.article-card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}
.article-card .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.25));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.article-card:hover .thumb::after { opacity: 1; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s cubic-bezier(.2,.7,.3,1); }
.article-card:hover .thumb img { transform: scale(1.09) rotate(0.5deg); }
.article-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1, var(--accent)) 18%, var(--bg-alt)), color-mix(in srgb, var(--c2, var(--accent)) 18%, var(--bg-alt)));
  color: var(--c1, var(--accent));
  border: 1px solid color-mix(in srgb, var(--c1, var(--accent)) 30%, transparent);
}
.article-card h3 { font-size: 1.08rem; margin: 0; }
.article-card p.excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 6px;
}

/* featured article (large) */
.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--c1, var(--primary)) 45%, var(--border)), color-mix(in srgb, var(--c2, var(--accent)) 45%, var(--border))) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px color-mix(in srgb, var(--c1, var(--primary)) 40%, transparent);
}
.featured .thumb { aspect-ratio: auto; height: 100%; min-height: 260px; overflow: hidden; }
.featured .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(.2,.7,.3,1); }
.featured:hover .thumb img { transform: scale(1.06); }
.featured .body { padding: 32px 32px 32px 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured h3 { font-size: 1.6rem; }

/* ---------- Filters ---------- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.filter-chip:hover { transform: translateY(-2px); }
.filter-chip.active, .filter-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--accent-soft); }
.filter-chip.active { background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; border-color: transparent; }

/* ---------- Article page ---------- */
.article-hero {
  padding: 48px 0 32px;
}
.breadcrumb {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { transition: color 0.15s ease; }
.breadcrumb a:hover { color: var(--primary); }
.article-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 820px; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 18px 0 28px;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 8px;
  animation: hero-in 0.7s ease both;
  animation-delay: 0.1s;
}
.article-cover img { width: 100%; max-height: 460px; object-fit: cover; transition: transform 0.6s ease; }
.article-cover:hover img { transform: scale(1.03); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
  padding-bottom: 64px;
}
.article-body { min-width: 0; font-size: 1.06rem; }
.article-body h2 { margin-top: 1.7em; font-size: 1.5rem; }
.article-body h3 { margin-top: 1.4em; font-size: 1.2rem; }
.article-body p { margin: 0 0 1.1em; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.article-body li { margin-bottom: 0.4em; }
.article-body img { border-radius: var(--radius); margin: 1.5em 0; box-shadow: var(--shadow); border: 1px solid var(--border); }
.article-body .image-container { margin: 1.5em 0; }
.article-body .image-container img { margin: 0 0 8px; }
.article-body .image-caption { text-align: center; font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.ad-slot {
  margin: 2em 0;
  padding: 14px 0;
  min-height: 90px;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 30%, var(--border)), color-mix(in srgb, var(--accent) 30%, var(--border))) border-box;
  border: 1.5px dashed transparent;
  position: relative;
}
.ad-slot::before {
  content: "Publicité";
  display: block;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ---------- Bannière AdSense 728x90 sous le header ---------- */
.ad-leaderboard-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 16px 4px;
}
.ad-leaderboard {
  font-size: 0;
  text-align: center;
}
.ad-leaderboard::before {
  content: "Publicité";
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.ad-leaderboard ins.adsbygoogle {
  display: inline-block;
  vertical-align: top;
  width: 728px;
  height: 90px;
  max-width: 100%;
}
@media (max-width: 767px) {
  .ad-leaderboard ins.adsbygoogle {
    width: 320px;
    height: 100px;
  }
}
.article-body strong { color: var(--text); }
.article-body blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary);
  background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}
.article-body .tip-box, .article-body .step, .article-body .warning-box, .article-body .info-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 1.4em 0;
  box-shadow: var(--shadow);
}
.article-body .warning-box { border-left-color: var(--accent); }
.article-body .info-box { border-left-color: var(--cyan); }
.article-body .step { border-left-color: var(--pink); }
.article-body .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5em 0; border-radius: var(--radius); border: 1px solid var(--border); }
.article-body table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.94rem; border: none; margin: 0; }
.article-body th, .article-body td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; overflow-wrap: break-word; }
@media (max-width: 640px) {
  .article-body .table-scroll { overflow-x: visible; border: none; }
  .article-body table, .article-body table tbody, .article-body table tr { display: block; width: 100%; }
  .article-body table tr:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .article-body table tr { margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .article-body th, .article-body table td { display: block; width: auto; }
  .article-body table td::before { content: attr(data-label); display: block; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 4px; }
  .article-body table td:last-child { border-bottom: none; }
}
.article-body tr:last-child td { border-bottom: none; }
.article-body th { background: var(--bg-alt); }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body hr, .article-body .separator { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.article-body i.fas, .article-body i.far { margin-right: 6px; color: var(--primary); }

.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 96px; }
.sidebar .box {
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 35%, var(--border)), color-mix(in srgb, var(--pink) 35%, var(--border))) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sidebar .box:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.sidebar .box h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.sidebar .box h4 i { color: var(--primary); }
.mini-article { display: flex; gap: 12px; margin-bottom: 14px; align-items: center; border-radius: 10px; transition: transform 0.15s ease; }
.mini-article:hover { transform: translateX(4px); }
.mini-article img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mini-article span { font-size: 0.88rem; font-weight: 600; line-height: 1.3; transition: color 0.15s ease; }
.mini-article:hover span { color: var(--primary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.tag-pill:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.share-row { display: flex; gap: 10px; margin-top: 24px; }
.share-row a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.share-row a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px) scale(1.08); background: var(--accent-soft); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--pink) 60%, var(--accent));
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner .blob-cta {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  filter: blur(50px);
  right: -60px; top: -80px;
  animation: blob-float 12s ease-in-out infinite;
  z-index: 0;
}
.cta-banner h2 { font-size: 1.7rem; margin-bottom: 6px; }
.cta-banner p { opacity: 0.92; margin: 0; max-width: 480px; }
.cta-banner .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 8px 24px -8px rgba(0,0,0,0.3); }
.cta-banner .btn-primary:hover { background: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: 40px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 14px; }
.footer-grid a { display: inline-block; color: var(--text-muted); font-size: 0.92rem; margin-bottom: 10px; position: relative; transition: color 0.15s ease; }
.footer-grid a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--primary);
  transition: width 0.2s ease;
}
.footer-grid a:hover { color: var(--primary); }
.footer-grid a:hover::after { width: 100%; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Contact / static pages ---------- */
.static-page { padding: 56px 0 80px; max-width: 760px; margin: 0 auto; }
.static-page h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 20px; }
.static-page h2 { font-size: 1.3rem; margin-top: 1.6em; }
.static-page p, .static-page li { color: var(--text-muted); }
.contact-card {
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, var(--primary), var(--pink), var(--accent)) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-card .icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 20px;
  animation: blob-float 6s ease-in-out infinite;
}
.contact-card a.email { font-size: 1.3rem; font-weight: 700; color: var(--primary); transition: color 0.15s ease; }
.contact-card a.email:hover { color: var(--pink); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured .body { padding: 0 24px 28px; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; top: 72px; right: 0; left: 0; height: calc(100vh - 72px); background: var(--bg); flex-direction: column; align-items: stretch; padding: 20px; gap: 6px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { padding: 32px 24px; }
}

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

@media (max-width: 640px) {
  .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .hero-stats { gap: 22px; }
  .blob { filter: blur(40px); }
}
