/* ---------- RESET & VARIABLES ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1a8fff;
  --blue-glow: rgba(26,143,255,0.18);
  --gold: #FFC107;
  --gold-dim: rgba(255,193,7,0.12);
  --gold-glow: rgba(255,193,7,0.22);
  --surface: #0b0e15;
  --surface2: #111827;
  --surface3: #1a2235;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --muted: #8899bb;
  --white: #eef2ff;
  --black: #07090e;
  --card: rgba(13,30,58,0.85);
  --green: #34d399;
  --green-glow: rgba(52,211,153,0.12);
  --red: #f87171;
  --red-glow: rgba(248,113,113,0.12);
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Playfair Display', serif;
  --font-arabic: 'Cairo', sans-serif;
  --font-code: 'Fira Code', monospace;
  --radius: 14px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  --surface: #fdf6ee;
  --surface2: #ffffff;
  --surface3: #fff8f0;
  --border: rgba(180,120,60,0.14);
  --border2: rgba(180,120,60,0.24);
  --muted: #6b5c7a;
  --white: #1a0a2e;
  --black: #fdf6ee;
  --card: rgba(255,255,255,0.97);
  --blue: #2563eb;
  --blue-glow: rgba(37,99,235,0.12);
  --gold: #c47c00;
  --gold-dim: rgba(196,124,0,0.10);
  --gold-glow: rgba(196,124,0,0.20);
  --green: #0d9e6a;
  --green-glow: rgba(13,158,106,0.10);
  --red: #dc2626;
  --red-glow: rgba(220,38,38,0.09);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  font-family: var(--font-body);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.75;
  transition: background var(--transition), color var(--transition);
}

/* Arabic font override */
html[data-lang="ar"] body,
html[data-lang="ar"] p,
html[data-lang="ar"] h1,
html[data-lang="ar"] h2,
html[data-lang="ar"] .callout,
html[data-lang="ar"] .verdict,
html[data-lang="ar"] .author-bio,
html[data-lang="ar"] .quiz-question,
html[data-lang="ar"] .quiz-opt,
html[data-lang="ar"] .toc-link {
  font-family: var(--font-arabic), sans-serif;
}

/* ---------- PROGRESS BAR ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  z-index: 9999;
  width: 0%;
  border-radius: 0 2px 2px 0;
  transition: width 0.12s linear;
  box-shadow: 0 0 12px var(--blue);
}

/* ---------- NAVIGATION ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7,9,14,0.75);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: transform 0.35s ease, background var(--transition);
}

nav.hidden {
  transform: translateY(-100%);
}

html[data-theme="light"] nav {
  background: rgba(253,246,238,0.85);
  border-bottom: 1px solid rgba(124,58,237,0.12);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: -0.5px;
}

html[data-lang="ar"] .nav-logo {
  font-family: var(--font-arabic);
}

.nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 700;
}

.ctrl-btn:hover {
  background: var(--gold);
  color: var(--black);
  transform: scale(1.1) rotate(-5deg);
}

.lang-btn {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.read-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  background: transparent;
}

.read-pill::before {
  content: '⏱️';
  font-size: 0.7rem;
}

/* ---------- HERO ---------- */
.blog-hero {
  padding: 100px 48px 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 14px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--gold-dim);
  margin-bottom: 28px;
  transition: gap 0.25s, background 0.25s;
}

.blog-back:hover {
  gap: 14px;
  background: rgba(255,193,7,0.22);
  box-shadow: 0 0 20px var(--gold-glow);
}

.blog-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.68rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 18px;
  background: var(--blue-glow);
  color: var(--blue);
  border: 1px solid rgba(26,143,255,0.2);
}

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 22px;
  background: linear-gradient(135deg, var(--white) 0%, #c0d4ff 35%, var(--gold) 65%, var(--white) 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 7s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.blog-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 40px;
  align-items: center;
}

.blog-meta-sep {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
  opacity: 0.5;
}

.blog-cover-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #050d1f;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  position: relative;
}

.blog-cover-img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  background: #050d1f;
}

/* ---------- LAYOUT (TOC + ARTICLE) ---------- */
.layout-wrap {
  display: grid;
  grid-template-columns: 1fr min(780px,100%) 280px;
  grid-template-areas: ". article toc";
  gap: 0 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}

html[data-lang="ar"] .layout-wrap {
  grid-template-columns: 280px min(780px,100%) 1fr;
  grid-template-areas: "toc article .";
}

@media (max-width: 1100px) {
  .layout-wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "article";
    padding: 40px 20px 80px;
  }
  .toc-sidebar { display: none; }
}

.toc-sidebar {
  grid-area: toc;
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.toc-title {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 14px;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 2px;
}

.toc-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-lang="ar"] .toc-link {
  border-left: none;
  border-right: 2px solid transparent;
}

.toc-link:hover {
  color: var(--white);
  background: var(--gold-dim);
  border-left-color: var(--gold);
}

html[data-lang="ar"] .toc-link:hover {
  border-left-color: transparent;
  border-right-color: var(--gold);
}

.toc-link.active {
  color: var(--gold);
  background: var(--gold-dim);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* ---------- ARTICLE ---------- */
.article {
  grid-area: article;
}

.article h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  margin: 52px 0 18px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html[data-lang="ar"] .article h2 {
  padding-left: 0;
  padding-right: 16px;
  border-left: none;
  border-right: 3px solid var(--gold);
}

.article h2.visible {
  opacity: 1;
  transform: translateY(0);
}

.article p {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 20px;
  font-size: 1.02rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.article p.visible {
  opacity: 1;
  transform: translateY(0);
}

.callout {
  border-left: 4px solid var(--gold);
  background: var(--gold-dim);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-style: italic;
  color: var(--white);
  font-size: 0.97rem;
  line-height: 1.85;
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative;
}

html[data-lang="ar"] .callout {
  border-left: none;
  border-right: 4px solid var(--gold);
  border-radius: 12px 0 0 12px;
  transform: translateX(22px);
}

.callout.visible {
  opacity: 1;
  transform: translateX(0);
}

strong {
  color: var(--white);
}

code {
  font-family: var(--font-code);
  font-size: 0.87em;
  background: var(--blue-glow);
  color: #7baeff;
  padding: 2px 7px;
  border-radius: 5px;
}

/* ---------- CODE BLOCK ---------- */
.code-block {
  background: rgba(4,10,22,0.9);
  border: 1px solid var(--border2);
  border-radius: 16px;
  margin: 24px 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.975) translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.code-block.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.code-dots {
  display: flex;
  gap: 7px;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #28c840; }

.code-label {
  font-size: 0.66rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-code);
}

.copy-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-family: var(--font-code);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--blue-glow);
  color: var(--blue);
  border-color: var(--blue);
}

.copy-btn.copied {
  background: var(--green-glow);
  color: var(--green);
  border-color: var(--green);
}

.code-block pre {
  font-family: var(--font-code);
  font-size: 0.86rem;
  line-height: 1.75;
  color: #c9d8ff;
  margin: 0;
  direction: ltr;
  text-align: left;
  padding: 22px 24px;
  overflow-x: auto;
}

/* Syntax highlighting */
.tok-kw { color: #e879f9; }
.tok-type { color: #38bdf8; }
.tok-str { color: #86efac; }
.tok-cmt { color: #64748b; font-style: italic; }
.tok-fn { color: #fbbf24; }
.tok-num { color: #fb923c; }

/* Highlight marks */
mark.hi {
  background: transparent;
  position: relative;
  color: inherit;
}

mark.hi::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: var(--gold-dim);
  border-radius: 3px;
  transition: height 0.5s cubic-bezier(0.34,1.56,0.64,1), opacity 0.5s;
  opacity: 0;
  z-index: -1;
}

mark.hi.lit::after {
  height: 100%;
  opacity: 1;
}

mark.neon {
  background: transparent;
  position: relative;
  color: inherit;
}

mark.neon::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -3px;
  right: -3px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
  border-radius: 2px;
}

html[data-lang="ar"] mark.neon::before {
  transform-origin: right;
}

mark.neon.lit::before {
  transform: scaleX(1);
}

/* ---------- VERDICT ---------- */
.verdict {
  background: var(--green-glow);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: 20px;
  padding: 32px;
  margin: 36px 0;
  text-align: center;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.verdict.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.verdict .v-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.verdict .v-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 10px;
}

.verdict .v-text {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- MEMORY DIAGRAM ---------- */
.memory-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin: 32px 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.memory-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.mem-section-label {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mem-section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--muted);
}

.mem-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.step-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.step-tab {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-code);
  transition: all 0.22s;
}

.step-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 16px var(--blue-glow);
}

.step-tab:hover:not(.active) {
  border-color: var(--blue);
  color: var(--blue);
}

.mem-diagram {
  width: 100%;
  overflow-x: auto;
}

.mem-diagram svg {
  display: block;
  margin: 0 auto;
}

.diagram-caption {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  font-style: italic;
}

/* ---------- QUIZ ---------- */
.quiz-section {
  background: linear-gradient(135deg, var(--surface2) 0%, rgba(26,143,255,0.04) 100%);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 32px;
  margin: 40px 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.quiz-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.quiz-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--blue-glow);
  border: 1px solid rgba(26,143,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.quiz-header-text h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
}

.quiz-header-text p {
  color: var(--muted);
  font-size: 0.8rem;
}

.quiz-progress-wrap {
  margin-bottom: 24px;
}

.quiz-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.quiz-progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

.quiz-card {
  display: none;
  animation: slideIn 0.35s ease;
}

.quiz-card.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quiz-q-num {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 8px;
}

.quiz-question {
  font-size: 1.02rem;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.65;
}

.quiz-opts {
  display: grid;
  gap: 10px;
}

.quiz-opt {
  padding: 13px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

html[data-lang="ar"] .quiz-opt {
  text-align: right;
  direction: rtl;
}

.quiz-opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
  font-family: var(--font-code);
}

.quiz-opt:hover:not(.answered) {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue-glow);
}

.quiz-opt:hover:not(.answered) .quiz-opt-letter {
  background: var(--blue);
  color: #fff;
}

.quiz-opt.correct {
  border-color: var(--green);
  background: var(--green-glow);
  color: var(--green);
}

.quiz-opt.correct .quiz-opt-letter {
  background: var(--green);
  color: #fff;
}

.quiz-opt.wrong {
  border-color: var(--red);
  background: var(--red-glow);
  color: var(--red);
}

.quiz-opt.wrong .quiz-opt-letter {
  background: var(--red);
  color: #fff;
}

.quiz-opt.answered {
  cursor: default;
}

.quiz-feedback {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.6;
  display: none;
}

.quiz-feedback.show {
  display: block;
  animation: slideIn 0.3s ease;
}

.quiz-feedback.ok {
  background: var(--green-glow);
  border: 1px solid rgba(52,211,153,0.2);
  color: var(--green);
}

.quiz-feedback.err {
  background: var(--red-glow);
  border: 1px solid rgba(248,113,113,0.2);
  color: var(--red);
}

.quiz-next-btn {
  margin-top: 16px;
  padding: 11px 24px;
  border-radius: 10px;
  background: var(--blue);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
}

.quiz-next-btn.show {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quiz-next-btn:hover {
  background: #1575e0;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--blue-glow);
}

.quiz-result {
  text-align: center;
  padding: 24px 0;
  display: none;
  animation: slideIn 0.4s ease;
}

.quiz-result.show {
  display: block;
}

.quiz-result-score {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.quiz-result-msg {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.quiz-restart {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.quiz-restart:hover {
  background: var(--gold);
  color: var(--black);
}

/* ---------- SHARE SECTION ---------- */
.share-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  margin: 32px 0;
}

.share-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.share-btn {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 7px;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.share-btn.twitter {
  border-color: rgba(29,161,242,0.3);
  color: #1da1f2;
}

.share-btn.twitter:hover {
  background: rgba(29,161,242,0.1);
}

.share-btn.linkedin {
  border-color: rgba(10,102,194,0.3);
  color: #0a66c2;
}

.share-btn.linkedin:hover {
  background: rgba(10,102,194,0.1);
}

.share-btn.copy-link {
  border-color: var(--border2);
  color: var(--muted);
}

.share-btn.copy-link:hover {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: var(--gold);
}

/* ---------- AUTHOR CARD ---------- */
.author-card {
  display: flex;
  gap: 22px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-top: 56px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.author-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.author-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--white);
}

.author-bio {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

/* ---------- FOOTER ---------- */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--surface);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-copy span {
  color: var(--gold);
}

.footer-route {
  color: var(--muted);
  font-size: 0.83rem;
}

.footer-route span {
  color: var(--blue);
  font-weight: 700;
}

.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  display: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  nav {
    padding: 0 16px;
  }
  .blog-hero {
    padding: 88px 20px 44px;
  }
  .read-pill {
    display: none;
  }
  .author-card {
    flex-direction: column;
    text-align: center;
  }
  footer {
    padding: 24px 20px;
    flex-direction: column;
    text-align: center;
  }
  .share-section {
    flex-direction: column;
    align-items: flex-start;
  }
}