/* ═══════════════════════════════════════════════════════════
   BlogArch v10.1 — Modernized External Stylesheet
   Updated: 2026-04-08 | Cleaned: removed legacy dark-mode, old footer, unused vars
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   Design Tokens — Light Mode (WCAG AA+ compliant)
   ═══════════════════════════════════════════════ */
:root {
  --bg:          #f8fafc;
  --bg-elevated: #ffffff;
  --text:        #0f172a;
  --text-light:  #1e3a52;
  --text-soft:   #475569;
  --muted:       #64748b;
  --muted-bg:    #f1f5f9;
  --primary-color:  #4361ee;
  --primary-light: #eef2ff;
  --primary-dark:   #3730a3;
  --secondary-color:#7c3aed;
  --accent:      #059669;
  --accent-hover:#047857;
  --accent-fg:   #ffffff;
  --card:        #ffffff;
  --card-hover:  #f0f4f8;
  --border:      #e2e8f0;
  --border-strong:#cbd5e1;
  --input:       #e2e8f0;
  --ring:        #4361ee;
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xs:   6px;
  --shadow-xs:   0 1px 2px rgba(15,23,42,.04);
  --shadow-sm:   0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow:      0 2px 8px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md:   0 4px 12px -2px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.04);
  --shadow-lg:   0 12px 24px -4px rgba(15,23,42,.1), 0 4px 8px -4px rgba(15,23,42,.04);
  --shadow-xl:   0 20px 40px -8px rgba(15,23,42,.12), 0 8px 16px -8px rgba(15,23,42,.04);
  --font-ui:     'Tajawal','Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  --font-body:   'Amiri', Georgia, 'Noto Naskh Arabic', serif;
  --transition-duration: 0.25s;
  --transition:   all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  /* RGB triplets */
  --accent-rgb:    5, 150, 105;
  --primary-rgb:   67, 97, 238;
  /* Domain colors */
  --d-blog:     #4361ee;
  --d-quotes:   #059669;
  --d-learn:    #0891b2;
  --d-analysis: #d97706;
  --d-reviews:  #7c3aed;
  --d-podcast:  #f43f5e;
  color-scheme: light;
  /* v11 — blur tokens */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
}

/* ═══════════════════════════════════════════════
   THEME SYSTEM — 5 Visual Identities
   ═══════════════════════════════════════════════ */

/* ── Default Dark ── */
body[data-dark] {
  --bg:          #0c1222;
  --bg-elevated: #162032;
  --text:        #f1f5f9;
  --text-light:  #cbd5e1;
  --text-soft:   #8da0b8; /* v11: 6.1:1 WCAG AA */
  --muted:       #78889c; /* v11: 5.2:1 WCAG AA */
  --muted-bg:    #1a2744;
  --primary-color:#818cf8;
  --primary-light:rgba(129,140,248,.14);
  --primary-dark:  #6366f1;
  --accent:      #34d399;
  --accent-hover:#10b981;
  --accent-fg:   #022c22;
  --card:        #162032;
  --card-hover:  #1c2d4a;
  --border:      #1e3a5f;
  --border-strong:#2d4a6f;
  --input:       #1e3a5f;
  --ring:        #818cf8;
  --shadow-xs:   0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.35);
  --shadow:      0 2px 8px rgba(0,0,0,.35);
  --shadow-md:   0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.45);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.55);
  color-scheme:  dark;
}

/* ── OCEAN — Blue/Cyan ── */
body[data-theme="ocean"] {
  --bg:          #f0f9ff;
  --bg-elevated: #ffffff;
  --text:        #0a2540;
  --text-light:  #1a3d5c;
  --text-soft:   #3a6888;
  --muted:       #5b8aa8;
  --muted-bg:    #e0f2fe;
  --primary-color:#0284c7;
  --primary-light:#e0f2fe;
  --primary-dark:  #0369a1;
  --accent:      #06b6d4;
  --accent-hover:#0891b2;
  --accent-fg:   #ffffff;
  --card:        #ffffff;
  --card-hover:  #ecfeff;
  --border:      #bae6fd;
  --border-strong:#7dd3fc;
  --input:       #bae6fd;
  --ring:        #0284c7;
  --accent-rgb:  6, 182, 212;
  --primary-rgb: 2, 132, 199;
  color-scheme:  light;
}
body[data-theme="ocean"][data-dark] {
  --bg:          #071a2e;
  --bg-elevated: #0d2540;
  --text:        #e0f7ff;
  --text-light:  #90cdf4;
  --text-soft:   #63b3ed;
  --muted:       #4299e1;
  --muted-bg:    #0d2540;
  --primary-color:#38bdf8;
  --primary-light:rgba(56,189,248,.14);
  --accent:      #22d3ee;
  --accent-hover:#06b6d4;
  --accent-fg:   #083344;
  --card:        #0d2540;
  --card-hover:  #132f4d;
  --border:      #1a3d5c;
  --border-strong:#2d5a7b;
  --input:       #1a3d5c;
  --ring:        #38bdf8;
  --shadow-xs:   0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.35);
  --shadow:      0 2px 8px rgba(0,0,0,.35);
  --shadow-md:   0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.45);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.55);
  color-scheme:  dark;
}

/* ── SUNSET — Amber/Rose ── */
body[data-theme="sunset"] {
  --bg:          #fffbf5;
  --bg-elevated: #ffffff;
  --text:        #3d1a00;
  --text-light:  #5c2e10;
  --text-soft:   #8a5530;
  --muted:       #b07040;
  --muted-bg:    #fef3e2;
  --primary-color:#d97706;
  --primary-light:#fef3c7;
  --primary-dark:  #b45309;
  --accent:      #f59e0b;
  --accent-hover:#d97706;
  --accent-fg:   #ffffff;
  --card:        #ffffff;
  --card-hover:  #fffbeb;
  --border:      #fed7aa;
  --border-strong:#fdba74;
  --input:       #fed7aa;
  --ring:        #d97706;
  --accent-rgb:  245, 158, 11;
  --primary-rgb: 217, 119, 6;
  color-scheme:  light;
}
body[data-theme="sunset"][data-dark] {
  --bg:          #1a0e02;
  --bg-elevated: #2d1800;
  --text:        #fff1e6;
  --text-light:  #fcd9b6;
  --text-soft:   #f0a060;
  --muted:       #d08040;
  --muted-bg:    #2d1800;
  --primary-color:#fbbf24;
  --primary-light:rgba(251,191,36,.14);
  --accent:      #fb923c;
  --accent-hover:#f97316;
  --accent-fg:   #431407;
  --card:        #2d1800;
  --card-hover:  #3d2200;
  --border:      #4a2e10;
  --border-strong:#5c3a18;
  --input:       #4a2e10;
  --ring:        #fbbf24;
  --shadow-xs:   0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.35);
  --shadow:      0 2px 8px rgba(0,0,0,.35);
  --shadow-md:   0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.45);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.55);
  color-scheme:  dark;
}

/* ── FOREST — Green/Sage ── */
body[data-theme="forest"] {
  --bg:          #f2f8f5;
  --bg-elevated: #ffffff;
  --text:        #0a2418;
  --text-light:  #18452f;
  --text-soft:   #2d6a4f;
  --muted:       #40916c;
  --muted-bg:    #d8f3dc;
  --primary-color:#2d6a4f;
  --primary-light:#d8f3dc;
  --primary-dark:  #1b4332;
  --accent:      #52b788;
  --accent-hover:#40916c;
  --accent-fg:   #ffffff;
  --card:        #ffffff;
  --card-hover:  #ecfdf5;
  --border:      #b7e4c7;
  --border-strong:#86efac;
  --input:       #b7e4c7;
  --ring:        #2d6a4f;
  --accent-rgb:  82, 183, 136;
  --primary-rgb: 45, 106, 79;
  color-scheme:  light;
}
body[data-theme="forest"][data-dark] {
  --bg:          #061a10;
  --bg-elevated: #0d2818;
  --text:        #d8f3dc;
  --text-light:  #95d5b2;
  --text-soft:   #52b788;
  --muted:       #40916c;
  --muted-bg:    #0d2818;
  --primary-color:#74c69d;
  --primary-light:rgba(116,198,157,.14);
  --accent:      #95d5b2;
  --accent-hover:#74c69d;
  --accent-fg:   #081a0f;
  --card:        #0d2818;
  --card-hover:  #143a24;
  --border:      #1b4332;
  --border-strong:#2d6a4f;
  --input:       #1b4332;
  --ring:        #74c69d;
  --shadow-xs:   0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.35);
  --shadow:      0 2px 8px rgba(0,0,0,.35);
  --shadow-md:   0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.45);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.55);
  color-scheme:  dark;
}

/* ── MIDNIGHT — Pure Dark ── */
body[data-theme="midnight"] {
  --bg:          #09090b;
  --bg-elevated: #131316;
  --text:        #fafafa;
  --text-light:  #e4e4e7;
  --text-soft:   #a1a1aa; /* 9.8:1 ✓ */
  --muted:       #8b8b94; /* v11: 7.6:1 WCAG AA */
  --muted-bg:    #18181b;
  --primary-color:#a78bfa;
  --primary-light:rgba(167,139,250,.12);
  --primary-dark:  #8b5cf6;
  --accent:      #c084fc;
  --accent-hover:#a855f7;
  --accent-fg:   #1a0533;
  --card:        #131316;
  --card-hover:  #1c1c20;
  --border:      #27272a;
  --border-strong:#3f3f46;
  --input:       #27272a;
  --ring:        #a78bfa;
  --shadow-xs:   0 1px 2px rgba(0,0,0,.5);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.5);
  --shadow:      0 2px 8px rgba(0,0,0,.5);
  --shadow-md:   0 4px 12px rgba(0,0,0,.55);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.65);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.75);
  --accent-rgb:  192, 132, 252;
  --primary-rgb: 167, 139, 250;
  color-scheme:  dark;
}

/* ═══════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: pageFadeIn .3s ease forwards; }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }

/* Smooth theme transitions — only background & color */
body,
.post-card, .entry, .post-article,
.hero-card, .footer-panel,
.contact-shell, .contact-copy, .contact-form-card,
.dropdown-content {
  transition: background-color .35s ease, border-color .3s ease, box-shadow .3s ease;
}
a, button, .btn, .pill, .hero-tag, .nav-link, .page-btn {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease,
             transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.85;
  font-size: clamp(16px, 1.2vw + 0.88rem, 19.5px);
  direction: rtl;
  text-align: right;
  letter-spacing: 0.008em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}

/* ═══════════════════════════════════════════════
   Typography — Fluid Major Third Scale
   ═══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  line-height: 1.3;
  color: var(--text);
  font-weight: 700;
  text-wrap: balance;
  margin-top: 0;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(1.85rem, 4.2vw + 0.3rem, 2.85rem);
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
h2 {
  font-size: clamp(1.5rem, 2.8vw + 0.2rem, 2rem);
  margin-top: 1.8em;
  margin-bottom: 0.45em;
  line-height: 1.25;
}
h3 {
  font-size: clamp(1.2rem, 1.8vw + 0.15rem, 1.5rem);
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}
h4 {
  font-size: clamp(1.08rem, 1.3vw + 0.1rem, 1.2rem);
  margin-top: 1.4em;
  margin-bottom: 0.35em;
}
h5, h6 {
  font-size: clamp(1rem, 1vw + 0.05rem, 1.08rem);
  margin-top: 1.2em;
  margin-bottom: 0.3em;
}

p {
  margin-bottom: 1.35em;
  color: var(--text-light);
  font-weight: 400;
  font-size: clamp(0.98rem, 0.25vw + 0.94rem, 1.06rem);
  text-wrap: pretty;
  line-height: 1.9;
}

/* Tighter spacing after headings */
h2 + p, h3 + p, h4 + p { margin-top: 0; }

/* Dark mode — more generous line-height for Arabic */
body[data-dark] p,
body[data-theme="midnight"] p {
  line-height: 2;
  color: var(--text-soft);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: var(--accent); }

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  opacity: 0.96;
  transition: opacity .3s ease, filter .3s ease;
}
/* v11 — تكيّف الصور مع الثيم الداكن */
body[data-dark] img:not([src*=".svg"]),
body[data-theme="midnight"] img:not([src*=".svg"]) {
  opacity: 0.85;
  filter: brightness(0.92);
}

::selection {
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--text);
}

/* ═══════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════ */
.container {
  max-width: min(92vw, 1120px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.8vw, 1.5rem);
}
.container-sm {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.8vw, 1.5rem);
}
main { flex: 1; }
.arabic-text { font-family: var(--font-body); }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: inherit;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  line-height: 1.4;
}
.btn-ghost:hover {
  background: var(--muted-bg);
  color: var(--text);
}
.btn-outline { border-color: var(--border); }
.btn-outline:hover { background: var(--muted-bg); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Minimum 44×44px touch target — WCAG 2.5.8 / Apple HIG */
.btn-icon {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Focus Visible — Accessibility ── */
:focus-visible {
  outline: 2.5px solid var(--ring);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2.5px solid var(--ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(var(--primary-rgb), 0.12);
}
:focus:not(:focus-visible) { outline: none; }

/* ── Optimal reading line-length ── */
.post-body, .post-content {
  max-width: min(68ch, 100%);
  margin-inline: auto;
}
.entry .snippet { max-width: 62ch; }

/* ═══════════════════════════════════════════════
   Reading Progress Bar
   ═══════════════════════════════════════════════ */
#reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to left, var(--accent), var(--primary-color));
  z-index: 10050;
  box-shadow: 0 1px 4px rgba(var(--accent-rgb), 0.35);
  transition: width .1s linear;
}

/* ═══════════════════════════════════════════════
   Back to Top
   ═══════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  left: 1.25rem;
  bottom: 1.75rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10010;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.38);
}
.back-to-top:active { transform: translateY(0); }
@media (max-width: 640px) {
  .back-to-top { width: 44px; height: 44px; left: 0.75rem; bottom: 1.25rem; }
}

/* ═══════════════════════════════════════════════
   Theme Switcher
   ═══════════════════════════════════════════════ */
.theme-bar { display: none !important; }

.theme-switcher { position: relative; }
.theme-switcher-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.theme-switcher-toggle:hover {
  background: var(--muted-bg);
  border-color: var(--primary-color);
}
.theme-switcher-toggle .theme-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: background .3s;
}
.theme-switcher-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 256px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 10030;
}
.theme-switcher.open .theme-switcher-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.theme-switcher-popover .ts-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding: 0 4px;
  display: block;
}
.theme-options { display: grid; gap: 4px; }
.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .2s;
  background: transparent;
  width: 100%;
  text-align: right;
  font-family: inherit;
}
.theme-option:hover {
  background: var(--muted-bg);
  border-color: var(--border);
}
.theme-option.active {
  border-color: var(--primary-color);
  background: var(--primary-light);
}
.theme-option .to-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,.06);
}
.theme-option[data-pick="default"]  .to-swatch { background: linear-gradient(135deg,#059669,#4361ee); }
.theme-option[data-pick="ocean"]    .to-swatch { background: linear-gradient(135deg,#06b6d4,#0284c7); }
.theme-option[data-pick="sunset"]   .to-swatch { background: linear-gradient(135deg,#f59e0b,#f97316); }
.theme-option[data-pick="forest"]   .to-swatch { background: linear-gradient(135deg,#52b788,#2d6a4f); }
.theme-option[data-pick="midnight"] .to-swatch { background: linear-gradient(135deg,#c084fc,#18181b); }
.theme-option .to-info { flex: 1; }
.theme-option .to-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1.2;
}
.theme-option .to-desc {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}
.theme-option .to-check {
  font-size: 0.78rem;
  color: var(--primary-color);
  opacity: 0;
  transition: opacity .2s;
}
.theme-option.active .to-check { opacity: 1; }

.ts-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.ts-dark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.ts-dark-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.ts-dark-label i { color: var(--muted); }
.ts-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.ts-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.ts-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border);
  transition: background .3s;
}
.ts-toggle input:checked + .ts-toggle-track { background: var(--primary-color); }
.ts-toggle-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: right .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.ts-toggle input:checked ~ .ts-toggle-thumb { right: calc(100% - 19px); }



/* ═══════════════════════════════════════════════
   Hero Section
   ═══════════════════════════════════════════════ */
.hero {
  padding: clamp(2rem, 4.5vw, 3.5rem) 0 1.5rem;
  text-align: center;
}
.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 3.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  max-width: 58ch;
  margin-inline: auto;
  line-height: 1.9;
  color: var(--text-light);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  text-align: right;
}
.feature {
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
body[data-dark] .feature{ background: rgba(22, 32, 50, 0.5); }
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.feature .ic {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  font-size: 1.1rem;
  transition: transform .2s;
}
.feature:hover .ic { transform: rotate(6deg) scale(1.08); }

/* Pills / Filters */
.section-title {
  margin: 2.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: clamp(1.2rem, 2vw, 1.35rem);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.pill {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-soft);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all .2s;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.03);
}
.pill.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

/* Hero Tags */
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.75rem; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--border);
  background: var(--muted-bg);
  color: var(--text-soft);
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
}
.hero-tag:hover { border-color: var(--accent); color: var(--text); background: var(--bg); }

/* ═══════════════════════════════════════════════
   Breadcrumbs
   ═══════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { opacity: 0.35; font-size: 0.75rem; }

/* ═══════════════════════════════════════════════
   Label Header
   ═══════════════════════════════════════════════ */
.label-header {
  padding: 2rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.label-header h1 {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 3vw, 1.85rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.label-header p { color: var(--text-light); margin-top: 0.4rem; }

/* ═══════════════════════════════════════════════
   Posts Grid — Responsive with container-query-like logic
   ═══════════════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  padding-block: 1.75rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

/* ═══════════════════════════════════════════════
   Post Card
   ═══════════════════════════════════════════════ */
.post-card, .entry {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: fadeUp .4s ease forwards;
  opacity: 0;
  height: 100%;
  position: relative;
}
.post-card::after, .entry::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(to left, var(--accent), var(--primary-color));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  z-index: 1;
}
.post-card:hover::after, .entry:hover::after { transform: scaleX(1); }

body[data-dark] .post-card, body[data-dark] .entry, body[data-theme="midnight"] .post-card, body[data-theme="midnight"] .entry {
  background: var(--card);
}

/* Staggered animation */
.post-card:nth-child(1), .entry:nth-child(1) { animation-delay: .04s; }
.post-card:nth-child(2), .entry:nth-child(2) { animation-delay: .08s; }
.post-card:nth-child(3), .entry:nth-child(3) { animation-delay: .12s; }
.post-card:nth-child(4), .entry:nth-child(4) { animation-delay: .16s; }
.post-card:nth-child(5), .entry:nth-child(5) { animation-delay: .20s; }
.post-card:nth-child(6), .entry:nth-child(6) { animation-delay: .24s; }
.post-card:nth-child(7), .entry:nth-child(7) { animation-delay: .28s; }
.post-card:nth-child(8), .entry:nth-child(8) { animation-delay: .32s; }
.post-card:nth-child(9), .entry:nth-child(9) { animation-delay: .36s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .post-card, .entry { animation: none; opacity: 1; }
}

.post-card:hover, .entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.fin-clickable-card { cursor: pointer; }
.fin-clickable-card a, .fin-clickable-card button { position: relative; z-index: 2; }

/* Card Image */
/* ══════════════════════════════════════════════════════════
   Image System v2 — Skeleton + Error + Aspect Ratio
   ══════════════════════════════════════════════════════════ */

/* ── @keyframes ── */
@keyframes img-skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── الغلاف (Shell) — .img-shell و .card-image-wrapper كلاهما يُولدان نفس السلوك ── */
.card-image-wrapper,
.img-shell {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--muted-bg, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ── Skeleton shimmer — يختفي عند .loaded ── */
.card-image-wrapper::before,
.img-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    var(--muted-bg, #e2e8f0) 30%,
    var(--subtle-bg, #f1f5f9) 50%,
    var(--muted-bg, #e2e8f0) 70%
  );
  background-size: 200% 100%;
  animation: img-skeleton 1.5s ease-in-out infinite;
  z-index: 1;
  transition: opacity var(--dur-base, .3s);
  pointer-events: none;
}

/* skeleton يختفي بعد التحميل */
.card-image-wrapper.loaded::before,
.img-shell.loaded::before {
  opacity: 0;
}

/* ── حالة الخطأ — يظهر أيقونة صورة مكسورة ── */
.card-image-wrapper.has-error::before,
.card-image-wrapper.img-error::before,
.img-shell.has-error::before {
  background: var(--muted-bg, #e2e8f0);
  animation: none;
}
.card-image-wrapper.has-error::after,
.card-image-wrapper.img-error::after,
.img-shell.has-error::after {
  content: '\f03e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--muted, #94a3b8);
  z-index: 2;
}

/* ── الأيقونة الداخلية (placeholder icon) ── */
.card-image-wrapper > i,
.img-shell > i {
  font-size: 1.8rem;
  color: var(--muted, #94a3b8);
  position: relative;
  z-index: 1;
  transition: opacity var(--dur-base, .3s);
}
.card-image-wrapper.loaded > i,
.img-shell.loaded > i {
  opacity: 0;
}

/* ── الصورة الفعلية ── */
.card-image,
.img-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease, transform .5s ease;
  position: relative;
  z-index: 1;
}
.card-image.loaded,
.img-shell.loaded img {
  opacity: 1;
}
.post-card:hover .card-image,
.post-card:hover .img-shell img {
  transform: scale(1.04);
}

/* Card Content */
.card-content {
  padding: clamp(1rem, 1.8vw, 1.25rem);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem;
}
.card-labels { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.card-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--muted-bg);
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  transition: color .15s, border-color .15s;
}
.card-label:hover { color: var(--text); border-color: var(--accent); }
.card-title {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a:hover { color: var(--accent); }
.card-snippet {
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(0.6rem, 1vw, 0.75rem);
  margin-top: auto;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.card-date { display: flex; align-items: center; gap: 0.3rem; }

/* Entry (alternative) */
.entry { padding: 1.35rem; }
.entry h3 { margin-bottom: 0.65rem; font-size: clamp(1.1rem, 1.4vw, 1.25rem); }
.entry h3 a:hover { color: var(--accent); }
.entry .snippet { flex-grow: 1; margin-bottom: 1.25rem; color: var(--text-light); line-height: 1.7; }

/* ═══════════════════════════════════════════════
   Pagination
   ═══════════════════════════════════════════════ */
.pagination, .blog-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  padding: 1.75rem 0 2.5rem;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  text-decoration: none;
}
.page-btn:hover { background: var(--muted-bg); color: var(--text); border-color: var(--accent); }

/* ═══════════════════════════════════════════════
   Single Post View
   ═══════════════════════════════════════════════ */
.post-container { padding-block: 1.75rem 3.5rem; }
.post-title {
  font-family: var(--font-body);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
}
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.post-meta span { display: flex; align-items: center; gap: 0.3rem; }
.read-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--muted-bg);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

/* Post Body — Carefully tuned for Arabic readability */
.post-body, .post-content {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  line-height: 2.1;
  color: var(--text);
  letter-spacing: 0.008em;
}
.post-body h2, .post-content h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.45rem;
}
.post-body h3, .post-content h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  color: var(--accent);
  padding-right: 0.8rem;
  border-right: 3px solid var(--accent);
}

/* Dark mode post body — more breathing room */
body[data-dark] .post-body, body[data-dark] .post-content {
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  line-height: 2.2;
  letter-spacing: 0.012em;
}
body[data-theme="midnight"] .post-body, body[data-theme="midnight"] .post-content {
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 2.25;
}

/* Theme-aware heading colors */
body[data-dark] .post-body h2, body[data-dark] .post-content h2 {
  color: var(--ring);
}
body[data-dark] .post-body h3, body[data-dark] .post-content h3 {
  color: var(--accent);
}

.post-body p, .post-content p {
  margin-bottom: 1.35rem;
  color: var(--text);
  font-size: inherit;
}
.post-body img, .post-content img {
  border-radius: var(--radius);
  max-width: 100%;
  height: auto;
  margin: 1.75rem auto;
  display: block;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity .35s ease;
}
.post-body img.loaded, .post-content img.loaded { opacity: 1; }

.post-body blockquote, .post-content blockquote {
  border-right: 4px solid var(--accent);
  padding: 1.25rem;
  margin: 1.75rem 0;
  background: rgba(var(--accent-rgb), 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.1rem;
  color: var(--text);
}
.post-body pre {
  background: var(--muted-bg);
  border: 1px solid var(--border);
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.35rem 0;
  font-size: 0.88rem;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--muted-bg);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}
.post-body pre code { background: transparent; padding: 0; }
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.post-body ul, .post-body ol { padding-right: 1.35rem; margin-bottom: 1.35rem; }
.post-body li { margin-bottom: 0.4rem; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.post-article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  margin-top: 0.75rem;
}

/* ═══════════════════════════════════════════════
   Comments
   ═══════════════════════════════════════════════ */
.comments-section {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.comments-section h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.comments { margin-top: 2.5rem; }
.comments h3, .comments h4 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

/* ═══════════════════════════════════════════════
   Contact Section
   ═══════════════════════════════════════════════ */
.contact-section { padding: 1.25rem 0 0; scroll-margin-top: 100px; }
.contact-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.06), transparent 35%), var(--card);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 700px) {
  .contact-shell { grid-template-columns: 1.05fr 0.95fr; gap: 1.15rem; padding: 1.5rem; }
}
.contact-copy, .contact-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--muted-bg);
}
.contact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.contact-title { margin: 0 0 0.6rem; color: var(--text); }
.contact-text { color: var(--text-soft); max-width: 30ch; line-height: 1.9; }
.contact-points { list-style: none; display: grid; gap: 0.65rem; margin-top: 1rem; }
.contact-points li { color: var(--text); display: flex; align-items: flex-start; gap: 0.6rem; line-height: 1.75; }
.contact-points i { color: var(--accent); margin-top: 0.15rem; font-size: 0.85rem; }
.contact-form { display: grid; gap: 0.85rem; }
.field-group { display: grid; gap: 0.4rem; }
.field-label { color: var(--text); font-size: 0.9rem; font-weight: 700; }
.field-input, .field-textarea {
  width: 100%;
  border: 1.5px solid var(--input);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  padding: 0.85rem 0.9rem;
  font-family: var(--font-ui);
  font-size: max(0.95rem, 16px);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--muted); }
.field-input:focus, .field-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
  background: var(--bg);
}
.field-textarea { min-height: 160px; resize: vertical; line-height: 1.85; }
.contact-feedback {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
  animation: fadeUp .3s ease;
}
.contact-feedback.success { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.25); }
.contact-feedback.error { background: rgba(239, 68, 68, 0.08); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.25); }
body[data-dark] .contact-feedback.error{ color: #f87171; border-color: rgba(248,113,113,.25); background: rgba(248,113,113,.08); }
.contact-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 0.85rem; flex-wrap: wrap; }
.contact-note { color: var(--text-soft); font-size: 0.85rem; margin: 0; max-width: 30ch; }
.contact-submit {
  min-width: 160px;
  background: linear-gradient(135deg, var(--accent), var(--primary-color));
  color: var(--accent-fg);
  border: none;
  transition: all .25s ease;
  background-size: 200% 200%;
  background-position: 0% 50%;
}
.contact-submit:hover { background-position: 100% 50%; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ═══════════════════════════════════════════════
   Responsive — Progressive Enhancement
   ═══════════════════════════════════════════════ */

/* Large screens — 4-column grid */
@media (min-width: 1280px) {
  .container { max-width: 1200px; }
  .posts-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Laptop — compact spacing */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Tablet — single column layout */
@media (max-width: 819px) {
  .hero-card { padding: 1.25rem 1rem; border-radius: var(--radius-sm); }
  .feature-grid, .contact-shell, .footer-grid { grid-template-columns: 1fr; }
  .contact-shell { padding: 1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .post-article { border-radius: var(--radius-sm); }
}

/* Mobile — tighter everything */
@media (max-width: 640px) {
  :root { --radius: 12px; --radius-sm: 8px; }
  .posts-grid { grid-template-columns: 1fr; gap: 1rem; }
  .grid { grid-template-columns: 1fr; gap: 1rem; }
  .post-card, .entry { border-radius: var(--radius); }
  .card-content { padding: 1rem; }
  .hero h1 { font-size: clamp(1.6rem, 5.5vw, 2rem); }
  .hero p { font-size: 0.95rem; }
  .pills { gap: 0.4rem; }
  .pill { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
  .footer-bottom { align-items: center; text-align: center; }
  .contact-shell { padding: 0.75rem; border-radius: var(--radius); }
  .contact-copy, .contact-form-card { padding: 1rem; border-radius: var(--radius-sm); }
  .footer-panel { padding: 1rem; border-radius: var(--radius-sm); }
}

/* Small mobile — minimal padding */
@media (max-width: 400px) {
  .container { padding-inline: 0.75rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.9rem; }
  .post-article { padding: 1.15rem 0.85rem; }
  .post-title { font-size: 1.45rem; }
  .section-title { font-size: 1.1rem; margin: 2rem 0 1rem; }
  .footer-bottom { font-size: 0.82rem; }
}

/* ═══════════════════════════════════════════════
   Theme-aware accents
   ═══════════════════════════════════════════════ */
body[data-theme="ocean"] ::selection    { background: rgba(6,182,212,.22); }
body[data-theme="sunset"] ::selection   { background: rgba(245,158,11,.22); }
body[data-theme="forest"] ::selection   { background: rgba(82,183,136,.22); }
body[data-theme="midnight"] ::selection { background: rgba(192,132,252,.22); }


/* ═══════════════════════════════════════════════
   Component Utilities
   ═══════════════════════════════════════════════ */

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  font-family: var(--font-ui);
  margin-bottom: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  flex-shrink: 0;
}

/* Read-link with animated arrow */
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
  transition: gap .2s ease, color .15s;
  text-decoration: none;
  padding: 6px 0;
  min-height: 36px;
}
.read-link:hover { gap: 9px; color: var(--accent-hover); }
.read-link i { font-size: 0.75rem; transition: transform .2s ease; }
.read-link:hover i { transform: translateX(-2px); }

/* Widget title with extending line */
.widget-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  font-family: var(--font-ui);
}
.widget-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Section badge (per-domain) */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: var(--font-ui);
  margin-bottom: 0.75rem;
  color: var(--badge-color, var(--accent));
  background: rgba(var(--badge-rgb, var(--accent-rgb)), 0.08);
  border: 1px solid rgba(var(--badge-rgb, var(--accent-rgb)), 0.15);
}

/* ═══════════════════════════════════════════════
   Domain Chips
   ═══════════════════════════════════════════════ */
.fin-domains-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
}
.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  transition: all .2s ease;
  text-decoration: none;
}
.domain-chip i { color: var(--chip-color, var(--accent)); font-size: 0.75rem; }
.domain-chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--chip-color, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

/* ═══════════════════════════════════════════════
   Quote Rotator
   ═══════════════════════════════════════════════ */
.fin-quotes-section { padding: clamp(2.5rem, 5vw, 4rem) 1rem; background: var(--muted-bg); }
.fin-quote-box {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.fin-quote-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to left, var(--d-quotes), var(--primary-color));
}
.fin-quote-mark {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--d-quotes);
  line-height: .7;
  margin-bottom: 0.4rem;
  opacity: 0.18;
  font-family: Georgia, serif;
  display: block;
}
.fin-quote-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw + 0.3rem, 1.2rem);
  color: var(--text);
  line-height: 2;
  font-style: italic;
  transition: opacity .3s ease;
  min-height: 2.5em;
}
.fin-quote-source {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--d-quotes);
  font-weight: 800;
  transition: opacity .3s ease;
}
.fin-quote-nav { display: flex; align-items: center; justify-content: center; gap: 0.85rem; margin-top: 1.25rem; }
.fin-quote-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--muted-bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); cursor: pointer; transition: all .2s ease; font-size: 0.82rem;
}
.fin-quote-btn:hover { background: var(--d-quotes); color: #fff; border-color: var(--d-quotes); }
.fin-quote-dots { display: flex; gap: 6px; }
.fin-quote-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all .2s; }
.fin-quote-dot.active { background: var(--d-quotes); transform: scale(1.35); }

/* ═══════════════════════════════════════════════
   Podcast Episode Cards
   ═══════════════════════════════════════════════ */
.fin-podcast-ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 1.15rem;
  margin-top: 1.75rem;
}
.fin-podcast-ep {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.fin-podcast-ep::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to left, var(--d-podcast), #ff6b9d);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
  z-index: 1;
}
.fin-podcast-ep:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--d-podcast); }
.fin-podcast-ep:hover::after { transform: scaleX(1); }
.fin-podcast-ep-art {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--d-podcast), #ff6b9d);
  position: relative;
}
.fin-podcast-ep-art i { font-size: 2.2rem; color: rgba(255,255,255,.85); }
.fin-podcast-ep-num {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,.3);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.fin-podcast-ep-body { padding: 1.15rem; }
.fin-podcast-ep-cat { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 800; color: var(--d-podcast); margin-bottom: 0.5rem; }
.fin-podcast-ep-title { font-size: 0.95rem; font-weight: 700; color: var(--text); line-height: 1.5; margin-bottom: 0.4rem; }
.fin-podcast-ep-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.7; margin-bottom: 0.85rem; }
.fin-podcast-ep-footer { display: flex; align-items: center; justify-content: space-between; }
.fin-podcast-ep-dur { font-size: 0.8rem; color: var(--text-soft); display: flex; gap: 4px; align-items: center; }
.fin-podcast-ep-play {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--d-podcast);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all .2s;
  text-decoration: none;
}
.fin-podcast-ep-play:hover { filter: brightness(1.1); }

/* ═══════════════════════════════════════════════
   Learn Section Cards
   ═══════════════════════════════════════════════ */
.fin-learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1.1rem;
  margin-top: 1.75rem;
}
.fin-learn-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.fin-learn-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--d-learn);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
.fin-learn-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--d-learn); }
.fin-learn-card:hover::before { transform: scaleX(1); }
.fin-learn-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-xs);
  background: rgba(8,145,178,.1);
  color: var(--d-learn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
  transition: background .2s;
}
.fin-learn-card:hover .fin-learn-icon { background: rgba(8,145,178,.2); }
.fin-learn-level {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.fin-learn-level.beg { background: rgba(5,150,105,.08); color: #059669; border: 1px solid rgba(5,150,105,.15); }
.fin-learn-level.mid { background: rgba(217,119,6,.08); color: #d97706; border: 1px solid rgba(217,119,6,.15); }
.fin-learn-level.adv { background: rgba(124,58,237,.08); color: #7c3aed; border: 1px solid rgba(124,58,237,.15); }
body[data-dark] .fin-learn-level.beg { background: rgba(16,185,129,.14); color: #34d399; border-color: rgba(16,185,129,.25); }
body[data-dark] .fin-learn-level.mid { background: rgba(251,191,36,.14); color: #fbbf24; border-color: rgba(251,191,36,.25); }
body[data-dark] .fin-learn-level.adv { background: rgba(167,139,250,.14); color: #a78bfa; border-color: rgba(167,139,250,.25); }
.fin-learn-title { font-size: 0.92rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; line-height: 1.45; }
.fin-learn-sub { font-size: 0.78rem; color: var(--text-soft); line-height: 1.5; }
.fin-learn-footer { margin-top: 0.85rem; }
.fin-learn-link { color: var(--d-learn); font-size: 0.82rem; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; transition: gap .2s; }
.fin-learn-card:hover .fin-learn-link { gap: 8px; }

/* ── Learn Filter Bar ── */
.fin-learn-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-bottom: 1.75rem; }
.fin-learn-filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-soft);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fin-learn-filter-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.fin-learn-filter-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.fin-learn-filter-btn .fl-count { font-size: 0.7rem; background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 99px; font-weight: 700; }
.fin-learn-filter-btn.active .fl-count { background: rgba(255,255,255,.2); }
.fin-learn-card.hidden-by-filter { display: none; }

/* ── Learn Modal ── */
.fin-learn-modal {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.65);
  backdrop-filter: var(--blur-sm); -webkit-backdrop-filter: var(--blur-sm);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  padding: 0.75rem;
}
.fin-learn-modal.open { opacity: 1; pointer-events: auto; }
.fin-learn-modal-inner {
  width: min(920px, 95vw);
  height: min(600px, 88vh);
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}
.fin-learn-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted-bg);
  gap: 0.75rem;
  flex-shrink: 0;
}
.fin-learn-modal-title { font-size: 0.92rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; }
.fin-learn-modal-title i { color: var(--d-learn); }
.fin-learn-modal-actions { display: flex; gap: 6px; align-items: center; }
.fin-learn-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); transition: background .15s; font-size: 0.82rem;
}
.fin-learn-modal-close:hover { background: #ef4444; color: #fff; }
.fin-learn-modal-ext {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(8,145,178,.08); color: var(--d-learn);
  font-size: 0.76rem; font-weight: 700; border: none; cursor: pointer;
  transition: background .15s; text-decoration: none;
}
.fin-learn-modal-ext:hover { background: rgba(8,145,178,.16); }
.fin-learn-modal iframe { flex: 1; border: none; width: 100%; height: 100%; }

/* ── Resources ── */
.fin-resources { max-width: 660px; margin: 2.5rem auto 0; padding-top: 1.75rem; border-top: 2px dashed var(--border); }
.fin-resources-heading { text-align: center; font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; font-family: var(--font-ui); }
.fin-resources-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .fin-resources-grid { grid-template-columns: 1fr; } }
.fin-resource-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1rem, 2vw, 1.35rem);
  text-align: center;
  transition: all .2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.fin-resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-color); }
.fin-resource-icon {
  width: 50px; height: 50px; border-radius: 12px;
  margin: 0 auto 0.85rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.fin-resource-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.35rem; font-family: var(--font-ui); }
.fin-resource-card p { font-size: 0.85rem; color: var(--text-soft); line-height: 1.65; margin-bottom: 0.85rem; }
.fin-resource-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-color); font-weight: 600; font-size: 0.85rem; }
.fin-resource-card:hover .fin-resource-link { gap: 7px; }

/* ═══════════════════════════════════════════════
   Custom Scrollbar
   ═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }
body[data-dark] ::-webkit-scrollbar-thumb,
body[data-theme="midnight"] ::-webkit-scrollbar-thumb { background: var(--border); }
/* ═══════════════════════════════════════════════
   Hero Section — Full-height with animated blobs
   ═══════════════════════════════════════════════ */
.fin-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(5rem, 8vw, 6rem) 1rem clamp(3rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.fin-hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.fin-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.1;
}
.fin-hero-blob-1 { top: 8%; right: 8%; width: clamp(250px, 30vw, 380px); height: clamp(250px, 30vw, 380px); background: var(--primary-color); }
.fin-hero-blob-2 { bottom: 8%; left: 8%; width: clamp(200px, 25vw, 300px); height: clamp(200px, 25vw, 300px); background: var(--secondary-color); }
.fin-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}
.fin-hero-avatar-wrap {
  position: relative;
  display: inline-flex;
  padding: 16px;
  margin-bottom: 1.5rem;
}
.fin-hero-avatar {
  width: clamp(100px, 18vw, 140px);
  height: clamp(100px, 18vw, 140px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}
.fin-hero-verified {
  position: absolute;
  bottom: 16px;
  left: 12px;
  z-index: 2;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  box-shadow: var(--shadow-md);
}
.fin-hero h1 {
  font-family: var(--font-ui);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.fin-hero-role {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  min-height: 1.6em;
  transition: opacity .35s ease;
  font-family: var(--font-ui);
}
.fin-hero-desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.9;
  color: var(--text-light);
  max-width: 56ch;
  margin: 0 auto 1.75rem;
}
.fin-hero-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}
.fin-social-btn {
  width: clamp(40px, 6vw, 48px);
  height: clamp(40px, 6vw, 48px);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  box-shadow: var(--shadow-md);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.fin-social-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fin-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.28);
  transition: all .2s;
}
.fin-hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.38);
  color: #fff;
}

/* Pulse rings around hero avatar */
@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
.profile-pulse-ring {
  position: absolute;
  inset: -5px;
  border-radius: 9999px;
  border: 2.5px solid var(--primary-color);
  animation: pulseRing 2.2s cubic-bezier(.4, 0, .6, 1) infinite;
  pointer-events: none;
}
.profile-pulse-ring-2 {
  position: absolute;
  inset: -12px;
  border-radius: 9999px;
  border: 2px solid rgba(var(--primary-rgb), 0.3);
  animation: pulseRing 2.2s cubic-bezier(.4, 0, .6, 1) infinite 0.5s;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   Section Titles — Hero-style headers
   ═══════════════════════════════════════════════ */
.fin-section-title {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}
.fin-section-title h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-ui);
  margin-bottom: 0.4rem;
}
.fin-section-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent));
  margin: 0.4rem auto 0;
  border-radius: 99px;
}
.fin-section-desc {
  max-width: 62ch;
  margin: 0.6rem auto 0;
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  color: var(--text-light);
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════
   About Section
   ═══════════════════════════════════════════════ */
.fin-about {
  padding: clamp(2.5rem, 5vw, 4rem) 1rem;
  background: var(--muted-bg);
}
.fin-about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 920px;
  margin: 0 auto;
  align-items: center;
}
@media (min-width: 700px) { .fin-about-grid { grid-template-columns: 1fr 1fr; } }
.fin-about-text p {
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 1.2vw, 1.05rem);
  line-height: 2;
  margin-bottom: 1.1rem;
}
.fin-about-text h3 {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  font-family: var(--font-ui);
}
.fin-about-text ul { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.fin-about-text ul li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.92rem;
}
.fin-about-text ul li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent);
  font-size: 0.75rem;
}
.fin-about-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }
.fin-tag {
  padding: 0.3rem 0.85rem;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .15s;
}
.fin-tag:hover { background: var(--primary-color); color: #fff; }
body[data-dark] .fin-tag{ background: rgba(var(--primary-rgb), 0.15); color: var(--ring); }
.fin-about-image-wrap { position: relative; }
.fin-about-image-wrap img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.fin-about-badge {
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: clamp(70px, 8vw, 85px);
  height: clamp(70px, 8vw, 85px);
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 900;
  box-shadow: var(--shadow-md);
}
.fin-about-badge span {
  font-size: 0.62rem;
  font-weight: 500;
  margin-top: 1px;
  text-align: center;
}
@media (max-width: 480px) { .fin-about-badge { display: none; } }

/* Stats counters */
.fin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 920px;
  margin-inline: auto;
}
@media (min-width: 520px) { .fin-stats { grid-template-columns: repeat(4, 1fr); } }
.fin-stat-card {
  text-align: center;
  padding: clamp(1rem, 1.5vw, 1.35rem) 0.75rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.fin-stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fin-stat-num {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 900;
  color: var(--primary-color);
  font-family: var(--font-ui);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.fin-stat-label { font-size: 0.82rem; color: var(--text-soft); }

/* ═══════════════════════════════════════════════
   Podcast Section — Grid Cards
   ═══════════════════════════════════════════════ */
.fin-podcast {
  padding: clamp(2.5rem, 5vw, 4rem) 1rem;
  background: var(--bg);
}
.fin-podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.15rem;
  max-width: 1080px;
  margin: 0 auto;
}
.fin-podcast-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.fin-podcast-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.fin-podcast-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  transition: transform .4s ease;
}
.fin-podcast-card:hover .fin-podcast-img { transform: scale(1.04); }
.fin-podcast-img-placeholder {
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
}
.fin-podcast-body { padding: 1.15rem; flex: 1; display: flex; flex-direction: column; }
.fin-podcast-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.fin-podcast-cat { color: var(--primary-color); font-weight: 600; }
.fin-podcast-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.5; margin-bottom: 0.6rem; flex: 1; }
.fin-podcast-desc { font-size: 0.88rem; color: var(--text-soft); line-height: 1.65; margin-bottom: 0.85rem; }
.fin-podcast-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.fin-podcast-duration { font-size: 0.8rem; color: var(--muted); }
.fin-podcast-play { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--primary-color); font-weight: 700; font-size: 0.88rem; text-decoration: none; transition: gap .2s; }
.fin-podcast-play:hover { gap: 0.6rem; }

/* Podcast filter tags */
.fin-podcast-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-bottom: 1.75rem; }
.fin-podcast-tag {
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-light);
  cursor: pointer;
  transition: all .15s;
}
.fin-podcast-tag:hover, .fin-podcast-tag.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* Coming soon placeholder */
.fin-podcast-coming-soon {
  text-align: center;
  padding: clamp(2.5rem, 4vw, 3.5rem) 1.5rem;
  background: var(--muted-bg);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-soft);
}
.fin-podcast-coming-soon i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 0.85rem; display: block; }
.fin-podcast-coming-soon h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.fin-podcast-cta { text-align: center; margin-top: 2rem; }
.fin-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
  transition: all .2s;
}
.fin-btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.35); color: #fff; }

/* ═══════════════════════════════════════════════
   Works Section
   ═══════════════════════════════════════════════ */
.fin-works {
  padding: clamp(2.5rem, 5vw, 4rem) 1rem;
  background: var(--muted-bg);
}
.fin-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.15rem;
  max-width: 1080px;
  margin: 0 auto;
}
.fin-work-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.fin-work-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.fin-work-icon-wrap { padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2vw, 1.75rem) 0.85rem; display: flex; align-items: center; gap: 0.85rem; }
.fin-work-icon {
  width: clamp(42px, 5vw, 50px);
  height: clamp(42px, 5vw, 50px);
  border-radius: var(--radius-xs);
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  transition: background .2s, color .2s;
}
.fin-work-card:hover .fin-work-icon { background: var(--primary-color); color: #fff; }
.fin-work-tag { font-size: 0.75rem; font-weight: 600; color: var(--muted); background: var(--muted-bg); padding: 0.2rem 0.6rem; border-radius: 50px; }
.fin-work-body { padding: 0 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.fin-work-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.fin-work-desc { font-size: 0.88rem; color: var(--text-soft); line-height: 1.65; flex: 1; }
.fin-work-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.85rem; color: var(--primary-color); font-weight: 600; font-size: 0.88rem; text-decoration: none; transition: gap .2s; }
.fin-work-link:hover { gap: 0.6rem; }

/* ═══════════════════════════════════════════════
   Content Cards — afkar-style reusable
   ═══════════════════════════════════════════════ */
.fin-afkar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.fin-afkar-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.fin-afkar-img { width: 100%; height: 170px; object-fit: cover; transition: transform .4s; }
.fin-afkar-card:hover .fin-afkar-img { transform: scale(1.04); }
.fin-afkar-placeholder {
  width: 100%; height: 170px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
}
.fin-afkar-body { padding: 1.15rem; flex: 1; display: flex; flex-direction: column; }
.fin-afkar-date { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.3rem; }
.fin-afkar-title { font-size: 0.98rem; font-weight: 700; color: var(--text); line-height: 1.5; flex: 1; margin-bottom: 0.65rem; }
.fin-afkar-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--primary-color); font-weight: 600; font-size: 0.85rem; margin-top: auto; text-decoration: none; transition: gap .2s; }
.fin-afkar-link:hover { gap: 0.6rem; }
.fin-afkar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.15rem;
  max-width: 1080px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   Footer — fin- style
   ═══════════════════════════════════════════════ */
.fin-footer {
  background: var(--muted-bg);
  border-top: 1px solid var(--border);
  padding: 0 0 1.25rem;
  font-family: var(--font-ui);
}
.fin-footer-inner { max-width: 1080px; margin: 0 auto; }
.fin-footer-top { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; margin-bottom: 2rem; }
@media (min-width: 700px) { .fin-footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.fin-footer-brand h3 { font-size: clamp(1.15rem, 1.8vw, 1.25rem); font-weight: 800; color: var(--text); margin-bottom: 0.3rem; }
.fin-footer-brand p { font-size: 0.88rem; color: var(--text-soft); }
.fin-footer-socials { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.fin-footer-social {
  width: 38px; height: 38px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform .2s, box-shadow .2s;
}
.fin-footer-social:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.fin-footer-divider { border: none; border-top: 1px solid var(--border); margin-bottom: 1.25rem; }
.fin-footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
@media (min-width: 560px) { .fin-footer-bottom { flex-direction: row; justify-content: space-between; } }
.fin-footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.fin-footer-links a { font-size: 0.85rem; color: var(--text-soft); text-decoration: none; transition: color .15s; }
.fin-footer-links a:hover { color: var(--accent); }
.fin-footer-copy { font-size: 0.82rem; color: var(--muted); }

/* ═══════════════════════════════════════════════
   Theme FAB — Floating Action Button
   ═══════════════════════════════════════════════ */
.fin-theme-fab {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.fin-theme-fab-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
  border: none;
  transition: var(--transition);
}
.fin-theme-fab-btn:hover { transform: scale(1.06); box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.4); }
.fin-theme-opts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: var(--transition);
}
.fin-theme-fab.active .fin-theme-opts { opacity: 1; visibility: visible; transform: translateY(0); }
.fin-theme-opt {
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  transition: transform .15s;
  border: none;
}
.fin-theme-opt:hover { transform: scale(1.1); }
.fin-theme-opt.light { background: #f3f4f6; color: #1f2937; }
.fin-theme-opt.dark  { background: #1e293b; color: #f8fafc; }

/* ═══════════════════════════════════════════════
   Label pills wrapper (for label pages)
   ═══════════════════════════════════════════════ */
.fin-label-pills-wrap {
  padding: 1.25rem 0 0;
  text-align: center;
}

/* ═══════════════════════════════════════════════
   Fade-in Section (scroll reveal)
   ═══════════════════════════════════════════════ */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   Page Loader
   ═══════════════════════════════════════════════ */
.fin-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity .4s ease, visibility .4s ease;
}
.fin-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.fin-loader-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(var(--primary-rgb), 0.18);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: finSpin 0.8s linear infinite;
  margin-bottom: 0.85rem;
}
@keyframes finSpin { to { transform: rotate(360deg); } }
.fin-loader-text { font-size: 1rem; font-weight: 600; color: var(--primary-color); font-family: var(--font-ui); }

/* ═══════════════════════════════════════════════
   Stars (dark mode ambient effect)
   ═══════════════════════════════════════════════ */
.fin-stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  display: none;
  overflow: hidden;
}
body[data-dark] .fin-stars,
body[data-theme="midnight"] .fin-stars { display: block; }
.fin-star {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
}
@keyframes finTwinkle {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.9; }
}

/* ═══════════════════════════════════════════════
   Scroll Progress (index page top bar)
   ═══════════════════════════════════════════════ */
.fin-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  z-index: 10100;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   Podcast Episode Cards — Filterable grid items
   ═══════════════════════════════════════════════ */
.fin-podcast-card[data-cat] {
  transition: transform .2s, box-shadow .2s, opacity .25s;
}
.fin-podcast-card.hidden-by-filter {
  display: none;
}

/* ═══════════════════════════════════════════════
   Final responsive passes — ensure nothing breaks
   ═══════════════════════════════════════════════ */

/* Small screens — tighter hero & sections */
@media (max-width: 640px) {
  .fin-hero { padding: clamp(4rem, 12vw, 5rem) 0.85rem clamp(2rem, 8vw, 3rem); }
  .fin-hero-avatar { width: 90px; height: 90px; border-width: 3px; }
  .fin-hero-verified { width: 26px; height: 26px; font-size: 0.7rem; bottom: 10px; left: 8px; }
  .profile-pulse-ring { inset: -4px; }
  .profile-pulse-ring-2 { inset: -9px; }
  .fin-hero-socials { gap: 0.5rem; }
  .fin-social-btn { width: 38px; height: 38px; font-size: 0.9rem; }
  .fin-domains-strip { gap: 6px; }
  .domain-chip { padding: 6px 10px; font-size: 0.75rem; }
  .fin-hero-cta { padding: 0.65rem 1.5rem; font-size: 0.88rem; }
  .fin-stats { gap: 0.6rem; }
  .fin-stat-card { padding: 0.85rem 0.6rem; }
  .fin-stat-num { font-size: 1.2rem; }
  .fin-about-grid { gap: 1.25rem; }
  .fin-about-image-wrap img { aspect-ratio: 3/2; }
  .fin-podcast-ep-art { height: 90px; }
  .fin-podcast-ep-art i { font-size: 1.8rem; }
  .fin-podcast-ep-body { padding: 1rem; }
  .fin-podcast-ep-title { font-size: 0.9rem; }
  .fin-podcast-ep-desc { font-size: 0.82rem; margin-bottom: 0.7rem; }
  .fin-podcast-ep-play { padding: 4px 10px; font-size: 0.72rem; }
  .fin-work-icon-wrap { padding: 1rem 1rem 0.75rem; }
  .fin-work-body { padding: 0 1rem 1rem; }
  .fin-afkar-img, .fin-afkar-placeholder { height: 140px; }
  .fin-resource-card { padding: 1rem 0.85rem; }
  .fin-resource-icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .fin-quote-box { padding: 1.5rem 1.15rem; }
  .fin-quote-mark { font-size: 2.5rem; }
  .fin-learn-card { padding: 1rem; }
  .fin-learn-icon { width: 38px; height: 38px; font-size: 1rem; margin-bottom: 0.7rem; }
  .fin-learn-title { font-size: 0.85rem; }
  .fin-learn-sub { font-size: 0.74rem; }
  .fin-learn-level { top: 8px; left: 8px; padding: 2px 6px; font-size: 0.62rem; }
  .fin-learn-modal-inner { height: min(500px, 85vh); }
  .fin-learn-modal-header { padding: 0.6rem 1rem; }
  .fin-resources { margin-top: 2rem; padding-top: 1.25rem; }
  .fin-resources-grid { gap: 0.75rem; }
  .fin-resource-card h3 { font-size: 0.92rem; }
  .fin-resource-card p { font-size: 0.82rem; }
  .fin-theme-fab { bottom: 1rem; left: 1rem; }
  .fin-theme-fab-btn { width: 42px; height: 42px; font-size: 1.05rem; }
  .fin-theme-opt { width: 36px; height: 36px; font-size: 0.78rem; }
  .fin-scroll-progress { height: 2px; }
}

/* Very small screens — absolute minimum */
@media (max-width: 360px) {
  .fin-hero h1 { font-size: 1.5rem; }
  .fin-hero-desc { font-size: 0.92rem; }
  .fin-hero-actions { flex-direction: column; align-items: stretch; }
  .fin-hero-cta { justify-content: center; }
  .fin-domains-strip { justify-content: center; }
  .fin-learn-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .fin-podcast-ep-grid { grid-template-columns: 1fr; }
  .fin-works-grid { grid-template-columns: 1fr; }
  .fin-afkar-grid { grid-template-columns: 1fr; }
  .fin-footer-top { gap: 1.25rem; }
}

/* Large screens — extra breathing room */
@media (min-width: 1280px) {
  .fin-hero-inner { max-width: 720px; }
  .fin-about-grid { max-width: 960px; }
  .fin-podcast-grid { grid-template-columns: repeat(3, 1fr); }
  .fin-works-grid { grid-template-columns: repeat(3, 1fr); }
  .fin-afkar-grid { grid-template-columns: repeat(3, 1fr); }
  .fin-learn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fin-learn-card.hidden-by-filter { display: none; }
}


/* ═══ v11 — Section Dividers ═══ */
.fin-hero { position: relative; }
.fin-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  pointer-events: none;
}
.fin-quotes-section::before,
.fin-podcast::before,
.fin-learn::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ═══ v11 — Arabic readability on small screens ═══ */
@media (max-width: 400px) {
  body { font-size: 16px; line-height: 2; }
  .card-snippet { font-size: 0.85rem; line-height: 1.8; }
  .card-title { font-size: 0.95rem; }
}

/* ═══════════════════════════════════════════════
   Print Styles — Clean readable output
   ═══════════════════════════════════════════════ */
@media print {
  .navbar, .mobile-drawer, .menu-overlay,
  .back-to-top, .fin-scroll-progress, #reading-progress,
  .fin-loader, .fin-stars, .fin-theme-fab,
  .fin-hero-socials, .fin-domains-strip, .fin-hero-cta,
  .search-panel, .text-share-tooltip,
  .fin-learn-filter, .fin-podcast-filters,
  .contact-section { display: none !important; }
  
  body { background: #fff; color: #1a1a1a; font-size: 12pt; }
  .fin-hero { min-height: auto; padding: 2rem 0; }
  .fin-hero h1 { font-size: 1.8rem; }
  .post-card, .entry { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .post-card::after, .entry::after { display: none; }
  .post-card:hover, .entry:hover { transform: none; }
  .post-article { box-shadow: none; border: 1px solid #ddd; padding: 2rem; }
  .post-body, .post-content { font-size: 11pt; line-height: 1.8; color: #222; }
  .post-body h2, .post-content h2 { color: #1a1a1a; border-bottom-color: #ddd; }
  .post-body h3, .post-content h3 { color: #333; border-right-color: #059669; }
  .fin-learn-modal { display: none !important; }
  .fade-in-section { opacity: 1 !important; transform: none !important; }
}