/* ══ SINGLE BLOG POST ════════════════════════════════ */
.sng-page {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* Back link */
.sng-back-wrap {
  padding: 90px 0 20px;
}
.sng-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono,'Space Mono',monospace);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color:rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .2s;
}
.sng-back:hover { color: #fff; text-decoration: none; }

/* ── Main 2-col layout ────────────────────────────── */
.sng-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ── Article (left col) ───────────────────────────── */
.sng-article { min-width: 0; }

/* Meta row */
.sng-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sng-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-family: var(--mono,'Space Mono',monospace);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
/* reuse blog tag colours */
.sng-tag-pill.tag-dev { background: rgba(30,30,30,.9); color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.12); }
.sng-tag-pill.tag-design { background: rgba(37,99,235,.85); color: #fff; border: 1px solid rgba(59,130,246,.3); }
.sng-tag-pill.tag-animation { background: rgba(234,88,12,.85); color: #fff; border: 1px solid rgba(249,115,22,.3); }
.sng-meta-sep { width: 1px; height: 12px; background: rgba(255,255,255,.12); }
.sng-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono,'Space Mono',monospace);
  font-size: 10px;
  color:rgba(255,255,255,.5);
}
.sng-meta-item svg { color:rgba(255,255,255,.45); }
.sng-meta-dot { color:rgba(255,255,255,.45); font-size: 12px; }

/* Title */
.sng-title {
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 10px;
}
.sng-title-line {
  width: 48px;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px;
  margin-bottom: 18px;
}

/* Excerpt */
.sng-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.5);
  margin-bottom: 24px;
}

/* Featured image */
.sng-feat-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #0d1117;
}
.sng-feat-img img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Article content */
.sng-content h1,.sng-content h2,.sng-content h3,.sng-content h4 {
  color: #fff;
  font-weight: 700;
  margin: 2rem 0 .75rem;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.sng-content h2 { font-size: 1.4rem; }
.sng-content h3 { font-size: 1.15rem; }
.sng-content p { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.65); margin-bottom: 1.1rem; }
.sng-content a { color: #60a5fa; text-decoration: underline; text-decoration-color: rgba(96,165,250,.3); }
.sng-content strong { color: #fff; font-weight: 700; }
.sng-content em { font-style: italic; }
.sng-content ul,.sng-content ol { margin: 0 0 1.1rem 1.5rem; color: rgba(255,255,255,.6); font-size: 15px; line-height: 1.75; }
.sng-content blockquote {
  border-left: 3px solid #3b82f6;
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  color: rgba(255,255,255,.5);
  font-style: italic;
  background: rgba(59,130,246,.05);
  border-radius: 0 8px 8px 0;
}
.sng-content code {
  font-family: 'Space Mono',monospace;
  font-size: .82em;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  padding: .15em .4em;
  border-radius: 4px;
  color: #93c5fd;
}
.sng-content pre {
  background: rgba(17,21,32,.9);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 1.5rem 0;
  overflow-x: auto;
}
.sng-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .85rem;
  color: rgba(200,220,255,.7);
  line-height: 1.7;
}
.sng-content img { border-radius: 10px; margin: 1.5rem 0; width: 100%; }
.sng-content hr { border: none; border-top: 1px solid rgba(255,255,255,.07); margin: 2rem 0; }

/* ── Sidebar (right col) ──────────────────────────── */
.sng-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
}

/* Author card */
.sng-author-card {
  background: rgba(17,21,32,.8);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  isolation: isolate;
  padding: 22px;
}
.sng-author-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.sng-author-av {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sng-author-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.sng-author-role {
  font-size: 12px;
  color: #60a5fa;
  font-family: var(--mono,'Space Mono',monospace);
  letter-spacing: .04em;
  margin-top: 2px;
}
.sng-author-bio {
  font-size: 13px;
  line-height: 1.65;
  color:rgba(255,255,255,.55);
  margin-bottom: 16px;
}
.sng-follow-btn {
  display: block;
  text-align: center;
  background: #fff;
  color: #000;
  padding: 10px 16px;
  border-radius: 9999px;
  font-family: var(--mono,'Space Mono',monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  transition: background .2s;
}
.sng-follow-btn:hover { background: #e5e7eb; text-decoration: none; color: #000; }

/* Share card */
.sng-share-card {
  background: rgba(17,21,32,.8);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  isolation: isolate;
  padding: 18px 22px;
}
.sng-share-lbl {
  font-family: var(--mono,'Space Mono',monospace);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:rgba(255,255,255,.45);
  margin-bottom: 14px;
}
.sng-share-btns {
  display: flex;
  gap: 10px;
}
.sng-share-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
}
.sng-share-btn:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
  text-decoration: none;
}

/* ── Keep Reading ─────────────────────────────────── */
.sng-more {
  margin: 72px 0 0;
  padding-bottom: 20px;
}
.sng-more-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: 28px;
}
.sng-more-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}
.sng-more-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}
.sng-rc {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(17,21,32,.6);
  border: 1px solid rgba(255,255,255,.07);
  transition: border-color .2s;
}
.sng-rc:hover {
  border-color:rgba(255,255,255,.45);
  text-decoration: none;
}
.sng-rc-img { position: relative; overflow: hidden; }
.sng-rc-img img,.sng-rc-ph {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.sng-rc:hover .sng-rc-img img,.sng-rc:hover .sng-rc-ph { transform: scale(1.04); }
.sng-rc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.sng-rc-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--mono,'Space Mono',monospace);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  width: fit-content;
}
.sng-rc-tag.tag-dev { background: rgba(30,30,30,.85); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.1); }
.sng-rc-tag.tag-design { background: rgba(37,99,235,.8); color: #fff; }
.sng-rc-tag.tag-animation { background: rgba(234,88,12,.8); color: #fff; }
.sng-rc-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  letter-spacing: -.01em;
  transition: color .2s;
}
.sng-rc:hover .sng-rc-title { color: #60a5fa; }
.sng-rc-exc {
  font-size: 12px;
  color:rgba(255,255,255,.5);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .sng-page { padding: 0 20px; }
  .sng-back-wrap { padding: 88px 0 16px; }
  .sng-layout { grid-template-columns: 1fr; }
  .sng-sidebar { position: static; }

  /* Keep Reading — horizontal swipe carousel on mobile */
  .sng-more-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 20px 16px;
    margin: 0 -20px;
    scroll-padding-left: 20px;
  }
  .sng-more-grid::-webkit-scrollbar { display: none; }
  .sng-more-grid > .sng-rc {
    flex: 0 0 80%;
    max-width: 80%;
    scroll-snap-align: start;
  }
  .sng-more-grid > .sng-rc.pa-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
@media (min-width: 769px) and (max-width: 900px) {
  .sng-layout { grid-template-columns: 1fr 260px; gap: 32px; }
  .sng-more-grid { grid-template-columns: repeat(2,1fr); }
}

/* ── SINGLE BLOG — Light theme ───────────────────── */
body.pa-light .sng-back { color:rgba(0,0,0,.6); }
body.pa-light .sng-back:hover { color: #111827; }
body.pa-light .sng-tag-pill.tag-dev { background: rgba(0,0,0,.07); color: rgba(0,0,0,.65); border-color:rgba(0,0,0,.5); }
body.pa-light .sng-meta-item { color:rgba(0,0,0,.6); }
body.pa-light .sng-meta-item svg { color:rgba(0,0,0,.45); }
body.pa-light .sng-meta-dot { color:rgba(0,0,0,.5); }
body.pa-light .sng-title { color: #111827; }
body.pa-light .sng-title-line { background: #2563eb; }
body.pa-light .sng-excerpt { color: rgba(0,0,0,.5); }
body.pa-light .sng-feat-img { border-color:rgba(0,0,0,.5); }
body.pa-light .sng-content h1,
body.pa-light .sng-content h2,
body.pa-light .sng-content h3,
body.pa-light .sng-content h4 { color: #111827; }
body.pa-light .sng-content p   { color: rgba(0,0,0,.65); }
body.pa-light .sng-content strong { color: #111827; }
body.pa-light .sng-content a   { color: #2563eb; }
body.pa-light .sng-content code {
  background: rgba(0,0,0,.06);
  border-color:rgba(0,0,0,.5);
  color: #1d4ed8;
}
body.pa-light .sng-content blockquote {
  border-left-color: #2563eb;
  background: rgba(37,99,235,.04);
  color: rgba(0,0,0,.5);
}
body.pa-light .sng-content hr { border-top-color:rgba(0,0,0,.5); }
body.pa-light .sng-author-card,
body.pa-light .sng-share-card {
  background: #ffffff;
  border-color:rgba(0,0,0,.5);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
body.pa-light .sng-author-name { color: #111827; }
body.pa-light .sng-author-bio  { color: rgba(0,0,0,.45); }
body.pa-light .sng-follow-btn  { background: #111827; color: #fff; }
body.pa-light .sng-follow-btn:hover { background: #1f2937; color: #fff; }
body.pa-light .sng-share-lbl  { color:rgba(0,0,0,.5); }
body.pa-light .sng-share-btn  { background: rgba(0,0,0,.05); border-color:rgba(0,0,0,.5); color: rgba(0,0,0,.45); }
body.pa-light .sng-share-btn:hover { background: rgba(0,0,0,.1); color: #111827; }
body.pa-light .sng-more-hd  { color: #111827; }
body.pa-light .sng-more-dot { background: #2563eb; }
body.pa-light .sng-rc {
  background: #ffffff;
  border-color:rgba(0,0,0,.5);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
body.pa-light .sng-rc:hover { border-color:rgba(0,0,0,.5); }
body.pa-light .sng-rc-title { color: #111827; }
body.pa-light .sng-rc:hover .sng-rc-title { color: #2563eb; }
body.pa-light .sng-rc-exc  { color: rgba(0,0,0,.45); }
body.pa-light .sng-rc-tag.tag-dev { background: rgba(0,0,0,.07); color: rgba(0,0,0,.6); }
