/*
Theme Name: DataScience+
Theme URI: https://datascienceplus.com
Description: Fresh, in-house theme for DataScience+ — an Apple-inspired, light/dark, community tutorial site. Built from scratch (replaces the retired m01 theme). No third-party framework or plugin dependencies.
Author: DataSciencePlus
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: dsplus
*/

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg: #FFFFFF;
  --panel: #F5F5F7;
  --panel-2: #FBFBFD;
  --ink: #1D1D1F;
  --ink-soft: #515154;
  --muted: #86868B;
  --hair: #D2D2D7;
  --blue: #0066CC;
  --blue-ink: #0066CC;
  --field: #FFFFFF;
  --seg-track: #E8E8ED;
  --seg-on: #FFFFFF;
  --shadow: 0 1px 3px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --seg-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.06);
  --nav-bg: rgba(255,255,255,.72);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --panel: #1D1D1F; --panel-2: #161617; --ink: #F5F5F7;
    --ink-soft: #C7C7CC; --muted: #86868B; --hair: #38383A; --blue: #2997FF;
    --blue-ink: #2997FF; --field: #1C1C1E; --seg-track: #1D1D1F; --seg-on: #48484A;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 6px 24px rgba(0,0,0,.5);
    --seg-shadow: 0 1px 3px rgba(0,0,0,.5); --nav-bg: rgba(0,0,0,.7);
  }
}
:root[data-theme="light"] {
  --bg:#FFFFFF; --panel:#F5F5F7; --panel-2:#FBFBFD; --ink:#1D1D1F; --ink-soft:#515154;
  --muted:#86868B; --hair:#D2D2D7; --blue:#0066CC; --blue-ink:#0066CC; --field:#FFFFFF;
  --seg-track:#E8E8ED; --seg-on:#FFFFFF; --seg-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 1px rgba(0,0,0,.06);
  --shadow:0 1px 3px rgba(0,0,0,.04),0 6px 20px rgba(0,0,0,.05); --nav-bg:rgba(255,255,255,.72);
}
:root[data-theme="dark"] {
  --bg:#000000; --panel:#1D1D1F; --panel-2:#161617; --ink:#F5F5F7; --ink-soft:#C7C7CC;
  --muted:#86868B; --hair:#38383A; --blue:#2997FF; --blue-ink:#2997FF; --field:#1C1C1E;
  --seg-track:#1D1D1F; --seg-on:#48484A; --seg-shadow:0 1px 3px rgba(0,0,0,.5);
  --shadow:0 1px 3px rgba(0,0,0,.4),0 6px 24px rgba(0,0,0,.5); --nav-bg:rgba(0,0,0,.7);
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 17px; line-height: 1.5; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.site-main { flex: 1 0 auto; }

/* Accessibility */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 12px; top: 12px; z-index: 100; background: var(--bg); color: var(--ink);
  padding: 10px 16px; border: 1px solid var(--hair); border-radius: 10px;
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 20; background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  height: 52px; display: flex; align-items: center; gap: 26px;
}
.brand { font-size: 23px; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); }
.brand b { color: var(--muted); font-weight: 700; }
@media (prefers-color-scheme: dark) { .brand b { color: #B0B0B5; } }
:root[data-theme="light"] .brand b { color: var(--muted); }
:root[data-theme="dark"] .brand b { color: #B0B0B5; }
.nav-left { flex: 1; display: flex; align-items: center; }
.nav .links { display: flex; gap: 26px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.nav .links a { color: var(--ink-soft); font-size: 13.5px; font-weight: 400; }
.nav .links a:hover { color: var(--ink); text-decoration: none; }
.nav .links a.on { color: var(--ink); font-weight: 500; }
.nav-actions { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.navsearch {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  min-width: 168px; background: var(--bg); border: 1px solid var(--hair);
  border-radius: 980px; color: var(--muted); font-family: var(--sans);
  font-size: 13.5px; margin: 0;
}
.navsearch:hover { border-color: var(--muted); }
.navsearch:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent); }
.navsearch .ic { flex: 0 0 auto; color: var(--muted); display: block; }
.navsearch input {
  border: 0; background: transparent; outline: none; padding: 0; margin: 0;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink); width: 100%; min-width: 0;
}
.navsearch input::placeholder { color: var(--muted); }
/* hide the native search "x" clear button for a cleaner look */
.navsearch input::-webkit-search-decoration,
.navsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
.navicon {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hair);
  background: transparent; color: var(--ink-soft); display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; font-size: 19px;
  line-height: 1; padding: 0;
}
.navicon:hover { border-color: var(--muted); color: var(--ink); }
@media (max-width: 560px) {
  .navsearch { min-width: 0; width: 130px; }
}

/* ============================================================
   Hero + stats
   ============================================================ */
.hero { text-align: center; padding: 76px 22px 64px; }
.hero h1 {
  font-size: 52px; line-height: 1.06; font-weight: 600; letter-spacing: -0.025em;
  margin: 0 auto 18px; max-width: 16ch; text-wrap: balance;
}
.hero p { font-size: 20px; color: var(--ink-soft); max-width: 46ch; margin: 0 auto; line-height: 1.45; }
@media (max-width: 540px) { .hero h1 { font-size: 40px; } }

.stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0; max-width: 600px;
  margin: 38px auto 0; border: 1px solid var(--hair); border-radius: 16px;
  overflow: hidden; background: var(--panel);
}
.stat { flex: 1 1 0; min-width: 120px; padding: 18px 16px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--hair); }
.stat .num { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 7px; }

/* ============================================================
   Browse band: segmented control, chips, section label, cards
   ============================================================ */
.browse { flex: 1 0 auto; background: var(--panel); border-top: 1px solid var(--hair); padding: 44px 0 60px; }
#browse { scroll-margin-top: 58px; transition: opacity .15s ease; } /* opacity: brief fade during in-place switch */

.seg-wrap { display: flex; justify-content: center; margin-bottom: 30px; }
.segmented { display: inline-flex; gap: 5px; width: 340px; background: var(--seg-track); border: 1px solid var(--hair); border-radius: 980px; padding: 5px; }
.segmented a {
  flex: 1 1 50%; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink-soft);
  padding: 13px 0; border-radius: 980px; letter-spacing: -0.01em; transition: color .15s ease;
}
.segmented a:hover { text-decoration: none; }
.segmented a.on { background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--seg-shadow); }

.filters { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 0 auto 34px; }
.chip {
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft); background: var(--bg);
  border: 1px solid var(--hair); padding: 8px 16px; border-radius: 980px;
  display: inline-flex; gap: 7px; align-items: center;
}
.chip:hover { border-color: var(--muted); text-decoration: none; }
.chip .c { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip.on .c { color: #d6e6fb; }

.seclabel { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 20px; }
.seclabel h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.seclabel span { font-size: 13px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 30px; }
@media (max-width: 820px) { .grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--bg); border: 1px solid var(--hair); border-radius: 18px;
  padding: 22px 22px 20px; display: flex; flex-direction: column; min-height: 172px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card .kick { font-size: 12px; font-weight: 600; color: var(--blue-ink); margin-bottom: 12px; display: flex; justify-content: space-between; }
.card .kick a { color: var(--blue-ink); }
.card .kick .yr { color: var(--muted); font-weight: 400; }
.card h3 { font-size: 20px; line-height: 1.24; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 auto; color: var(--ink); text-wrap: balance; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--blue-ink); text-decoration: none; }
.card .who { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.card .av {
  width: 24px; height: 24px; border-radius: 50%; background: var(--panel);
  border: 1px solid var(--hair); color: var(--ink-soft); font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.card .name { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }
.card .name a { color: var(--ink-soft); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--hair); background: var(--panel-2); }
.foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 22px 50px; display: flex;
  justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--muted);
}
.foot-inner nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--ink); text-decoration: none; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 10px 0 0; flex-wrap: wrap; }
.pagination .page-numbers {
  font-size: 14px; color: var(--ink-soft); border: 1px solid var(--hair); background: var(--bg);
  border-radius: 980px; padding: 8px 15px; min-width: 40px; text-align: center;
}
.pagination .page-numbers:hover { border-color: var(--muted); text-decoration: none; }
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ============================================================
   Avatars: Gravatar photo layered over initials fallback
   ============================================================ */
.av, .c-av { position: relative; overflow: hidden; }
.av .grav, .c-av .grav {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; display: block;
}

/* ============================================================
   Breadcrumb + centered page/archive header
   ============================================================ */
.breadcrumb {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 22px 0;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:last-child { color: var(--ink-soft); font-weight: 500; }
.breadcrumb a:hover { color: var(--ink); text-decoration: none; }
.breadcrumb .sep { opacity: .5; }

.head { text-align: center; padding: 40px 22px 40px; }
.head h1 { font-size: 44px; line-height: 1.06; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 14px; text-wrap: balance; }
.head p { font-size: 20px; color: var(--ink-soft); max-width: 46ch; margin: 0 auto; line-height: 1.44; }
@media (max-width: 460px) { .head h1 { font-size: 34px; } }

.browse-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.browse-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin: 0; }
.browse-head .count { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.browse-head .grow { flex: 1; }

/* ============================================================
   Author profile header
   ============================================================ */
.prof { text-align: center; padding: 34px 22px 54px; }
.prof .av {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 20px;
  background: var(--panel); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 600; color: var(--ink-soft);
}
.prof h1 { font-size: 40px; line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 14px; }
.prof .bio { font-size: 19px; line-height: 1.45; color: var(--ink-soft); max-width: 52ch; margin: 0 auto 10px; }
.prof .social { display: flex; gap: 18px; justify-content: center; margin-top: 16px; font-size: 13.5px; flex-wrap: wrap; }
.prof .social a { color: var(--blue-ink); }
.prof .stats { max-width: 520px; }
@media (max-width: 540px) { .prof h1 { font-size: 32px; } }

/* ============================================================
   Authors index grid
   ============================================================ */
.agrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .agrid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 680px) { .agrid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 460px) { .agrid { grid-template-columns: 1fr; } }
.acard {
  background: var(--bg); border: 1px solid var(--hair); border-radius: 16px; padding: 20px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 11px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.acard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; text-decoration: none; }
.acard .av {
  width: 56px; height: 56px; border-radius: 50%; background: var(--panel); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600; color: var(--ink-soft);
}
.acard .name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.acard .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ============================================================
   Single article
   ============================================================ */
.shell {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 22px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start;
}
.article { min-width: 0; }
.article .breadcrumb { max-width: none; margin: 0 0 20px; padding: 0; } /* flush-left, unlike the centered archive breadcrumb */
.postmeta { font-size: 13.5px; color: var(--muted); margin: 0px 0 25px; }
.postmeta b { color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }

.bio-more { margin-top: 22px; }
.bio-more a {
  display: block; font-size: 14px; line-height: 1.35; color: var(--ink); font-weight: 500;
  padding: 11px 0; border-bottom: 1px solid var(--hair);
}
.bio-more a:first-of-type { border-top: 1px solid var(--hair); }
.bio-more a:hover { color: var(--blue-ink); text-decoration: none; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.topline .meta { font-size: 13px; color: var(--muted); }
.topline .meta b { color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.article h1 { font-size: 42px; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 20px; text-wrap: balance; }
@media (max-width: 540px) { .article h1 { font-size: 32px; } }

.byline {
  display: flex; align-items: center; gap: 13px; padding: 18px 0;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin-bottom: 8px;
}
.byline .av {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; background: var(--panel); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--ink-soft);
}
.byline .who-name { font-size: 15px; font-weight: 600; }
.byline .who-name a { color: var(--ink); }
.byline .meta { font-size: 13.5px; color: var(--muted); }
.byline .meta b { color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }

/* article body (WordPress the_content output) */
.entry-content { padding: 30px 0 10px; border-top: 1px solid var(--hair); font-size: 18px; line-height: 1.62; }
.entry-content p { margin: 0 0 20px; color: var(--ink); }
/* Lead paragraph: enlarge the first paragraph of the article body */
.entry-content > p:first-of-type { font-size: 21px; line-height: 1.55; color: var(--ink); }
.entry-content h2 { font-size: 27px; font-weight: 600; letter-spacing: -0.018em; line-height: 1.2; margin: 44px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); text-wrap: balance; scroll-margin-top: 68px; }
/* When a ToC is present, number the article's headings 01, 02… to match it. */
.entry-content { counter-reset: dsp-h2; }
.entry-content .toc ~ h2 { counter-increment: dsp-h2; }
.entry-content .toc ~ h2::before {
  content: counter(dsp-h2, decimal-leading-zero);
  font-family: var(--mono); font-size: 1em; font-weight: 400; color: var(--muted);
  margin-right: 14px;
}

/* Table of Contents — squared box, floated right, numbered vertical list, mono font */
.toc {
  float: right; width: 252px; margin: 5px 0 22px 30px;
  border: 1px solid var(--hair); background: transparent; padding: 16px 18px;
  font-family: var(--mono); font-size: 12.5px;
}
.toc-title {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); font-weight: 600; margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--hair);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: flex; flex-direction: column; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; color: var(--ink-soft); line-height: 1.4; }
.toc a::before { content: counter( toc, decimal-leading-zero ); color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.toc a:hover { color: var(--blue-ink); text-decoration: none; }
.entry-content::after { content: ""; display: block; clear: both; } /* contain the float */
@media (max-width: 620px) { .toc { float: none; width: auto; margin: 0 0 24px; } }
.entry-content h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.012em; margin: 32px 0 12px; }
/* Post-content lists: bordered letter/number badge markers (skips the ToC list) */
.entry-content ul:not(.toc-list),
.entry-content ol:not(.toc-list) { margin: 0 0 22px; padding-left: 0; list-style: none; }
.entry-content ul:not(.toc-list) > li,
.entry-content ol:not(.toc-list) > li {
  position: relative; padding-left: 36px; margin-bottom: 12px; line-height: 1.6;
}
/* divider line under each item (table-row style) */
.entry-content ul:not(.toc-list) > li,
.entry-content ol:not(.toc-list) > li { padding: 0 0 0 34px; margin: 0 0 10px; }
/* plain letter/number marker in the gutter — same size as body text */
.entry-content ul:not(.toc-list) > li::before,
.entry-content ol:not(.toc-list) > li::before {
  position: absolute; left: 1px; top: 0;
  font-family: var(--mono); font-size: 1em; font-weight: 400; color: var(--muted);
}
/* unordered → letters a, b, c */
.entry-content ul:not(.toc-list) { counter-reset: dsp-abc; }
.entry-content ul:not(.toc-list) > li { counter-increment: dsp-abc; }
.entry-content ul:not(.toc-list) > li::before { content: counter(dsp-abc, lower-alpha) "."; }
/* ordered → numbers 1, 2, 3 */
.entry-content ol:not(.toc-list) { counter-reset: dsp-li; }
.entry-content ol:not(.toc-list) > li { counter-increment: dsp-li; }
.entry-content ol:not(.toc-list) > li::before { content: counter(dsp-li) "."; font-variant-numeric: tabular-nums; }
/* nested lists keep spacing tidy */
.entry-content li > ul, .entry-content li > ol { margin: 10px 0 0; }
.entry-content a { color: var(--blue-ink); }
/* Content images: centered on their own line, matted frame, click to zoom */
.entry-content img {
  display: block; max-width: 78%; height: auto; margin: 34px auto;
  box-sizing: border-box; padding: 10px; background: var(--panel);
  border: 1px solid var(--hair); border-radius: 12px; cursor: zoom-in;
}
@media (max-width: 600px) { .entry-content img { max-width: 100%; } }
.entry-content figure img { margin: 0 auto; }
.entry-content a img { cursor: zoom-in; }

/* Full-screen image lightbox */
.dsp-lightbox {
  position: fixed; inset: 0; z-index: 1000; padding: 24px;
  background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.dsp-lightbox.open { opacity: 1; visibility: visible; }
.dsp-lightbox img {
  max-width: 94vw; max-height: 94vh; width: auto; height: auto;
  margin: 0; padding: 0; background: transparent; border: 0; border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0,0,0,.5); cursor: zoom-out;
}
.dsp-lightbox .dsp-lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.dsp-lightbox .dsp-lightbox-close:hover { background: rgba(255,255,255,.22); }
@media (prefers-reduced-motion: reduce) { .dsp-lightbox { transition: none; } }
.entry-content blockquote {
  position: relative; margin: 34px 0; padding: 24px 28px 24px 30px;
  background: var(--panel); border: 1px solid var(--hair);
  border-radius: 14px; font-size: 20px; line-height: 1.5; font-weight: 500;
  letter-spacing: -0.012em; color: var(--ink); overflow: hidden;
}
/* oversized decorative quote mark in the corner */
.entry-content blockquote::before {
  content: "\201C"; position: absolute; right: 16px; top: 6px;
  font-size: 72px; line-height: 1; font-weight: 700; color: var(--blue);
  opacity: .12; pointer-events: none;
}
.entry-content blockquote > :first-child { margin-top: 0; }
.entry-content blockquote p { margin: 0 0 12px; font-size: inherit; line-height: inherit; color: inherit; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite,
.entry-content blockquote footer {
  display: block; margin-top: 14px; font-size: 14px; font-weight: 400; font-style: normal;
  letter-spacing: 0; color: var(--muted);
}
.entry-content blockquote cite::before,
.entry-content blockquote footer::before { content: "— "; }
.entry-content pre {
  margin: 26px 0; background: var(--code-bg, var(--panel)); border: 1px solid var(--hair);
  border-radius: 12px; padding: 18px; overflow-x: auto;
}
.entry-content pre code { font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--code-ink, var(--ink)); white-space: pre; }
.entry-content p code, .entry-content li code {
  font-family: var(--mono); font-size: 15px; background: var(--code-bg, var(--panel)); padding: 2px 6px; border-radius: 5px;
}
.entry-content figure { margin: 26px 0; }
.entry-content figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; text-align: center; }
:root { --code-bg: #F5F5F7; --code-ink: #1D1D1F; }
@media (prefers-color-scheme: dark) { :root { --code-bg: #1C1C1E; --code-ink: #E9EBEF; } }
:root[data-theme="light"] { --code-bg: #F5F5F7; --code-ink: #1D1D1F; }
:root[data-theme="dark"] { --code-bg: #1C1C1E; --code-ink: #E9EBEF; }

/* tags + author card */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 36px 0 40px; }
.tags a { font-size: 13px; color: var(--ink-soft); background: var(--panel); border: 1px solid var(--hair); padding: 6px 13px; border-radius: 980px; }
.tags a:hover { border-color: var(--muted); text-decoration: none; }

.authorcard {
  display: flex; gap: 16px; align-items: flex-start; background: var(--panel);
  border: 1px solid var(--hair); border-radius: 18px; padding: 22px; margin-bottom: 50px;
}
.authorcard .av {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; background: var(--bg); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600; color: var(--ink-soft);
}
.authorcard .name { font-size: 17px; font-weight: 600; margin-bottom: 3px; }
.authorcard .name a { color: var(--ink); }
.authorcard .bio { font-size: 15px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 8px; }
.authorcard .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* right rail author bio */
.rail { position: sticky; top: 74px; }
.rail h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.biocard { border: 1px solid var(--hair); border-radius: 16px; padding: 20px; background: var(--panel); }
.biocard .bio-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.biocard .av {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; background: var(--bg); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; color: var(--ink-soft);
}
.biocard .wb { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.biocard .name { font-size: 16px; font-weight: 600; }
.biocard .bio { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 14px; }
.biocard .count { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
.biocard .btn { display: block; text-align: center; font-size: 13.5px; font-weight: 500; padding: 9px 0; border-radius: 980px; border: 1px solid var(--hair); color: var(--ink); }
.biocard .btn:hover { border-color: var(--muted); text-decoration: none; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; gap: 0; max-width: 700px; }
  .rail { position: static; margin: 10px 0 40px; }
}

/* related */
.related { background: var(--panel); border-top: 1px solid var(--hair); }
.related-inner { max-width: var(--maxw); margin: 0 auto; padding: 46px 22px 60px; }
.related h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin: 0 0 20px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .rel-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Comments
   ============================================================ */
.comments { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--hair); }
.comments-title { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 24px; }
.commentlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.commentlist .children { list-style: none; margin: 20px 0 0 0; padding-left: 20px; border-left: 2px solid var(--hair); display: flex; flex-direction: column; gap: 20px; }
.comment .comment-inner { display: flex; gap: 13px; }
.c-av {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; background: var(--panel); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.c-av.av-author { background: var(--blue); border-color: var(--blue); color: #fff; }
.c-body { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.c-name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.c-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--blue); padding: 2px 7px; border-radius: 980px; margin-left: 6px; }
.c-date { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.c-body p { margin: 0 0 8px; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.c-reply a { background: transparent; border: 0; color: var(--blue-ink); font-size: 13px; font-weight: 500; padding: 0; }

.respond { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--hair); }
/* no comments yet: the section already has a top border, so drop the form's */
.comments--empty .respond { margin-top: 0; padding-top: 0; border-top: 0; }
.respond .comment-reply-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 16px; }
.respond form { display: flex; flex-direction: column; gap: 14px; }
.respond .comment-form-author, .respond .comment-form-email { flex: 1; }
.respond .comment-form-author, .respond .comment-form-email, .respond .comment-form-url { display: inline-block; width: 48%; }
.respond label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.respond input[type="text"], .respond input[type="email"], .respond input[type="url"], .respond textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--hair); border-radius: 10px;
  padding: 11px 13px; font-family: var(--sans); font-size: 15px; color: var(--ink); outline: none;
}
.respond textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.respond input:focus, .respond textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.respond .form-submit .submit {
  background: var(--blue); color: #fff; border: 0; border-radius: 980px; padding: 11px 24px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.respond .form-submit .submit:hover { opacity: .92; }

/* ============================================================
   Static page (single column)
   ============================================================ */
.page-wrap { max-width: 760px; margin: 0 auto; padding: 20px 22px 60px; }
.page-wrap h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 24px 0 24px; text-wrap: balance; }

/* ============================================================
   404
   ============================================================ */
.notfound { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 80px 22px; }
.notfound .box { max-width: 520px; }
.notfound .code { font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em; color: var(--blue-ink); font-weight: 600; margin-bottom: 18px; }
.notfound h1 { font-size: 44px; line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 16px; text-wrap: balance; }
.notfound p { font-size: 19px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 28px; }
.btn {
  display: inline-block; font-size: 14.5px; font-weight: 500; padding: 11px 22px; border-radius: 980px;
  border: 1px solid var(--hair); color: var(--ink); background: var(--bg);
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { opacity: .92; }

/* search bar in header */
.searchbar {
  display: flex; max-width: 420px; margin: 0 auto; background: var(--panel); border: 1px solid var(--hair);
  border-radius: 10px; padding: 11px 15px; font-size: 14px; color: var(--muted); align-items: center; gap: 9px;
}
.searchbar input { border: 0; background: transparent; outline: none; font-family: var(--sans); font-size: 14px; color: var(--ink); width: 100%; }
.searchbar button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; }
