/* ═══════════════════════════════════════════════════════
   PHOTOLESSONS — Dark Editorial Magazine Style
   ═══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:          #0a0a0b;
  --bg2:         #111114;
  --bg3:         #18181d;
  --border:      #2a2a32;
  --text:        #e8e6e0;
  --text-muted:  #8a8898;
  --accent:      #c9a84c;
  --accent-glow: rgba(201, 168, 76, 0.15);
  --accent-dim:  rgba(201, 168, 76, 0.6);
  --white:       #ffffff;
  --danger:      #e25555;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.7);

  --container: 1240px;
  --header-h:  68px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }

/* ── Container ── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}

/* ═══════════════════════════════════════════════════════
   HEADER / NAV
   ═══════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 2px 32px rgba(0,0,0,0.6); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.logo-mark {
  color: var(--accent);
  font-size: 1rem;
  transition: transform 0.3s var(--ease);
}
.nav-logo:hover .logo-mark { transform: rotate(180deg); }
.logo-text { color: var(--white); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.nav-link.active, .nav-link:hover { color: var(--accent); background: var(--accent-glow); }
.nav-divider { color: var(--border); font-size: 0.9rem; }

.nav-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 4px;
}
.nav-cats::-webkit-scrollbar { display: none; }

.cat-pill {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}
.cat-pill:hover, .cat-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Search */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.nav-search:focus-within { border-color: var(--accent); }
.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  padding: 7px 12px;
  width: 180px;
  font-size: 0.85rem;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 7px 12px;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
}
.search-btn:hover { color: var(--accent); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: clamp(420px, 60vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s var(--ease);
}
.hero:hover .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,11,0.97) 0%,
    rgba(10,10,11,0.7)  45%,
    rgba(10,10,11,0.2)  100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 64px 56px;
  max-width: 760px;
  animation: fadeUp 0.8s var(--ease) both;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.hero-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  padding: 4px 10px;
  border-radius: 999px;
}
.hero-reading {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 20px;
}
.hero-title a { transition: color 0.2s; }
.hero-title a:hover { color: var(--accent); }
.hero-summary {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(232, 230, 224, 0.75);
  margin-bottom: 32px;
  max-width: 600px;
}
.hero-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════ */
.stats-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.stats-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.83rem;
  color: var(--text-muted);
}
.stats-count { font-family: var(--font-mono); color: var(--accent); font-weight: 500; }
.stats-filter strong { color: var(--text); }
.stats-sort { margin-left: auto; }

/* ═══════════════════════════════════════════════════════
   POSTS GRID
   ═══════════════════════════════════════════════════════ */
.posts-section { padding: 48px 0 80px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 28px;
}

/* ── Post Card ── */
.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  animation: fadeUp 0.6s var(--ease) both;
}
.post-card:hover {
  border-color: rgba(201, 168, 76, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: block;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.post-card:hover .card-img { transform: scale(1.06); }
.card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10,10,11,0.5) 100%);
  transition: opacity 0.3s;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
  gap: 12px;
}
.card-meta { display: flex; gap: 8px; align-items: center; }
.card-reading {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.06em;
}
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
}
.card-title a { transition: color 0.2s; }
.card-title a:hover { color: var(--accent); }
.card-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-date { font-size: 0.78rem; color: var(--text-muted); }
.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.25s var(--ease);
  flex-shrink: 0;
}
.card-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateX(2px);
}

/* ── Author chip ── */
.author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.author-chip.large { gap: 14px; }
.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8a5f1e);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-chip.large .author-avatar { width: 44px; height: 44px; font-size: 1rem; }
.author-avatar.sm { width: 26px; height: 26px; font-size: 0.7rem; }
.author-info { display: flex; flex-direction: column; gap: 1px; }
.author-name { color: var(--text); font-weight: 500; }
.author-role { font-size: 0.72rem; color: var(--text-muted); }
.sep { color: var(--border); }

/* ── Buttons ── */
.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition: all 0.25s var(--ease);
}
.btn-read:hover { background: #e0bb5a; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(201,168,76,0.35); }
.btn-read svg { transition: transform 0.2s; }
.btn-read:hover svg { transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════ */
.empty-state { padding: 80px 0; }
.empty-inner { text-align: center; max-width: 480px; margin: auto; }
.empty-icon { font-size: 4rem; color: var(--border); margin-bottom: 24px; }
.empty-inner h2 { font-family: var(--font-display); font-size: 2rem; color: var(--white); margin-bottom: 12px; }
.empty-inner p { color: var(--text-muted); margin-bottom: 28px; }

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

/* Hero */
.post-hero { position: relative; background: var(--bg2); }
.post-hero-img-wrap {
  position: relative;
  height: clamp(260px, 40vh, 480px);
  overflow: hidden;
}
.post-hero-img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,11,0.1) 0%,
    rgba(10,10,11,0.85) 100%
  );
}
.post-hero-content {
  position: relative;
  z-index: 1;
  padding-block: clamp(32px, 5vw, 64px);
}

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  list-style: none;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:last-child { color: var(--accent); }

/* Post meta tags */
.post-tag-row { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.post-cat-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  padding: 4px 12px;
  border-radius: 999px;
}
.post-reading-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
  max-width: 900px;
}
.post-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.post-byline {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.post-dates { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Reading progress */
.reading-progress {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  height: 3px;
  background: var(--border);
}
.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #e0bb5a);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-dim);
}

/* Article layout */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 64px;
  padding-block: 56px 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; gap: 0; }
  .article-toc { display: none; }
}

/* TOC */
.article-toc { grid-column: 2; grid-row: 1; }
.toc-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.toc-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
#tocNav { display: flex; flex-direction: column; gap: 2px; }
.toc-item {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 5px 10px;
  border-left: 2px solid var(--border);
  transition: all 0.2s;
  line-height: 1.4;
}
.toc-item:hover, .toc-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.toc-item.h3 { padding-left: 22px; font-size: 0.75rem; }
.toc-share { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.toc-share-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.share-btns { display: flex; gap: 8px; }
.share-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.share-btn.copied { border-color: #4caf50; color: #4caf50; }

/* Article body */
.article-body { grid-column: 1; min-width: 0; }

/* Prose styles */
.prose {
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.85;
  color: var(--text);
}
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 {
  font-family: var(--font-display);
  color: var(--white);
  margin-top: 2.2em;
  margin-bottom: 0.7em;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 600; }
.prose h4 { font-size: 1.1rem; font-weight: 600; color: var(--accent); }
.prose p { margin-bottom: 1.4em; }
.prose strong { color: var(--white); font-weight: 600; }
.prose em { font-style: italic; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.prose a:hover { text-decoration-color: var(--accent); }

.prose ul, .prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 1.2em; }
.prose ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85em;
}
.prose ol { list-style: decimal; }

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 2em 0;
  padding: 16px 24px;
  background: var(--bg3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.05em;
  color: rgba(232, 230, 224, 0.85);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.prose pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.6em 0;
}
.prose pre code { background: none; border: none; padding: 0; color: var(--text); font-size: 0.88em; }

.prose img {
  border-radius: var(--radius);
  margin: 2em auto;
  max-width: 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.9em;
}
.prose th, .prose td {
  padding: 10px 16px;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th { background: var(--bg3); color: var(--white); font-weight: 600; }
.prose tr:nth-child(even) { background: rgba(255,255,255,0.02); }

.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* Article tags */
.article-tags { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.tag-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ═══════════════════════════════════════════════════════
   RELATED POSTS
   ═══════════════════════════════════════════════════════ */
.related-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 0 72px;
}
.related-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 36px;
}
.related-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
  border-radius: 2px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}
.post-card.small .card-title { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .logo-mark { color: var(--accent); }
.footer-brand .logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--white); }
.footer-tagline { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.footer-links h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.88rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-muted); }
.footer-copy a { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 16px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    pointer-events: none;
  }
  .nav-menu.open {
    transform: translateX(0);
    pointer-events: all;
  }
  .nav-cats { flex-wrap: wrap; overflow: visible; }
  .search-input { width: 100%; }
  .nav-search { flex: 1; }

  .posts-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .article-wrap { padding-block: 32px 48px; }
}

@media (max-width: 480px) {
  .hero-footer { flex-direction: column; align-items: flex-start; }
  .post-byline { gap: 16px; }
  .post-dates { flex-direction: column; gap: 4px; }
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ── Selection ── */
::selection { background: var(--accent-glow); color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   LANGUAGE SWITCHER (nav)
   ═══════════════════════════════════════════════════════ */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  flex-shrink: 0;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.lang-btn.active {
  background: var(--accent);
  color: var(--bg);
}
.lang-flag { font-size: 1rem; line-height: 1; }
.lang-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   LANGUAGE AVAILABILITY BADGES (post page)
   ═══════════════════════════════════════════════════════ */
.lang-avail {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.lang-avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg3);
  transition: all 0.2s var(--ease);
}
.lang-avail-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.lang-avail-badge.lang-avail-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  cursor: default;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   FOOTER LANGUAGE LINKS
   ═══════════════════════════════════════════════════════ */
.footer-lang h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-lang ul { display: flex; flex-direction: column; gap: 8px; }
.footer-lang a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-lang a:hover { color: var(--accent); }
.footer-lang-active { color: var(--accent) !important; font-weight: 600; }

/* Card category label */
.card-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════
   BACK TO TOP BUTTON
   ═══════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;

  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s var(--ease),
              visibility 0.3s var(--ease),
              transform 0.3s var(--ease),
              background 0.2s,
              box-shadow 0.2s;

  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #e0bb5a;
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.55);
  transform: translateY(-3px);
}
.back-to-top:active { transform: translateY(0); }

@media (max-width: 768px) {
  .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}

/* ═══════════════════════════════════════════════════════
   SHORTCODES
   ═══════════════════════════════════════════════════════ */

/* ── Tooltip ── */
.sc-tooltip {
  position: relative;
  display: inline;
  border-bottom: 1px dashed var(--accent-dim);
  cursor: help;
  color: var(--accent);
}
.sc-tooltip-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e1e26;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  padding: 8px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.sc-tooltip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}
.sc-tooltip:hover .sc-tooltip-bubble,
.sc-tooltip:focus .sc-tooltip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Quote ── */
.sc-quote {
  position: relative;
  margin: 2em 0;
  padding: 24px 28px 24px 36px;
  background: linear-gradient(135deg, rgba(201,168,76,0.07), rgba(201,168,76,0.02));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.sc-quote-mark {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent-dim);
  line-height: 1;
  pointer-events: none;
}
.sc-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(232,230,224,0.9);
  margin: 0 0 12px;
}
.sc-quote-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.sc-quote-dash { color: var(--accent); }
.sc-quote-footer cite { font-style: normal; color: var(--text-muted); }
.sc-quote-footer strong { color: var(--text); }
.sc-quote-role { color: var(--text-muted); font-size: 0.8rem; }

/* ── YouTube embed ── */
.sc-youtube {
  margin: 2em 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}
.sc-youtube-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-youtube-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s;
}
.sc-youtube-thumb:hover::before { background: rgba(0,0,0,0.15); }
.sc-youtube-play {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease), background 0.2s;
  flex-shrink: 0;
}
.sc-youtube-play:hover { background: #f00; transform: scale(1.1); }
.yt-play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 22px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
  display: block;
}
.sc-youtube-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 32px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
}
.sc-youtube-frame iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

/* ── Download button ── */
.sc-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 1em 0;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  text-decoration: none;
}
.sc-download:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.sc-download-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.sc-download-label { flex: 1; }
.sc-download-size {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg2);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ── Buttons ── */
.sc-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: all 0.22s var(--ease);
  text-decoration: none;
  cursor: pointer;
  margin: 4px 4px 4px 0;
}
.sc-button-primary { background: var(--accent); color: var(--bg); }
.sc-button-primary:hover { background: #e0bb5a; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,168,76,0.35); }
.sc-button-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.sc-button-outline:hover { background: var(--accent-glow); transform: translateY(-1px); }
.sc-button-danger { background: var(--danger); color: #fff; }
.sc-button-danger:hover { background: #c94040; transform: translateY(-1px); }

/* ── Photo / figure ── */
.sc-photo {
  margin: 2em 0;
}
.sc-photo-link {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.sc-photo-img { width: 100%; height: auto; display: block; transition: transform 0.4s var(--ease); }
.sc-photo-link:hover .sc-photo-img { transform: scale(1.03); }
.sc-photo-zoom {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(10,10,11,0.75);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.sc-photo-link:hover .sc-photo-zoom { opacity: 1; }
.sc-photo-caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 10px 0 0;
  font-style: italic;
}

/* ── Callouts ── */
.sc-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 22px;
  border-radius: var(--radius);
  margin: 1.6em 0;
  border: 1px solid;
}
.sc-callout-note    { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.35); }
.sc-callout-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.35); }
.sc-callout-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.35); }
.sc-callout-icon {
  font-size: 1.3rem;
  line-height: 1.5;
  flex-shrink: 0;
}
.sc-callout-note    .sc-callout-icon { color: #60a5fa; }
.sc-callout-warning .sc-callout-icon { color: #fbbf24; }
.sc-callout-success .sc-callout-icon { color: #34d399; }
.sc-callout-body { font-size: 0.93rem; line-height: 1.65; }
.sc-callout-note    .sc-callout-body { color: #93c5fd; }
.sc-callout-warning .sc-callout-body { color: #fde68a; }
.sc-callout-success .sc-callout-body { color: #6ee7b7; }

/* ── KBD ── */
.sc-kbd { display: inline-flex; align-items: center; gap: 2px; }
.sc-kbd kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
  line-height: 1.4;
}
.sc-kbd-plus { color: var(--text-muted); font-size: 0.75rem; padding: 0 1px; }

/* ── Inline code ── */
.sc-inline-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s var(--ease);
  cursor: zoom-out;
  backdrop-filter: blur(8px);
}
.lightbox-overlay img {
  max-width: min(90vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  cursor: default;
  animation: scaleIn 0.25s var(--ease);
}
.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.93); } to { transform: scale(1); } }

/* ═══════════════════════════════════════════════════════
   LIVE SEARCH DROPDOWN
   ═══════════════════════════════════════════════════════ */
.nav-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: clamp(300px, 50vw, 520px);
  background: #16161e;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  z-index: 300;
  overflow: hidden;
  animation: dropIn 0.18s var(--ease);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.sd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.sd-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sd-count {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* Individual hit */
.sd-hit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  text-decoration: none;
  color: inherit;
}
.sd-hit:last-of-type { border-bottom: none; }
.sd-hit:hover, .sd-hit.focused {
  background: rgba(201,168,76,0.07);
}
.sd-thumb {
  width: 52px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.sd-thumb-placeholder {
  width: 52px;
  height: 38px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 1.1rem;
}
.sd-body { flex: 1; min-width: 0; }
.sd-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-title mark {
  background: none;
  color: var(--accent);
  font-weight: 700;
}
.sd-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.sd-cat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 500;
}
.sd-arrow {
  margin-left: auto;
  color: var(--border);
  font-size: 1rem;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.sd-hit:hover .sd-arrow { color: var(--accent); transform: translateX(2px); }

/* Footer: Show all button */
.sd-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.sd-show-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 0;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.sd-show-all:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* Empty / loading states */
.sd-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.sd-empty strong { color: var(--text); }
.sd-loading {
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.sd-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile: dropdown full-width */
@media (max-width: 768px) {
  .search-dropdown {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-height: 70vh;
    overflow-y: auto;
  }
}

/* ═══════════════════════════════════════════════════════
   SHARE PANEL (sidebar)
   ═══════════════════════════════════════════════════════ */
.toc-share-panel {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.toc-share-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.share-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
}
.share-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.share-item:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.share-tg:hover  { background: #229ED9; border-color: #229ED9; color: #fff; }
.share-vk:hover  { background: #4C75A3; border-color: #4C75A3; color: #fff; }
.share-wa:hover  { background: #25D366; border-color: #25D366; color: #fff; }
.share-tw:hover  { background: #1DA1F2; border-color: #1DA1F2; color: #fff; }
.share-copy:hover, .share-native:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.share-copy.copied { border-color: #4caf50; color: #4caf50; background: rgba(76,175,80,0.1); }

/* ── Font size control ── */
.toc-font-size {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.toc-font-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}
.font-size-btns {
  display: flex;
  gap: 4px;
}
.font-size-btn {
  flex: 1;
  padding: 7px 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.font-size-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.font-size-reset { font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   REACTIONS
   ═══════════════════════════════════════════════════════ */
.reactions-block {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.reactions-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-weight: 500;
}
.reactions-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.22s var(--ease);
  min-width: 72px;
}
.reaction-emoji { font-size: 1.7rem; line-height: 1; transition: transform 0.2s; }
.reaction-count {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.reaction-btn:hover { border-color: var(--accent); background: var(--accent-glow); }
.reaction-btn:hover .reaction-emoji { transform: scale(1.25) rotate(-5deg); }
.reaction-btn.reacted {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.reaction-btn.reacted .reaction-count { color: var(--accent); }
.reaction-btn.pop .reaction-emoji { animation: pop 0.35s var(--ease); }
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5) rotate(-10deg); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   AUTHOR BIO CARD
   ═══════════════════════════════════════════════════════ */
.author-bio-card {
  margin-top: 40px;
  padding: 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.author-bio-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8a5f1e);
  color: var(--bg);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.author-bio-body { flex: 1; min-width: 0; }
.author-bio-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.author-bio-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}
.author-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}
.author-bio-link:hover { gap: 10px; }

/* ═══════════════════════════════════════════════════════
   MOBILE SHARE BAR
   ═══════════════════════════════════════════════════════ */
.mobile-share-bar {
  display: none;
  margin-top: 32px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mobile-share-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ms-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.ms-btn svg { width: 18px; height: 18px; }
.ms-btn:hover { transform: scale(1.1); }
.ms-tg:hover  { background: #229ED9; border-color: #229ED9; color: #fff; }
.ms-vk:hover  { background: #4C75A3; border-color: #4C75A3; color: #fff; }
.ms-copy:hover, .ms-native:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.ms-copy.copied { border-color: #4caf50; color: #4caf50; }

@media (max-width: 900px) {
  .mobile-share-bar { display: flex; }
}

/* ═══════════════════════════════════════════════════════
   PREV / NEXT PAGINATION
   ═══════════════════════════════════════════════════════ */
.post-pagination {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.pagination-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .pagination-grid { grid-template-columns: 1fr; } }

.pag-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s var(--ease);
  overflow: hidden;
  position: relative;
}
.pag-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-glow);
  opacity: 0;
  transition: opacity 0.25s;
}
.pag-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); box-shadow: var(--shadow); }
.pag-card:hover::before { opacity: 1; }

.pag-dir {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  position: relative;
}
.pag-next .pag-dir { justify-content: flex-end; }

.pag-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  opacity: 0.7;
  transition: opacity 0.2s;
  position: relative;
}
.pag-card:hover .pag-thumb { opacity: 1; }

.pag-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pag-next .pag-title { text-align: right; }

/* ═══════════════════════════════════════════════════════
   COPY CODE BUTTON (auto-injected by JS)
   ═══════════════════════════════════════════════════════ */
.prose pre { position: relative; }
.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}
.prose pre:hover .copy-code-btn { opacity: 1; }
.copy-code-btn:hover  { color: var(--accent); border-color: var(--accent); }
.copy-code-btn.copied { color: #4caf50; border-color: #4caf50; }
