/* ═══════════════════════════════════════════
   BLOG — Design tokens (radius + shadow system)
   ═══════════════════════════════════════════ */
:root {
  /* Border-radius scale: 3 tiers */
  --blog-r-sm: 6px;   /* pills, tags */
  --blog-r-md: 10px;  /* buttons, search, side blocks */
  --blog-r-lg: 14px;  /* cards, cover images */

  /* Shadow scale: 3 tiers */
  --blog-shadow-sm: 0 2px 8px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --blog-shadow-md: 0 18px 40px -12px rgba(124,58,237,.18), 0 6px 14px rgba(0,0,0,.06);
  --blog-shadow-lg: 0 28px 60px -15px rgba(17,17,17,.25), 0 10px 24px rgba(0,0,0,.10);
}

/* ═══════════════════════════════════════════
   BLOG — Skip-to-content link (a11y)
   ═══════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--ink, #111);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════
   BLOG — Focus states (WCAG keyboard nav)
   ═══════════════════════════════════════════ */
.bi-tag-pill:focus-visible,
.bi-pill:focus-visible,
.bs-pill:focus-visible,
.bi-read-link:focus-visible,
.bi-empty-reset:focus-visible,
.bs-back-link:focus-visible,
.bs-course-row:focus-visible,
.bs-related-row:focus-visible,
.bs-share-btn:focus-visible,
.bi-search-clear:focus-visible,
.bmg-page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--blog-r-sm);
}
.bi-card-title a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--blog-r-sm);
}
.bi-search-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.bi-search-input:focus-visible { outline: none; }

/* ═══════════════════════════════════════════
   BLOG — Pagination
   ═══════════════════════════════════════════ */
.bmg-pager {
  display: flex;
  justify-content: center;
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--mid, #e5e7eb);
}
.bmg-pager-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.bmg-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 .7rem;
  border: 1px solid var(--mid, #e5e7eb);
  border-radius: var(--blog-r-md);
  font-size: .84rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: var(--ink, #111);
  text-decoration: none;
  background: #fff;
  transition: background .2s ease, border-color .2s ease,
              color .2s ease, transform .2s ease, box-shadow .2s ease;
  line-height: 1;
  user-select: none;
  cursor: pointer;
}
.bmg-page-btn:hover {
  background: var(--ink, #111);
  border-color: var(--ink, #111);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.bmg-page-btn.active {
  background: var(--accent, #7c3aed);
  border-color: var(--accent, #7c3aed);
  color: #fff;
  font-weight: 700;
  pointer-events: none;
}
.bmg-page-btn.disabled {
  opacity: .4;
  pointer-events: none;
  cursor: default;
}
.bmg-page-btn.dots {
  border: none;
  cursor: default;
  pointer-events: none;
  background: transparent;
}

/* ═══════════════════════════════════════════
   BLOG INDEX
   ═══════════════════════════════════════════ */

/* Hero */
.bi-hero {
  background: linear-gradient(180deg, #fafafe 0%, #ffffff 100%);
  border-bottom: 1px solid var(--mid);
  padding: 9.5rem 3rem 4.5rem;
}
.bi-hero-title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bi-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Breadcrumb */
.bi-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  color: #666;
  margin-bottom: 1.25rem;
}
.bi-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.bi-breadcrumb a:hover { text-decoration: underline; }
.bi-bc-sep { opacity: .4; }

/* Badge label */
.bi-hero-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}
.bi-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
  display: block;
}

/* Title */
.bi-hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.6rem, 5.2vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0 0 1.15rem;
}

/* Subtitle */
.bi-hero-sub {
  font-size: 1.05rem;
  color: #6b7280;
  font-weight: 400;
  line-height: 1.65;
  max-width: 520px;
  letter-spacing: -.005em;
}

/* Main section */
.bi-section {
  background: var(--paper);
  padding: 4rem 3rem 7rem;
}
.bi-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Search */
.bi-search-form { margin-bottom: 2rem; }
.bi-search-wrap {
  display: flex;
  align-items: center;
  max-width: 560px;
  border: 1.5px solid var(--mid);
  background: #fff;
  border-radius: var(--blog-r-md);
  transition: border-color .2s ease, box-shadow .25s ease;
  overflow: hidden;
}
.bi-search-wrap:hover { border-color: #c8c8d4; }
.bi-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}
.bi-search-icon {
  margin-left: 1rem;
  color: #bbb;
  flex-shrink: 0;
}
.bi-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: .78rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .9rem;
  color: var(--ink);
  outline: none;
}
.bi-search-input::placeholder { color: #bbb; }
.bi-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #aaa;
  text-decoration: none;
  flex-shrink: 0;
  transition: color .2s;
}
.bi-search-clear:hover { color: var(--ink); }
.bi-search-btn {
  background: var(--ink);
  border: none;
  border-radius: 0 var(--blog-r-md) var(--blog-r-md) 0;
  color: #fff;
  padding: .85rem 1.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .25s ease, letter-spacing .25s ease;
  white-space: nowrap;
}
.bi-search-btn:hover { background: var(--accent); letter-spacing: .08em; }
.bi-search-btn:active { transform: translateY(1px); }

/* Tag pills */
.bi-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 2.5rem;
}
.bi-tag-pill {
  padding: .38rem 1rem;
  border: 1px solid var(--mid);
  border-radius: var(--blog-r-sm);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #555;
  text-decoration: none;
  transition: all .18s;
}
.bi-tag-pill:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.bi-tag-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Filter notice */
.bi-filter-notice {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: #555;
  margin-bottom: 2rem;
  padding: .7rem 1rem;
  background: var(--soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--blog-r-sm) var(--blog-r-sm) 0;
}

/* Grid */
.bi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1.6rem;
  margin-bottom: 1rem;
}

/* Card */
.bi-card {
  background: #fff;
  display: flex;
  flex-direction: column;
  border-radius: var(--blog-r-lg);
  border: 1px solid #ececf0;
  box-shadow: var(--blog-shadow-sm);
  transition: box-shadow .35s cubic-bezier(.16,.84,.44,1),
              transform .35s cubic-bezier(.16,.84,.44,1),
              border-color .25s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.bi-card:hover {
  border-color: #d8d4ea;
  box-shadow: var(--blog-shadow-md);
  transform: translateY(-6px);
}

/* Card image — uses aspect-ratio to prevent CLS */
.bi-card-img-wrap {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: var(--soft);
  flex-shrink: 0;
  border-radius: var(--blog-r-lg) var(--blog-r-lg) 0 0;
}
.bi-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.16,.84,.44,1), filter .35s ease;
  display: block;
  filter: saturate(.95);
  opacity: 0;
  animation: imgFadeIn .4s ease forwards;
}
@keyframes imgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.bi-card:hover .bi-card-img-wrap img { transform: scale(1.06); filter: saturate(1.05); }
.bi-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.08) 0%, transparent 50%);
  pointer-events: none;
}
.bi-card-img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}

/* Card body */
.bi-card-body {
  padding: 1.65rem 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Card top row */
.bi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: .5rem;
}
.bi-card-tags {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}
.bi-pill {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .28rem .7rem;
  background: var(--soft);
  color: var(--accent);
  text-decoration: none;
  transition: background .18s, color .18s, transform .18s;
  border-radius: var(--blog-r-sm);
  will-change: transform;
}
.bi-pill:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.bi-card-date {
  font-size: .76rem;
  color: #8a8a94;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Card title */
.bi-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  margin: 0 0 .7rem;
}
.bi-card-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color .2s;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 2px;
  transition: background-size .35s cubic-bezier(.16,.84,.44,1), color .2s;
}
.bi-card-title a:hover {
  color: var(--accent);
  background-size: 100% 2px;
}
.bi-card:hover .bi-card-title a {
  background-size: 100% 2px;
  color: var(--accent);
}

/* Card excerpt */
.bi-card-excerpt {
  font-size: .9rem;
  color: #5a6271;
  line-height: 1.62;
  font-weight: 400;
  flex: 1;
  margin-bottom: 1.4rem;
  letter-spacing: -.003em;
  min-height: 3.24em;
}

/* Card footer */
.bi-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.15rem;
  margin-top: auto;
  border-top: 1px solid #f0f0f0;
}
.bi-read-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: gap .25s cubic-bezier(.16,.84,.44,1), color .2s;
}
.bi-read-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1.5px;
  background: var(--grad);
  transition: right .35s cubic-bezier(.16,.84,.44,1);
}
.bi-read-link:hover::after { right: 0; }
.bi-read-link svg { transition: transform .25s cubic-bezier(.16,.84,.44,1); }
.bi-read-link:hover { gap: .6rem; }
.bi-read-link:hover svg { transform: translateX(3px); }
.bi-views {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  color: #8a8a94;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Empty state */
.bi-empty {
  padding: 5rem 2rem;
  text-align: center;
  border: 1px dashed var(--mid);
  border-radius: var(--blog-r-md);
  margin-bottom: 2rem;
}
.bi-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  margin: 0 auto 1.25rem;
}
.bi-empty-text {
  font-size: .95rem;
  color: #666;
  margin-bottom: 1rem;
}
.bi-empty-reset {
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: .5rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: var(--blog-r-md);
  transition: background .2s, color .2s;
}
.bi-empty-reset:hover {
  background: var(--accent);
  color: #fff;
}

/* Responsive — index */
@media (max-width: 1024px) {
  .bi-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1.25rem; }
}
@media (max-width: 640px) {
  .bi-hero { padding: 7.5rem 1.5rem 3rem; }
  .bi-section { padding: 2.75rem 1.5rem 4rem; }
  .bi-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .bi-search-btn { padding: .85rem 1.1rem; font-size: .8rem; }
  .bi-card-body { padding: 1.4rem 1.35rem 1.3rem; }
  .bi-tags-row { gap: .35rem; margin-bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bi-card-img-wrap img,
  .bi-card,
  .bi-read-link { transition: none; }
}

/* ═══════════════════════════════════════════
   BLOG SHOW
   ═══════════════════════════════════════════ */

/* Hero */
.bs-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--mid);
  padding: 9.5rem 3rem 4rem;
}
.bs-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Breadcrumb */
.bs-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  color: #666;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.bs-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.bs-breadcrumb a:hover { text-decoration: underline; }
.bs-bc-sep { opacity: .4; }

/* Hero tags */
.bs-hero-tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}

/* Shared pill */
.bs-pill {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  background: var(--soft);
  color: var(--accent);
  text-decoration: none;
  transition: background .18s, color .18s, transform .18s;
  border-radius: var(--blog-r-sm);
  will-change: transform;
}
.bs-pill:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px) scale(1.02);
}

/* Hero title */
.bs-hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.95rem, 4.4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.14;
  color: var(--ink);
  margin: 0 0 1.4rem;
  max-width: 780px;
}

/* Meta row */
.bs-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  font-size: .86rem;
  color: #555;
  font-weight: 500;
}
.bs-hero-meta span {
  display: flex;
  align-items: center;
  gap: .42rem;
  font-variant-numeric: tabular-nums;
}
.bs-hero-meta svg { color: var(--accent); opacity: .8; }

/* Post section */
.bs-section {
  background: var(--paper);
  padding: 4.5rem 3rem 7rem;
}
.bs-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Layout */
.bs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .bs-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.75rem;
  }
}
@media (max-width: 960px) {
  .bs-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .bs-sidebar {
    order: 2;
    position: static;
  }
}

/* Article — narrower reading column for optimal line length */
.bs-article {
  min-width: 0;
  max-width: 720px;
}
@media (max-width: 960px) { .bs-article { max-width: 100%; } }

/* Cover — aspect-ratio for stable layout */
.bs-cover {
  margin-bottom: 3rem;
  overflow: hidden;
  border-radius: var(--blog-r-lg);
  aspect-ratio: 16 / 9;
  background: var(--soft);
}
.bs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: imgFadeIn .4s ease forwards;
}

/* Prose */
.bs-prose {
  font-size: 1.135rem;
  line-height: 1.9;
  color: #2f2f3a;
  font-weight: 400;
  margin-bottom: 2.5rem;
  letter-spacing: -.003em;
  max-width: 70ch;
}
.bs-prose h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.75rem 0 1rem;
}
.bs-prose h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 1.3;
  color: var(--ink);
  margin: 2.25rem 0 .8rem;
}
.bs-prose h4 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.012em;
  line-height: 1.35;
  color: var(--ink);
  margin: 1.75rem 0 .65rem;
}
.bs-prose p { margin-bottom: 1.35rem; }
.bs-prose ul,
.bs-prose ol { margin: 1rem 0 1.5rem 1.75rem; }
.bs-prose li { margin-bottom: .5rem; }
.bs-prose strong,
.bs-prose b { color: var(--ink); font-weight: 700; }
.bs-prose em,
.bs-prose i { font-style: italic; }
.bs-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bs-prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  background: var(--soft);
  color: #555;
  font-style: italic;
}
.bs-prose code {
  font-size: .87em;
  background: #f4f0ff;
  color: var(--accent);
  padding: .1em .4em;
  border-radius: var(--blog-r-sm);
}
.bs-prose pre {
  background: #1a1a2e;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.7;
  margin: 1.5rem 0;
  border-radius: var(--blog-r-md);
}
.bs-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.bs-prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: var(--blog-r-md);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.bs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.bs-prose th,
.bs-prose td {
  border: 1px solid var(--mid);
  padding: .6rem .9rem;
  text-align: left;
}
.bs-prose th {
  background: var(--soft);
  font-weight: 700;
  color: var(--ink);
}

/* Related courses */
.bs-courses-box {
  margin-bottom: 2.5rem;
  padding: 1.75rem;
  border: 1px solid var(--mid);
  background: var(--soft);
  border-radius: var(--blog-r-md);
}
.bs-courses-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.bs-courses-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.bs-course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid var(--mid);
  border-radius: var(--blog-r-sm);
  text-decoration: none;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  transition: background .18s, color .18s, border-color .18s;
}
.bs-course-row:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.bs-course-name { flex: 1; padding-right: 1rem; }

/* Post end */
.bs-post-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--mid);
}
.bs-end-tags {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.bs-end-label {
  font-size: .75rem;
  color: #666;
  font-weight: 500;
}

/* Share */
.bs-share {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.bs-share-label {
  font-size: .75rem;
  color: #666;
  margin-right: .1rem;
}
.bs-share-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mid);
  border-radius: var(--blog-r-md);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease,
              color .2s ease, transform .25s cubic-bezier(.16,.84,.44,1),
              box-shadow .2s ease;
  flex-shrink: 0;
}
.bs-share-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.bs-share-btn:active { transform: translateY(0); }

/* Individual brand-colored hovers */
.bs-share-btn[title="Telegram"]:hover {
  background: #29b6f6;
  border-color: #29b6f6;
  box-shadow: 0 6px 14px rgba(41,182,246,.32);
}
.bs-share-btn[title="LinkedIn"]:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  box-shadow: 0 6px 14px rgba(10,102,194,.32);
}
.bs-share-btn[title="X (Twitter)"]:hover {
  background: #000;
  border-color: #000;
  box-shadow: 0 6px 14px rgba(0,0,0,.32);
}
.bs-share-btn[title="Copy link"]:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 6px 14px rgba(124,58,237,.32);
}

/* Sidebar */
.bs-sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--mid) transparent;
}
.bs-sidebar::-webkit-scrollbar { width: 6px; }
.bs-sidebar::-webkit-scrollbar-thumb {
  background: var(--mid);
  border-radius: 4px;
}
.bs-sidebar::-webkit-scrollbar-thumb:hover { background: #c4c4d0; }
.bs-back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #5a23c8;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: gap .2s, color .2s;
}
.bs-back-link:hover { color: var(--accent); }
.bs-back-link:hover { gap: .6rem; }

.bs-side-block {
  border: 1px solid var(--mid);
  border-radius: var(--blog-r-md);
  padding: 1.65rem 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  background: #fff;
  box-shadow: var(--blog-shadow-sm);
}
.bs-side-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.35rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--soft);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.bs-side-title::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.bs-related-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.bs-related-row {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  text-decoration: none;
  padding: .5rem;
  margin: -.5rem;
  border-radius: var(--blog-r-sm);
  transition: background .22s ease, transform .25s cubic-bezier(.16,.84,.44,1);
}
.bs-related-row:hover {
  background: var(--soft);
  transform: translateX(2px);
}
.bs-related-row:hover .bs-related-name { color: var(--accent); }
.bs-related-name { transition: color .2s ease; }
.bs-related-thumb {
  width: 62px;
  height: 52px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--soft);
  border-radius: var(--blog-r-sm);
}
.bs-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bs-related-ph { width: 100%; height: 100%; background: var(--soft); }
.bs-related-text { flex: 1; min-width: 0; }
.bs-related-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.42;
  margin: 0 0 .25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -.005em;
}
.bs-related-date { font-size: .74rem; color: #8a8a94; font-weight: 500; font-variant-numeric: tabular-nums; }

.bs-side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* Responsive — show */
@media (max-width: 768px) {
  .bs-hero { padding: 7rem 1.5rem 2.5rem; }
  .bs-section { padding: 2.5rem 1.5rem 4rem; }
  .bs-hero-meta { gap: 1rem; font-size: .75rem; }
  .bs-prose { font-size: .97rem; }
  .bs-post-end { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .bs-share-btn,
  .bs-back-link,
  .bs-related-row { transition: none; }
}
