
    /* ── Post Hero ────────────────────────── */
    .post-hero {
      padding: 60px 0 0;
      background: var(--white);
      border-bottom: 1px solid var(--border);
    }

    .post-hero-inner {
      max-width: 860px;
      margin: 0 auto;
      padding: 0 2rem;
      text-align: center;
    }

    .post-category-badge {
      display: inline-flex;
      align-items: center;
      padding: 0.35rem 0.85rem;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 0.75rem;
      font-weight: 900;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      margin-bottom: 1.1rem;
      text-decoration: none;
      transition: var(--transition);
    }

    .post-category-badge:hover {
      background: var(--accent);
      color: var(--white);
    }

    .post-hero h1 {
      font-size: clamp(1.9rem, 4vw, 3.2rem);
      font-weight: 800;
      color: var(--text-heading);
      line-height: 1.18;
      letter-spacing: -0.03em;
      margin-bottom: 1rem;
    }

    .post-excerpt {
      font-size: 1.12rem;
      color: var(--text-soft);
      line-height: 1.65;
      max-width: 680px;
      margin: 0 auto 1.6rem;
    }

    .post-meta-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1.2rem;
      flex-wrap: wrap;
      color: var(--text-soft);
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 2rem;
    }

    .post-meta-author {
      display: flex;
      align-items: center;
      gap: 0.55rem;
    }

    .post-meta-author img {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 2px solid var(--border);
      object-fit: cover;
    }

    .post-meta-author strong {
      color: var(--text-heading);
      font-weight: 700;
    }

    .post-meta-sep {
      color: var(--border);
      font-size: 1rem;
    }

    .post-featured-image {
      margin: 0 auto;
      max-width: 920px;
      padding: 0 2rem;
    }

    .post-featured-image img {
      width: 100%;
      height: auto;
      max-height: 480px;
      object-fit: cover;
      border-radius: 18px 18px 0 0;
      display: block;
    }

    .post-featured-placeholder {
      width: 100%;
      height: 360px;
      border-radius: 18px 18px 0 0;
      background:
        radial-gradient(circle at top right, rgba(37,99,235,.16), transparent 34%),
        linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #93c5fd;
      font-size: 3rem;
    }

    /* ── Layout: sidebar + content ───────── */
    .post-layout {
      padding: 52px 0 80px;
      background: var(--white);
    }

    .post-layout-inner {
      display: grid;
      grid-template-columns: 240px minmax(0,1fr);
      gap: 3rem;
      align-items: start;
    }

    /* ── TOC Sidebar ─────────────────────── */
    .post-sidebar {
      position: sticky;
      top: 96px;
    }

    .toc-card {
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 1.3rem 1.4rem;
      background: var(--bg-light);
    }

    .toc-card h4 {
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-soft);
      margin-bottom: 1rem;
    }

    .toc-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.1rem;
    }

    .toc-list a {
      display: block;
      padding: 0.35rem 0.6rem;
      border-radius: 8px;
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text-soft);
      line-height: 1.4;
      transition: var(--transition);
      border-left: 2px solid transparent;
    }

    .toc-list a:hover,
    .toc-list a.is-active {
      color: var(--accent);
      background: var(--accent-soft);
      border-left-color: var(--accent);
    }

    .toc-list li[data-level="3"] a {
      padding-left: 1.2rem;
      font-size: 0.84rem;
    }

    /* ── Article body ────────────────────── */
    .post-article {
      min-width: 0;
    }

    .post-content {
      font-size: 1.03rem;
      line-height: 1.8;
      color: var(--text-main);
    }

    .post-content h2 {
      font-size: clamp(1.3rem, 2.5vw, 1.75rem);
      font-weight: 800;
      color: var(--text-heading);
      margin: 2.2rem 0 0.9rem;
      letter-spacing: -0.025em;
      line-height: 1.25;
    }

    .post-content h3 {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--text-heading);
      margin: 1.8rem 0 0.7rem;
    }

    .post-content p {
      margin-bottom: 1.2rem;
      color: var(--text-main);
    }

    .post-content ul,
    .post-content ol {
      margin: 0 0 1.2rem 1.5rem;
    }

    .post-content li {
      margin-bottom: 0.5rem;
    }

    .post-content a {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .post-content blockquote {
      margin: 1.8rem 0;
      padding: 1.2rem 1.5rem;
      border-left: 4px solid var(--accent);
      background: var(--accent-soft);
      border-radius: 0 12px 12px 0;
      font-style: italic;
      color: var(--text-soft);
    }

    .post-content img {
      border-radius: 12px;
      margin: 1.5rem 0;
      max-width: 100%;
    }

    .post-content pre,
    .post-content code {
      font-family: 'Courier New', Courier, monospace;
      background: var(--bg-light);
      border: 1px solid var(--border);
      border-radius: 8px;
    }

    .post-content pre {
      padding: 1rem 1.2rem;
      overflow-x: auto;
      margin: 1.2rem 0;
    }

    .post-content code {
      padding: 0.15rem 0.45rem;
      font-size: 0.88em;
    }

    .post-content table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.5rem 0;
      font-size: 0.94rem;
    }

    .post-content th,
    .post-content td {
      padding: 0.7rem 0.9rem;
      border: 1px solid var(--border);
      text-align: left;
    }

    .post-content th {
      background: var(--bg-light);
      font-weight: 700;
      color: var(--text-heading);
    }

    /* Icon concept cards (matching PNG) */
    .post-concept-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1rem;
      margin: 1.5rem 0;
    }

    .post-concept-card {
      padding: 1.2rem;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: var(--bg-light);
      text-align: center;
    }

    .post-concept-card .concept-icon {
      font-size: 1.6rem;
      margin-bottom: 0.5rem;
    }

    .post-concept-card h4 {
      font-size: 0.95rem;
      font-weight: 700;
      margin-bottom: 0.4rem;
    }

    .post-concept-card p {
      font-size: 0.85rem;
      color: var(--text-soft);
      margin: 0;
    }

    /* ── Categories & Tags ───────────────── */
    .post-taxonomy {
      margin-top: 2.5rem;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
    }

    .taxonomy-label {
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--text-soft);
      margin-bottom: 0.7rem;
      display: block;
    }

    .taxonomy-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .taxonomy-tag {
      display: inline-flex;
      align-items: center;
      padding: 0.3rem 0.75rem;
      border-radius: 999px;
      border: 1px solid var(--border);
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-soft);
      background: var(--white);
      transition: var(--transition);
      text-decoration: none;
    }

    .taxonomy-tag:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-soft);
    }

    .taxonomy-tag.is-category {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: transparent;
      font-weight: 700;
    }

    /* ── Post navigation prev/next ────────── */
    .post-nav {
      margin-top: 2.5rem;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }

    .post-nav-item {
      display: flex;
      align-items: center;
      gap: 1rem;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: var(--white);
      transition: var(--transition);
      text-decoration: none;
    }

    .post-nav-item:hover {
      border-color: #c7d2fe;
      box-shadow: var(--shadow-soft);
      transform: translateY(-2px);
    }

    .post-nav-item.next {
      flex-direction: row-reverse;
      text-align: right;
    }

    .post-nav-thumb {
      width: 80px;
      height: 80px;
      flex: 0 0 80px;
      object-fit: cover;
      display: block;
    }

    .post-nav-thumb-placeholder {
      width: 80px;
      height: 80px;
      flex: 0 0 80px;
      background:
        radial-gradient(circle at top right, rgba(37,99,235,.16), transparent 60%),
        linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      color: #93c5fd;
    }

    .post-nav-copy {
      padding: 0.8rem 1rem 0.8rem 0;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      min-width: 0;
    }

    .post-nav-item.next .post-nav-copy {
      padding: 0.8rem 0 0.8rem 1rem;
    }

    .post-nav-dir {
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .post-nav-title {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-heading);
      line-height: 1.4;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ── Related Posts ───────────────────── */
    .related-section {
      padding: 52px 0 64px;
      background: var(--bg-light);
      border-top: 1px solid var(--border);
    }

    .related-section .section-title {
      font-size: clamp(1.4rem, 2.2vw, 1.85rem);
      font-weight: 800;
      color: var(--text-heading);
      margin-bottom: 1.5rem;
    }

    .related-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.4rem;
    }

    .related-card {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 18px;
      background: var(--white);
      box-shadow: var(--shadow-soft);
      transition: var(--transition);
      text-decoration: none;
    }

    .related-card:hover {
      transform: translateY(-4px);
      border-color: #c7d2fe;
      box-shadow: var(--shadow);
    }

    .related-thumb {
      position: relative;
      height: 160px;
      background:
        radial-gradient(circle at top right, rgba(37,99,235,.16), transparent 32%),
        linear-gradient(135deg, #eef4fb 0%, #dbe7f5 100%);
      overflow: hidden;
    }

    .related-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .related-thumb-placeholder {
      width: 100%;
      height: 100%;
      background:
        radial-gradient(circle at 80% 28%, rgba(37,99,235,.18), transparent 24%),
        linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    }

    .related-badge {
      position: absolute;
      top: 0.75rem;
      left: 0.75rem;
      padding: 0.28rem 0.62rem;
      border-radius: 999px;
      background: rgba(255,255,255,.88);
      color: var(--accent);
      font-size: 0.7rem;
      font-weight: 800;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .related-body {
      padding: 1.1rem 1.2rem 1.2rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      flex: 1;
    }

    .related-body h3 {
      font-size: 0.98rem;
      font-weight: 700;
      color: var(--text-heading);
      line-height: 1.4;
    }

    .related-body .article-meta {
      color: var(--text-soft);
      font-size: 0.84rem;
      font-weight: 600;
    }

    /* ── Comments ────────────────────────── */
    .comments-section {
      padding: 52px 0 72px;
      background: var(--white);
      border-top: 1px solid var(--border);
    }

    .comments-title {
      font-size: clamp(1.3rem, 2vw, 1.75rem);
      font-weight: 800;
      color: var(--text-heading);
      margin-bottom: 1.8rem;
    }

    .comments-list {
      display: flex;
      flex-direction: column;
      gap: 1.4rem;
      margin-bottom: 2.5rem;
    }

    .comment-thread {
      display: flex;
      flex-direction: column;
      gap: 1.4rem;
      padding-bottom: 1.4rem;
      border-bottom: 1px solid var(--border);
    }

    .comment-thread:last-child {
      padding-bottom: 0;
      border-bottom: none;
    }

    .comment-item {
      display: flex;
      gap: 1rem;
      scroll-margin-top: 100px;
    }

    .comment-item-reply {
      margin-left: 3.5rem;
    }

    .comment-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--accent-soft);
      color: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 0.95rem;
      flex: 0 0 auto;
      border: 2px solid var(--border);
    }

    .comment-body {
      min-width: 0;
      flex: 1;
      overflow-wrap: anywhere;
    }

    .comment-header {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.4rem;
      flex-wrap: wrap;
    }

    .comment-author {
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--text-heading);
    }

    .comment-date {
      font-size: 0.82rem;
      color: var(--text-soft);
      font-weight: 600;
    }

    .comment-text {
      color: var(--text-main);
      font-size: 0.95rem;
      line-height: 1.65;
    }

    .comment-reply-link {
      margin-top: 0.4rem;
      display: inline-block;
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--accent);
      text-decoration: none;
    }

    .comment-reply-link:hover {
      text-decoration: underline;
    }

    /* Comment form */
    .comment-form-wrap {
      padding: 2rem;
      border: 1px solid var(--border);
      border-radius: 20px;
      background: var(--bg-light);
      scroll-margin-top: 100px;
    }

    .comment-form-heading {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-bottom: 1.2rem;
    }

    .comment-form-wrap h3 {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--text-heading);
      margin-bottom: 0;
    }

    .comment-cancel-reply {
      color: var(--accent);
      font-size: 0.82rem;
      font-weight: 700;
      text-decoration: none;
    }

    .comment-cancel-reply:hover {
      text-decoration: underline;
    }

    .comment-cancel-reply[hidden] {
      display: none;
    }

    .comment-form {
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }

    .comment-form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.9rem;
    }

    .comment-form .field input,
    .comment-form .field textarea {
      min-height: 46px;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0.75rem 1rem;
      font: inherit;
      color: var(--navy);
      background: var(--white);
      transition: var(--transition);
      width: 100%;
    }

    .comment-form .field textarea {
      min-height: 120px;
      resize: vertical;
    }

    .comment-form .field input:focus,
    .comment-form .field textarea:focus {
      outline: none;
      border-color: #93c5fd;
      box-shadow: 0 0 0 3px rgba(37,99,235,.10);
    }

    .comment-form .field label {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--navy);
      margin-bottom: 0.3rem;
      display: block;
    }

    /* ── Share bar ───────────────────────── */
    .share-bar {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      margin-top: 2rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .share-label {
      font-size: 0.82rem;
      font-weight: 800;
      color: var(--text-soft);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin-right: 0.3rem;
    }

    .share-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.42rem 0.9rem;
      border-radius: 999px;
      border: 1px solid var(--border);
      font-size: 0.83rem;
      font-weight: 700;
      color: var(--text-soft);
      background: var(--white);
      text-decoration: none;
      transition: var(--transition);
    }

    .share-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-soft);
    }

    /* ── 404 state ───────────────────────── */
    .post-not-found {
      padding: 120px 0;
      text-align: center;
    }

    /* ── Responsive ──────────────────────── */
    @media (max-width: 900px) {
      .post-layout-inner {
        grid-template-columns: 1fr;
      }
      .post-sidebar {
        position: static;
        order: -1;
      }
      .related-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .post-nav {
        grid-template-columns: 1fr;
      }
      .post-nav-item.next {
        text-align: left;
      }
    }

    @media (max-width: 640px) {
      .related-grid {
        grid-template-columns: 1fr;
      }
      .comment-form-row {
        grid-template-columns: 1fr;
      }
      .comment-item-reply {
        margin-left: 1.5rem;
      }
    }

    @media (prefers-color-scheme: dark) {
      .post-hero {
        background: #0b1220;
        border-color: var(--border);
      }
      .toc-card,
      .comment-form-wrap {
        background: #111827;
        border-color: var(--border);
      }
      .post-featured-placeholder {
        background: linear-gradient(135deg, #111827 0%, #172033 100%);
      }
      .related-thumb-placeholder {
        background: linear-gradient(135deg, #111827 0%, #172033 100%);
      }
      .related-badge {
        background: rgba(15,23,42,.86);
      }
      .comment-form .field input,
      .comment-form .field textarea {
        background: #0b1220;
        border-color: #334155;
        color: #f8fafc;
      }
      .comment-form .field input::placeholder,
      .comment-form .field textarea::placeholder {
        color: #94a3b8;
      }
      .post-nav-item {
        background: #111827;
        border-color: var(--border);
      }

      .post-nav-thumb-placeholder {
        background: linear-gradient(135deg, #111827 0%, #172033 100%);
        color: #60a5fa;
      }
    }
  
