/*
Theme Name: CodeWithChai V13
Theme URI: https://codewithchai.com/
Author: CodeWithChai
Description: A clean .NET, Cloud, AI, and DevOps WordPress theme for CodeWithChai.
Version: 1.2.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: codewithchai
*/


    /* ══ DARK THEME (default) ══ */
    :root {
      --bg: #080705;
      --bg2: #0f0d0a;
      --surface: #161210;
      --surface2: #1e1814;
      --border: #2a221a;
      --border2: #3a2e20;
      --chai: #d97706;
      --chai-lt: #f59e0b;
      --chai-dim: rgba(217, 119, 6, 0.13);
      --chai-glow: rgba(217, 119, 6, 0.06);
      --indigo: #6366f1;
      --indigo-dim: rgba(99, 102, 241, 0.12);
      --text: #f2ece3;
      --text2: #b0a494;
      --muted: #65584a;
      --shadow: rgba(0, 0, 0, 0.7);
      --radius: 4px;
      --tr: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      --nav-h: 72px;
    }

    /* ══ LIGHT THEME ══ */
    [data-theme="light"] {
      --bg: #faf8f5;
      --bg2: #f2ede6;
      --surface: #ffffff;
      --surface2: #f7f3ed;
      --border: #e5ddd2;
      --border2: #d4c9ba;
      --text: #1c1712;
      --text2: #5c4f40;
      --muted: #9a8878;
      --shadow: rgba(0, 0, 0, 0.12);
      --chai-dim: rgba(217, 119, 6, 0.09);
      --chai-glow: rgba(217, 119, 6, 0.04);
      --indigo-dim: rgba(99, 102, 241, 0.08);
    }

    [data-theme="light"] body::after {
      opacity: .15
    }

    [data-theme="light"] .hero-grid {
      background-image: linear-gradient(rgba(217, 119, 6, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 119, 6, .06) 1px, transparent 1px)
    }

    [data-theme="light"] .nav {
      background: rgba(250, 248, 245, .92)
    }

    [data-theme="light"] .code-card {
      box-shadow: 0 20px 60px rgba(0, 0, 0, .12)
    }

    [data-theme="light"] .c-comment {
      color: #999
    }

    [data-theme="light"] .hero-title .outline {
      -webkit-text-stroke: 1px rgba(28, 23, 18, .2)
    }

    [data-theme="light"] .mobile-nav {
      background: var(--bg2)
    }

    [data-theme="light"] .read-progress-bar {
      background: linear-gradient(90deg, var(--chai), var(--chai-lt))
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    html {
      scroll-behavior: smooth;
      font-size: 16px
    }

    body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.65;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      transition: background .3s, color .3s
    }

    img {
      display: block;
      max-width: 100%
    }

    a {
      color: inherit;
      text-decoration: none
    }

    button {
      font-family: inherit;
      cursor: pointer;
      border: none;
      background: none
    }

    body::after {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 9999;
      opacity: .5
    }

    ::-webkit-scrollbar {
      width: 5px
    }

    ::-webkit-scrollbar-track {
      background: var(--bg)
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border2);
      border-radius: 10px
    }

    .container {
      max-width: 1160px;
      margin: 0 auto;
      padding: 0 2rem
    }

    .section {
      padding: 6rem 0
    }

    /* NAV */
    .nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 500;
      height: var(--nav-h);
      display: flex;
      align-items: center;
      background: rgba(12, 10, 8, .88);
      backdrop-filter: blur(24px) saturate(1.4);
      border-bottom: 1px solid var(--border);
      transition: box-shadow var(--tr)
    }

    .nav.scrolled {
      box-shadow: 0 8px 40px rgba(0, 0, 0, .5)
    }

    .nav-inner {
      max-width: 1160px;
      margin: 0 auto;
      padding: 0 2rem;
      width: 100%;
      display: flex;
      align-items: center;
      gap: 2.5rem
    }

    .nav-logo {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      font-weight: 900;
      letter-spacing: -.01em;
      white-space: nowrap;
      flex-shrink: 0
    }

    .nav-logo .chai {
      color: var(--chai-lt)
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: .15rem;
      list-style: none;
      flex: 1
    }

    .nav-links a {
      font-size: .875rem;
      font-weight: 500;
      color: var(--text2);
      padding: .45rem .85rem;
      border-radius: var(--radius);
      transition: color var(--tr), background var(--tr)
    }

    .nav-links a:hover,
    .nav-links a.active {
      color: var(--text);
      background: var(--surface)
    }

    .nav-dropdown {
      position: relative
    }

    .nav-dropdown>a::after {
      content: ' ▾';
      font-size: .62rem;
      opacity: .55
    }

    .dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      min-width: 210px;
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 8px;
      padding: .5rem;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-6px);
      transition: all var(--tr);
      box-shadow: 0 20px 60px rgba(0, 0, 0, .6)
    }

    .nav-dropdown:hover .dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0)
    }

    .dropdown-menu a {
      display: block;
      padding: .6rem .9rem;
      font-size: .83rem;
      color: var(--text2);
      border-radius: var(--radius);
      transition: color var(--tr), background var(--tr)
    }

    .dropdown-menu a:hover {
      color: var(--chai-lt);
      background: var(--chai-dim)
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-left: auto;
      flex-shrink: 0
    }

    .nav-search {
      display: flex;
      align-items: center;
      gap: .5rem;
      background: var(--surface);
      border: 1px solid var(--border);
      padding: .38rem .8rem;
      border-radius: var(--radius);
      font-size: .78rem;
      color: var(--muted);
      cursor: pointer;
      transition: border-color var(--tr)
    }

    .nav-search:hover {
      border-color: var(--border2)
    }

    .nav-search svg {
      width: 13px;
      height: 13px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2
    }

    .btn-nav {
      font-size: .82rem;
      font-weight: 600;
      padding: .48rem 1.1rem;
      background: var(--chai);
      color: #fff;
      border-radius: var(--radius);
      transition: background var(--tr), transform var(--tr);
      white-space: nowrap
    }

    .btn-nav:hover {
      background: var(--chai-lt);
      transform: translateY(-1px)
    }

    .hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      padding: 6px;
      cursor: pointer;
      margin-left: auto
    }

    .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--text);
      border-radius: 2px;
      transition: all .3s
    }

    .hamburger.open span:nth-child(1) {
      transform: translateY(7px) rotate(45deg)
    }

    .hamburger.open span:nth-child(2) {
      opacity: 0
    }

    .hamburger.open span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg)
    }

    .mobile-nav {
      display: none;
      position: fixed;
      top: var(--nav-h);
      left: 0;
      right: 0;
      background: var(--bg2);
      border-bottom: 1px solid var(--border);
      padding: 1.5rem 2rem 2rem;
      z-index: 499;
      transform: translateY(-110%);
      transition: transform .35s cubic-bezier(.4, 0, .2, 1)
    }

    .mobile-nav.open {
      transform: translateY(0)
    }

    .mobile-nav a {
      display: block;
      padding: .75rem 0;
      font-size: 1rem;
      font-weight: 500;
      color: var(--text2);
      border-bottom: 1px solid var(--border);
      transition: color var(--tr)
    }

    .mobile-nav a:hover {
      color: var(--chai-lt)
    }

    .mobile-nav .btn-full {
      display: block;
      margin-top: 1.5rem;
      text-align: center;
      padding: .85rem;
      background: var(--chai);
      color: #fff;
      font-weight: 600;
      border-radius: var(--radius)
    }

    /* SPA */
    .page {
      display: none;
      animation: fadeIn .4s ease
    }

    .page.active {
      display: block
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(12px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    /* HERO */
    .hero {
      min-height: 100vh;
      padding-top: var(--nav-h);
      display: flex;
      flex-direction: column;
      position: relative;
      overflow: hidden
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 80% 60% at 65% 0%, rgba(217, 119, 6, .07) 0%, transparent 60%), radial-gradient(ellipse 50% 50% at 0% 80%, rgba(99, 102, 241, .05) 0%, transparent 60%)
    }

    .hero-grid {
      position: absolute;
      inset: 0;
      background-image: linear-gradient(rgba(217, 119, 6, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 119, 6, .035) 1px, transparent 1px);
      background-size: 72px 72px;
      mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%)
    }

    .hero-main {
      flex: 1;
      display: flex;
      align-items: center;
      padding: 5rem 0 3rem;
      position: relative;
      z-index: 1
    }

    .hero-main .container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5rem;
      align-items: center
    }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: .6rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: .74rem;
      color: var(--chai-lt);
      background: var(--chai-dim);
      border: 1px solid rgba(217, 119, 6, .25);
      padding: .35rem .9rem;
      border-radius: 100px;
      margin-bottom: 1.8rem;
      animation: slideDown .6s ease both
    }

    .pulse-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--chai-lt);
      animation: pulse 2s ease infinite
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
        transform: scale(1)
      }

      50% {
        opacity: .4;
        transform: scale(.8)
      }
    }

    .hero-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(2.8rem, 5vw, 4.2rem);
      font-weight: 900;
      line-height: 1.1;
      letter-spacing: -.02em;
      margin-bottom: 1.5rem;
      animation: slideDown .6s .1s ease both
    }

    .hero-title .accent {
      color: var(--chai-lt);
      font-style: italic
    }

    .hero-title .outline {
      -webkit-text-stroke: 1px rgba(240, 235, 227, .25);
      color: transparent
    }

    .hero-desc {
      font-size: 1.05rem;
      color: var(--text2);
      font-weight: 300;
      max-width: 480px;
      line-height: 1.8;
      margin-bottom: 2.5rem;
      animation: slideDown .6s .2s ease both
    }

    .hero-ctas {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      animation: slideDown .6s .3s ease both
    }

    .btn-primary {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      font-size: .9rem;
      font-weight: 600;
      padding: .85rem 1.8rem;
      background: var(--chai);
      color: #fff;
      border-radius: var(--radius);
      transition: all var(--tr);
      box-shadow: 0 4px 24px rgba(217, 119, 6, .35)
    }

    .btn-primary:hover {
      background: var(--chai-lt);
      transform: translateY(-2px);
      box-shadow: 0 8px 32px rgba(217, 119, 6, .45)
    }

    .btn-secondary {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      font-size: .9rem;
      font-weight: 500;
      padding: .85rem 1.8rem;
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--border2);
      border-radius: var(--radius);
      transition: all var(--tr)
    }

    .btn-secondary:hover {
      border-color: var(--chai);
      color: var(--chai-lt);
      transform: translateY(-2px)
    }

    /* Code card */
    .hero-visual {
      animation: slideDown .6s .2s ease both;
      position: relative
    }

    .code-card {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 40px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04)
    }

    .code-card-header {
      display: flex;
      align-items: center;
      gap: .5rem;
      padding: .9rem 1.2rem;
      background: var(--surface2);
      border-bottom: 1px solid var(--border)
    }

    .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%
    }

    .dot.red {
      background: #ff5f57
    }

    .dot.yellow {
      background: #ffbd2e
    }

    .dot.green {
      background: #28ca41
    }

    .code-card-title {
      font-family: 'JetBrains Mono', monospace;
      font-size: .7rem;
      color: var(--muted);
      margin-left: .5rem
    }

    .code-body {
      padding: 1.5rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: .79rem;
      line-height: 2
    }

    .c-keyword {
      color: #c792ea
    }

    .c-class {
      color: #82aaff
    }

    .c-string {
      color: #c3e88d
    }

    .c-comment {
      color: var(--muted);
      font-style: italic
    }

    .c-attr {
      color: var(--chai-lt)
    }

    .c-num {
      color: #f78c6c
    }

    .floating-badge {
      position: absolute;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 10px;
      padding: .7rem 1rem;
      display: flex;
      align-items: center;
      gap: .6rem;
      box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
      font-size: .8rem;
      font-weight: 600;
      animation: float 4s ease-in-out infinite
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0)
      }

      50% {
        transform: translateY(-8px)
      }
    }

    .badge-1 {
      bottom: -20px;
      left: -28px;
      color: var(--chai-lt)
    }

    .badge-2 {
      top: -16px;
      right: -18px;
      color: #a5f3fc;
      animation-delay: 1.5s
    }

    .badge-icon {
      font-size: 1.15rem
    }

    /* Stats */
    .stats-bar {
      border-top: 1px solid var(--border);
      background: var(--bg2);
      position: relative;
      z-index: 1
    }

    .stats-bar .container {
      display: flex;
      align-items: center;
      padding-top: 2.5rem;
      padding-bottom: 2.5rem;
      gap: 0
    }

    .stat-item {
      flex: 1;
      text-align: center;
      padding: 0 1.5rem;
      border-right: 1px solid var(--border)
    }

    .stat-item:last-child {
      border-right: none
    }

    .stat-num {
      font-family: 'Playfair Display', serif;
      font-size: 2.4rem;
      font-weight: 900;
      letter-spacing: -.02em;
      line-height: 1
    }

    .stat-num sup {
      color: var(--chai-lt);
      font-size: 1.1rem;
      vertical-align: super
    }

    .stat-label {
      font-size: .76rem;
      color: var(--muted);
      margin-top: .3rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: .06em
    }

    /* Topics */
    .topics {
      background: var(--surface);
      border-bottom: 1px solid var(--border)
    }

    .topics .container {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding-top: 1.2rem;
      padding-bottom: 1.2rem;
      flex-wrap: wrap
    }

    .topics-label {
      font-size: .76rem;
      color: var(--muted);
      font-weight: 500;
      white-space: nowrap
    }

    .topic-pill {
      font-size: .79rem;
      font-weight: 500;
      padding: .3rem .9rem;
      border-radius: 100px;
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text2);
      cursor: pointer;
      transition: all var(--tr)
    }

    .topic-pill:hover,
    .topic-pill.active {
      background: var(--chai-dim);
      border-color: rgba(217, 119, 6, .4);
      color: var(--chai-lt)
    }

    /* Section header */
    .section-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: .71rem;
      color: var(--chai-lt);
      letter-spacing: .12em;
      text-transform: uppercase;
      margin-bottom: .6rem
    }

    .section-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.8rem, 3vw, 2.4rem);
      font-weight: 800;
      letter-spacing: -.02em;
      line-height: 1.15
    }

    .section-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin-bottom: 3rem;
      gap: 2rem
    }

    .link-arrow {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      font-size: .85rem;
      font-weight: 600;
      color: var(--chai-lt);
      white-space: nowrap;
      transition: gap var(--tr)
    }

    .link-arrow:hover {
      gap: .7rem
    }

    /* Article cards */
    .articles-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem
    }

    .article-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr);
      cursor: pointer;
      display: flex;
      flex-direction: column
    }

    .article-card:hover {
      transform: translateY(-4px);
      border-color: var(--border2);
      box-shadow: 0 20px 50px rgba(0, 0, 0, .4)
    }

    .card-img {
      height: 180px;
      position: relative;
      overflow: hidden;
      background: var(--surface2)
    }

    .card-img-inner {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
      position: relative
    }

    .card-img-inner::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, var(--chai-dim), var(--indigo-dim))
    }

    .card-badge {
      position: absolute;
      top: 12px;
      left: 12px;
      font-family: 'JetBrains Mono', monospace;
      font-size: .63rem;
      font-weight: 500;
      padding: .22rem .55rem;
      border-radius: 4px;
      letter-spacing: .04em;
      text-transform: uppercase
    }

    .badge-dotnet {
      background: rgba(217, 119, 6, .2);
      color: var(--chai-lt);
      border: 1px solid rgba(217, 119, 6, .3)
    }

    .badge-arch {
      background: rgba(99, 102, 241, .2);
      color: #a5b4fc;
      border: 1px solid rgba(99, 102, 241, .3)
    }

    .badge-cloud {
      background: rgba(20, 184, 166, .2);
      color: #5eead4;
      border: 1px solid rgba(20, 184, 166, .3)
    }

    .badge-ai {
      background: rgba(168, 85, 247, .2);
      color: #c4b5fd;
      border: 1px solid rgba(168, 85, 247, .3)
    }

    .card-body {
      padding: 1.4rem;
      flex: 1;
      display: flex;
      flex-direction: column
    }

    .card-meta {
      display: flex;
      align-items: center;
      gap: .65rem;
      font-size: .73rem;
      color: var(--muted);
      margin-bottom: .7rem;
      font-family: 'JetBrains Mono', monospace
    }

    .dot-sep {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: var(--muted);
      flex-shrink: 0
    }

    .card-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.08rem;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -.01em;
      margin-bottom: .65rem;
      flex: 1
    }

    .card-excerpt {
      font-size: .84rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.7;
      margin-bottom: 1.2rem
    }

    .card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 1rem;
      border-top: 1px solid var(--border);
      font-size: .73rem
    }

    .card-views {
      font-family: 'JetBrains Mono', monospace;
      color: var(--muted)
    }

    .card-read {
      color: var(--chai-lt);
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: .3rem
    }

    .article-card.featured {
      grid-column: span 2;
      flex-direction: row
    }

    .article-card.featured .card-img {
      width: 300px;
      flex-shrink: 0;
      height: auto;
      min-height: 220px
    }

    .article-card.featured .card-title {
      font-size: 1.35rem
    }

    .article-card.featured .card-body {
      padding: 2rem
    }

    /* Newsletter */
    .newsletter-strip {
      background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      position: relative;
      overflow: hidden
    }

    .newsletter-strip::before {
      content: '☕';
      position: absolute;
      right: 5%;
      top: 50%;
      transform: translateY(-50%);
      font-size: 10rem;
      opacity: .04;
      pointer-events: none;
      line-height: 1
    }

    .newsletter-strip .container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4rem;
      align-items: center;
      padding-top: 5rem;
      padding-bottom: 5rem
    }

    .nl-title {
      font-family: 'Playfair Display', serif;
      font-size: 2.2rem;
      font-weight: 800;
      letter-spacing: -.02em;
      line-height: 1.15;
      margin-bottom: 1rem
    }

    .nl-title em {
      color: var(--chai-lt);
      font-style: italic
    }

    .nl-desc {
      font-size: .94rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.8
    }

    .nl-perks {
      display: flex;
      gap: 1.5rem;
      margin-top: 1.2rem;
      flex-wrap: wrap
    }

    .nl-perk {
      font-size: .77rem;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: .35rem
    }

    .nl-perk::before {
      content: '✓';
      color: var(--chai-lt);
      font-weight: 700
    }

    .nl-form {
      display: flex;
      flex-direction: column;
      gap: .9rem
    }

    .nl-row {
      display: flex;
      gap: .8rem
    }

    .nl-input {
      flex: 1;
      background: var(--bg);
      border: 1px solid var(--border2);
      border-radius: var(--radius);
      padding: .8rem 1rem;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: .87rem;
      color: var(--text);
      outline: none;
      transition: border-color var(--tr)
    }

    .nl-input:focus {
      border-color: var(--chai)
    }

    .nl-input::placeholder {
      color: var(--muted)
    }

    .nl-submit {
      background: var(--chai);
      color: #fff;
      font-weight: 600;
      font-size: .9rem;
      padding: .8rem 1.6rem;
      border-radius: var(--radius);
      white-space: nowrap;
      transition: all var(--tr);
      box-shadow: 0 4px 20px rgba(217, 119, 6, .3)
    }

    .nl-submit:hover {
      background: var(--chai-lt);
      transform: translateY(-1px)
    }

    .nl-note {
      font-size: .72rem;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace
    }

    /* Page hero */
    .page-hero {
      padding-top: calc(var(--nav-h) + 4rem);
      padding-bottom: 4rem;
      background: var(--bg2);
      border-bottom: 1px solid var(--border);
      position: relative;
      overflow: hidden
    }

    .page-hero::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: 40%;
      background: radial-gradient(ellipse at right, rgba(217, 119, 6, .06), transparent 70%)
    }

    .page-hero-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: .71rem;
      color: var(--chai-lt);
      letter-spacing: .12em;
      text-transform: uppercase;
      margin-bottom: .8rem
    }

    .page-hero-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(2rem, 4vw, 3.2rem);
      font-weight: 900;
      letter-spacing: -.02em;
      margin-bottom: 1rem
    }

    .page-hero-desc {
      font-size: 1rem;
      color: var(--text2);
      font-weight: 300;
      max-width: 520px;
      line-height: 1.8
    }

    /* Blog */
    .blog-layout {
      display: grid;
      grid-template-columns: 1fr 300px;
      gap: 3rem;
      align-items: start
    }

    .blog-filters {
      display: flex;
      align-items: center;
      gap: .5rem;
      margin-bottom: 2rem;
      flex-wrap: wrap
    }

    .filter-btn {
      font-size: .81rem;
      font-weight: 500;
      padding: .38rem .95rem;
      border: 1px solid var(--border);
      border-radius: 100px;
      color: var(--text2);
      background: var(--surface);
      cursor: pointer;
      transition: all var(--tr)
    }

    .filter-btn:hover,
    .filter-btn.active {
      border-color: var(--chai);
      color: var(--chai-lt);
      background: var(--chai-dim)
    }

    .blog-list {
      display: flex;
      flex-direction: column;
      gap: 1.2rem
    }

    .blog-list-card {
      display: flex;
      gap: 1.3rem;
      padding: 1.4rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      cursor: pointer;
      transition: all var(--tr)
    }

    .blog-list-card:hover {
      border-color: var(--border2);
      transform: translateX(4px);
      box-shadow: 0 8px 30px rgba(0, 0, 0, .3)
    }

    .blog-list-img {
      width: 110px;
      height: 82px;
      flex-shrink: 0;
      background: var(--surface2);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      position: relative;
      overflow: hidden
    }

    .blog-list-img::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, var(--chai-dim), var(--indigo-dim))
    }

    .blog-list-body {
      flex: 1
    }

    .blog-list-meta {
      display: flex;
      align-items: center;
      gap: .65rem;
      font-size: .72rem;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      margin-bottom: .45rem;
      flex-wrap: wrap
    }

    .blog-list-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.02rem;
      font-weight: 700;
      line-height: 1.35;
      margin-bottom: .35rem
    }

    .blog-list-excerpt {
      font-size: .82rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.65
    }

    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 1.4rem;
      position: sticky;
      top: calc(var(--nav-h) + 1.5rem)
    }

    .sidebar-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden
    }

    .sidebar-card-header {
      padding: .9rem 1.1rem;
      background: var(--surface2);
      border-bottom: 1px solid var(--border);
      font-size: .76rem;
      font-weight: 600;
      color: var(--text2);
      text-transform: uppercase;
      letter-spacing: .06em
    }

    .sidebar-card-body {
      padding: 1.1rem
    }

    .sidebar-tag {
      display: inline-block;
      font-size: .76rem;
      font-weight: 500;
      padding: .28rem .7rem;
      border-radius: 100px;
      border: 1px solid var(--border);
      color: var(--text2);
      background: var(--bg);
      margin: .22rem;
      cursor: pointer;
      transition: all var(--tr)
    }

    .sidebar-tag:hover {
      border-color: var(--chai);
      color: var(--chai-lt)
    }

    .popular-item {
      display: flex;
      gap: .75rem;
      align-items: flex-start;
      padding: .65rem 0;
      border-bottom: 1px solid var(--border)
    }

    .popular-item:last-child {
      border-bottom: none;
      padding-bottom: 0
    }

    .popular-num {
      font-family: 'Playfair Display', serif;
      font-size: 1.1rem;
      font-weight: 900;
      color: var(--border2);
      line-height: 1;
      min-width: 1.5rem
    }

    .popular-title {
      font-size: .81rem;
      font-weight: 600;
      line-height: 1.4;
      color: var(--text2)
    }

    /* Courses */
    .courses-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem
    }

    .course-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      transition: all var(--tr);
      cursor: pointer
    }

    .course-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
      border-color: var(--border2)
    }

    .course-header {
      height: 190px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3.8rem;
      position: relative;
      overflow: hidden
    }

    .course-header::before {
      content: '';
      position: absolute;
      inset: 0
    }

    .ch-green::before {
      background: linear-gradient(135deg, rgba(34, 197, 94, .15), rgba(16, 185, 129, .1))
    }

    .ch-blue::before {
      background: linear-gradient(135deg, rgba(59, 130, 246, .15), rgba(99, 102, 241, .1))
    }

    .ch-orange::before {
      background: linear-gradient(135deg, rgba(217, 119, 6, .15), rgba(251, 146, 60, .1))
    }

    .ch-purple::before {
      background: linear-gradient(135deg, rgba(168, 85, 247, .15), rgba(236, 72, 153, .1))
    }

    .course-body {
      padding: 1.7rem
    }

    .course-level {
      font-family: 'JetBrains Mono', monospace;
      font-size: .67rem;
      text-transform: uppercase;
      letter-spacing: .08em;
      margin-bottom: .55rem
    }

    .level-beginner {
      color: #4ade80
    }

    .level-inter {
      color: var(--chai-lt)
    }

    .level-advanced {
      color: #c4b5fd
    }

    .course-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.25rem;
      font-weight: 800;
      margin-bottom: .65rem;
      line-height: 1.25
    }

    .course-desc {
      font-size: .86rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.7;
      margin-bottom: 1.4rem
    }

    .course-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 1.1rem;
      border-top: 1px solid var(--border)
    }

    .course-meta {
      font-family: 'JetBrains Mono', monospace;
      font-size: .7rem;
      color: var(--muted)
    }

    .course-btn {
      font-size: .81rem;
      font-weight: 600;
      padding: .48rem 1.1rem;
      background: var(--chai);
      color: #fff;
      border-radius: var(--radius);
      transition: all var(--tr)
    }

    .course-btn:hover {
      background: var(--chai-lt)
    }

    .badge-free {
      position: absolute;
      top: 14px;
      right: 14px;
      font-size: .66rem;
      font-weight: 700;
      padding: .24rem .65rem;
      background: rgba(34, 197, 94, .2);
      color: #4ade80;
      border: 1px solid rgba(34, 197, 94, .3);
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: .05em
    }

    /* About */
    .about-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5rem;
      align-items: center
    }

    .about-avatar {
      width: 100%;
      aspect-ratio: 1;
      max-width: 420px;
      border-radius: 16px;
      overflow: hidden;
      background: var(--surface2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 8rem;
      border: 1px solid var(--border2);
      position: relative
    }

    .about-avatar::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, var(--chai-dim), var(--indigo-dim))
    }

    .about-floater {
      position: absolute;
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 10px;
      padding: .8rem 1.1rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .4)
    }

    .af1 {
      bottom: -14px;
      right: -22px
    }

    .af2 {
      top: -14px;
      left: -22px
    }

    .fl-label {
      font-size: .68rem;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace
    }

    .fl-val {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--chai-lt);
      font-family: 'Playfair Display', serif
    }

    .about-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.8rem, 3.5vw, 2.7rem);
      font-weight: 900;
      letter-spacing: -.02em;
      line-height: 1.15;
      margin-bottom: 1.4rem
    }

    .about-desc {
      font-size: .95rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.85;
      margin-bottom: 1.2rem
    }

    .skill-list {
      display: flex;
      flex-wrap: wrap;
      gap: .55rem;
      margin-top: 1.4rem
    }

    .skill-tag {
      font-family: 'JetBrains Mono', monospace;
      font-size: .73rem;
      padding: .32rem .75rem;
      border-radius: 4px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      color: var(--text2)
    }

    .achievements {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      margin-top: 3.5rem
    }

    .achievement-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 1.4rem;
      transition: all var(--tr)
    }

    .achievement-card:hover {
      border-color: var(--chai);
      transform: translateY(-2px)
    }

    .ach-icon {
      font-size: 1.7rem;
      margin-bottom: .55rem
    }

    .ach-title {
      font-size: .87rem;
      font-weight: 700;
      margin-bottom: .28rem
    }

    .ach-desc {
      font-size: .78rem;
      color: var(--muted);
      font-weight: 300
    }

    /* Resources */
    .resources-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.4rem
    }

    .resource-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 2rem;
      transition: all var(--tr);
      cursor: pointer
    }

    .resource-card:hover {
      transform: translateY(-4px);
      border-color: var(--border2);
      box-shadow: 0 16px 40px rgba(0, 0, 0, .3)
    }

    .resource-icon {
      font-size: 2.3rem;
      margin-bottom: .9rem
    }

    .resource-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.12rem;
      font-weight: 800;
      margin-bottom: .55rem
    }

    .resource-desc {
      font-size: .84rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.7
    }

    .resource-link {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      margin-top: 1.1rem;
      font-size: .81rem;
      font-weight: 600;
      color: var(--chai-lt)
    }

    /* Contact */
    .contact-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5rem;
      align-items: start
    }

    .contact-links {
      display: flex;
      flex-direction: column;
      gap: .9rem;
      margin-top: 2rem
    }

    .contact-link {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: .95rem 1.1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      transition: all var(--tr)
    }

    .contact-link:hover {
      border-color: var(--chai);
      transform: translateX(4px)
    }

    .cl-icon {
      font-size: 1.3rem;
      width: 2rem;
      text-align: center
    }

    .cl-platform {
      font-size: .7rem;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace
    }

    .cl-handle {
      font-size: .88rem;
      font-weight: 600
    }

    .contact-form {
      display: flex;
      flex-direction: column;
      gap: 1.1rem
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: .45rem
    }

    .form-label {
      font-size: .79rem;
      font-weight: 600;
      color: var(--text2)
    }

    .form-input {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: .82rem 1rem;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: .87rem;
      color: var(--text);
      outline: none;
      transition: border-color var(--tr)
    }

    .form-input:focus {
      border-color: var(--chai)
    }

    .form-input::placeholder {
      color: var(--muted)
    }

    textarea.form-input {
      resize: vertical;
      min-height: 130px
    }

    .form-submit {
      background: var(--chai);
      color: #fff;
      font-weight: 600;
      font-size: .9rem;
      padding: .88rem 2rem;
      border-radius: var(--radius);
      transition: all var(--tr);
      align-self: flex-start;
      box-shadow: 0 4px 20px rgba(217, 119, 6, .3)
    }

    .form-submit:hover {
      background: var(--chai-lt);
      transform: translateY(-2px)
    }

    /* Footer */
    .footer {
      background: var(--bg2);
      border-top: 1px solid var(--border);
      padding: 4rem 0 2rem
    }

    .footer-main {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1fr;
      gap: 3rem;
      margin-bottom: 3rem
    }

    .footer-brand-logo {
      font-family: 'Playfair Display', serif;
      font-size: 1.5rem;
      font-weight: 900;
      display: inline-block;
      margin-bottom: 1rem
    }

    .footer-brand-logo .chai {
      color: var(--chai-lt)
    }

    .footer-brand p {
      font-size: .85rem;
      color: var(--muted);
      font-weight: 300;
      line-height: 1.8;
      max-width: 270px
    }

    .footer-col-title {
      font-size: .76rem;
      font-weight: 700;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: .08em;
      margin-bottom: 1.1rem
    }

    .footer-links-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: .55rem
    }

    .footer-links-list a {
      font-size: .85rem;
      color: var(--muted);
      transition: color var(--tr)
    }

    .footer-links-list a:hover {
      color: var(--chai-lt)
    }

    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
      font-size: .78rem;
      color: var(--muted)
    }

    .footer-socials {
      display: flex;
      gap: .7rem
    }

    .social-btn {
      width: 34px;
      height: 34px;
      border-radius: 7px;
      background: var(--surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .85rem;
      transition: all var(--tr);
      cursor: pointer
    }

    .social-btn:hover {
      border-color: var(--chai);
      background: var(--chai-dim)
    }

    /* Animations */
    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-16px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    .reveal {
      opacity: 1;
      transform: translateY(0);
      transition: opacity .55s ease, transform .55s ease
    }

    .js-animate .reveal {
      opacity: 0;
      transform: translateY(24px)
    }

    .js-animate .reveal.in {
      opacity: 1;
      transform: translateY(0)
    }

    .reveal-d1 {
      transition-delay: .1s
    }

    .reveal-d2 {
      transition-delay: .2s
    }

    .reveal-d3 {
      transition-delay: .3s
    }

    /* ═══ TABLET ≤1024px ═══ */
    @media(max-width:1024px) {
      .hero-main .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center
      }

      .hero-eyebrow {
        margin: 0 auto 1.8rem
      }

      .hero-desc {
        margin-left: auto;
        margin-right: auto
      }

      .hero-ctas {
        justify-content: center
      }

      .hero-visual {
        max-width: 560px;
        margin: 0 auto
      }

      .floating-badge {
        display: none
      }

      .articles-grid {
        grid-template-columns: repeat(2, 1fr)
      }

      .article-card.featured {
        grid-column: span 2;
        flex-direction: row
      }

      .article-card.featured .card-img {
        width: 260px;
        flex-shrink: 0;
        height: auto;
        min-height: 200px
      }

      .blog-layout {
        grid-template-columns: 1fr
      }

      .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem
      }

      .about-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center
      }

      .about-avatar {
        margin: 0 auto
      }

      .about-floater {
        display: none
      }

      .skill-list {
        justify-content: center
      }

      .achievements {
        grid-template-columns: repeat(2, 1fr)
      }

      .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem
      }

      .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem
      }

      .courses-grid {
        grid-template-columns: repeat(2, 1fr)
      }

      .resources-grid {
        grid-template-columns: repeat(2, 1fr)
      }
    }

    /* ═══ MOBILE ≤768px ═══ */
    @media(max-width:768px) {
      :root {
        --nav-h: 60px
      }

      .nav-links,
      .nav-search,
      .btn-nav {
        display: none
      }

      .hamburger {
        display: flex
      }

      .mobile-nav {
        display: block
      }

      .nav-logo {
        font-size: 1.2rem
      }

      .section {
        padding: 3.5rem 0
      }

      .container {
        padding: 0 1.25rem
      }

      .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: .8rem
      }

      .page-hero {
        padding-top: calc(var(--nav-h) + 2.5rem);
        padding-bottom: 2.5rem
      }

      .page-hero-title {
        font-size: 1.9rem
      }

      .hero-main {
        padding: 2.5rem 0 2rem
      }

      .hero-main .container {
        text-align: left
      }

      .hero-eyebrow {
        margin: 0 0 1.5rem
      }

      .hero-title {
        font-size: 2.2rem
      }

      .hero-desc {
        margin: 0 0 2rem;
        font-size: .97rem
      }

      .hero-ctas {
        justify-content: flex-start
      }

      .hero-visual {
        display: none
      }

      .stats-bar .container {
        flex-wrap: wrap;
        padding-top: 0;
        padding-bottom: 0
      }

      .stat-item {
        width: 50%;
        flex: none;
        padding: 1.4rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
        text-align: left
      }

      .stat-item:nth-child(odd) {
        border-right: 1px solid var(--border)
      }

      .stat-item:nth-child(3) {
        border-bottom: none
      }

      .stat-item:last-child {
        border-bottom: none
      }

      .stat-num {
        font-size: 2rem
      }

      .topics .container {
        gap: .6rem;
        padding-top: 1rem;
        padding-bottom: 1rem
      }

      .topics-label {
        display: none
      }

      .articles-grid {
        grid-template-columns: 1fr
      }

      .article-card.featured {
        grid-column: span 1;
        flex-direction: column
      }

      .article-card.featured .card-img {
        width: 100%;
        height: 160px
      }

      .article-card.featured .card-body {
        padding: 1.25rem
      }

      .article-card.featured .card-title {
        font-size: 1.15rem
      }

      .blog-list-card {
        flex-direction: column;
        gap: 1rem
      }

      .blog-list-img {
        width: 100%;
        height: 120px;
        border-radius: 8px 8px 0 0
      }

      .blog-filters {
        gap: .4rem
      }

      .filter-btn {
        font-size: .76rem;
        padding: .32rem .75rem
      }

      .sidebar {
        grid-template-columns: 1fr
      }

      .newsletter-strip .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 3rem;
        padding-bottom: 3rem
      }

      .nl-title {
        font-size: 1.7rem
      }

      .nl-row {
        flex-direction: column;
        gap: .7rem
      }

      .nl-perks {
        gap: 1rem
      }

      .courses-grid {
        grid-template-columns: 1fr
      }

      .course-header {
        height: 150px;
        font-size: 3rem
      }

      .resources-grid {
        grid-template-columns: 1fr
      }

      .about-layout {
        grid-template-columns: 1fr;
        text-align: left
      }

      .about-avatar {
        max-width: 100%;
        aspect-ratio: unset;
        height: 220px;
        border-radius: 12px
      }

      .about-title {
        font-size: 1.7rem
      }

      .skill-list {
        justify-content: flex-start
      }

      .achievements {
        grid-template-columns: repeat(2, 1fr);
        gap: .8rem
      }

      .achievement-card {
        padding: 1.1rem
      }

      .ach-icon {
        font-size: 1.4rem
      }

      .ach-title {
        font-size: .82rem
      }

      .ach-desc {
        font-size: .74rem
      }

      .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem
      }

      .contact-links {
        gap: .7rem
      }

      .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 1.8rem
      }

      .footer-brand {
        grid-column: span 2
      }

      .footer {
        padding: 3rem 0 1.5rem
      }

      .footer-bottom {
        flex-direction: column;
        gap: .8rem;
        text-align: center;
        padding-top: 1.5rem
      }
    }

    /* ═══ SMALL MOBILE ≤480px ═══ */
    @media(max-width:480px) {
      .container {
        padding: 0 1rem
      }

      .hero-title {
        font-size: 1.85rem;
        letter-spacing: -.015em
      }

      .hero-ctas {
        flex-direction: column;
        gap: .75rem
      }

      .btn-primary,
      .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center
      }

      .stat-item {
        padding: 1.2rem .9rem
      }

      .stat-num {
        font-size: 1.75rem
      }

      .achievements {
        grid-template-columns: 1fr
      }

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

      .footer-brand {
        grid-column: unset
      }

      .page-hero-title {
        font-size: 1.6rem
      }

      .nl-title {
        font-size: 1.45rem
      }

      .section-title {
        font-size: 1.5rem
      }

      .section {
        padding: 2.5rem 0
      }

      .about-title {
        font-size: 1.5rem
      }

      .sidebar {
        grid-template-columns: 1fr
      }

      .blog-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none
      }

      .blog-filters::-webkit-scrollbar {
        display: none
      }

      .filter-btn {
        white-space: nowrap;
        flex-shrink: 0
      }

      .topic-pill {
        font-size: .74rem;
        padding: .25rem .7rem
      }

      .card-body {
        padding: 1.1rem
      }

      .course-body {
        padding: 1.2rem
      }

      .resource-card {
        padding: 1.4rem
      }

      .contact-link {
        padding: .8rem 1rem
      }

      .mobile-nav {
        padding: 1.2rem 1.25rem 1.8rem
      }

      .section-label {
        font-size: .68rem
      }
    }

    /* ══ THEME TOGGLE ══ */
    .theme-toggle {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      cursor: pointer;
      transition: all var(--tr);
      flex-shrink: 0
    }

    .theme-toggle:hover {
      border-color: var(--chai);
      background: var(--chai-dim)
    }

    /* ══ READING PROGRESS BAR (top of page) ══ */
    .read-progress {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 600;
      height: 3px;
      background: transparent;
      pointer-events: none
    }

    .read-progress-bar {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--chai) 0%, var(--chai-lt) 50%, #fbbf24 100%);
      transition: width .08s linear;
      box-shadow: 0 0 14px rgba(217, 119, 6, .7)
    }

    /* ══ ARTICLE READER ══ */
    /* ══ ARTICLE PAGE ══ */
    .article-page {
      padding-top: calc(var(--nav-h) + 2.5rem);
      padding-bottom: 5rem
    }

    /* Back button */
    .article-back {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      font-size: .82rem;
      font-weight: 600;
      color: var(--text2);
      padding: .42rem .9rem;
      border: 1px solid var(--border);
      border-radius: 100px;
      background: var(--surface);
      cursor: pointer;
      transition: all var(--tr);
      margin-bottom: 2.5rem
    }

    .article-back:hover {
      border-color: var(--chai);
      color: var(--chai-lt);
      background: var(--chai-dim)
    }

    /* Article header */
    .article-header {
      max-width: 780px;
      margin: 0 auto 3rem;
      text-align: center
    }

    .article-header-badge {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: .7rem;
      color: var(--chai-lt);
      background: var(--chai-dim);
      border: 1px solid rgba(217, 119, 6, .3);
      padding: .32rem .9rem;
      border-radius: 100px;
      margin-bottom: 1.5rem;
      letter-spacing: .05em
    }

    .article-hero-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.8rem, 4.5vw, 3rem);
      font-weight: 900;
      letter-spacing: -.025em;
      line-height: 1.1;
      margin-bottom: 1.5rem
    }

    /* Meta row */
    .article-meta-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .9rem;
      flex-wrap: wrap;
      font-size: .79rem;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      margin-bottom: 0
    }

    .article-meta-row .dot-sep {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: var(--border2);
      flex-shrink: 0
    }

    .article-meta-row .views {
      color: var(--chai-lt);
      font-weight: 600
    }

    /* Inline reading pill */
    .read-indicator {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      background: var(--chai-dim);
      border: 1px solid rgba(217, 119, 6, .3);
      border-radius: 100px;
      padding: .35rem .9rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: .71rem;
      color: var(--chai-lt);
      font-weight: 600
    }

    .read-percent {
      font-weight: 800;
      min-width: 2.2rem;
      text-align: left
    }

    /* Cover image */
    .article-cover {
      height: 420px;
      border-radius: 20px;
      overflow: hidden;
      background: var(--surface2);
      margin: 2.5rem 0 3.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 8rem;
      position: relative;
      box-shadow: 0 30px 80px rgba(0, 0, 0, .4)
    }

    .article-cover::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(217, 119, 6, .12), rgba(99, 102, 241, .1))
    }

    .article-cover::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 55%;
      background: linear-gradient(to top, var(--bg), transparent)
    }

    .article-cover-emoji {
      position: relative;
      z-index: 1;
      filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .4))
    }

    /* Body layout */
    .article-layout {
      display: grid;
      grid-template-columns: 1fr 280px;
      gap: 4rem;
      align-items: start
    }

    /* ── STICKY SIDEBAR WRAPPER ── */
    .article-sidebar {
      position: sticky;
      top: calc(var(--nav-h) + 1.5rem);
      align-self: start;
      max-height: calc(100vh - var(--nav-h) - 3rem);
      overflow-y: auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      /* hide scrollbar visually but keep it functional */
      scrollbar-width: none;
    }

    .article-sidebar::-webkit-scrollbar {
      display: none;
    }

    /* ── TOC CARD ── */
    .toc-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 4px 24px rgba(0, 0, 0, .15);
      flex-shrink: 0;
    }

    .toc-header {
      padding: 1rem 1.2rem;
      background: var(--surface2);
      border-bottom: 1px solid var(--border);
      font-size: .72rem;
      font-weight: 700;
      color: var(--text2);
      text-transform: uppercase;
      letter-spacing: .1em;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .toc-header-icon {
      font-size: 1rem
    }

    .toc-body {
      padding: .7rem .6rem
    }

    .toc-item {
      display: flex;
      align-items: flex-start;
      gap: .55rem;
      padding: .48rem .6rem;
      border-radius: 8px;
      cursor: pointer;
      transition: all var(--tr);
      font-size: .8rem;
      color: var(--muted);
      line-height: 1.35;
      border-left: 2px solid transparent;
    }

    .toc-item:hover {
      background: var(--chai-dim);
      color: var(--text);
      border-left-color: var(--border2)
    }

    .toc-item.active {
      background: var(--chai-dim);
      color: var(--chai-lt);
      font-weight: 600;
      border-left-color: var(--chai-lt)
    }

    .toc-num {
      font-family: 'JetBrains Mono', monospace;
      font-size: .66rem;
      color: var(--border2);
      min-width: 1.4rem;
      margin-top: .15rem;
      flex-shrink: 0;
      transition: color var(--tr)
    }

    .toc-item.active .toc-num,
    .toc-item:hover .toc-num {
      color: var(--chai-lt)
    }

    /* ── PROGRESS CARD ── */
    .progress-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.4rem;
      box-shadow: 0 4px 24px rgba(0, 0, 0, .15);
      overflow: hidden;
      position: relative;
      flex-shrink: 0;
    }

    .progress-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at top right, var(--chai-glow), transparent 70%);
      pointer-events: none;
    }

    .progress-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.1rem;
    }

    .progress-card-label {
      font-size: .72rem;
      font-weight: 700;
      color: var(--text2);
      text-transform: uppercase;
      letter-spacing: .09em
    }

    .progress-pct {
      font-family: 'Playfair Display', serif;
      font-size: 1.8rem;
      font-weight: 900;
      color: var(--chai-lt);
      line-height: 1;
      text-shadow: 0 0 20px rgba(217, 119, 6, .3);
    }

    /* Circular ring */
    .progress-ring-wrap {
      display: flex;
      justify-content: center;
      margin: 1rem 0
    }

    .progress-ring-svg {
      width: 90px;
      height: 90px;
      transform: rotate(-90deg)
    }

    .progress-ring-track {
      fill: none;
      stroke: var(--surface2);
      stroke-width: 7
    }

    .progress-ring-fill {
      fill: none;
      stroke: url(#progressGrad);
      stroke-width: 7;
      stroke-linecap: round;
      stroke-dasharray: 226;
      stroke-dashoffset: 226;
      transition: stroke-dashoffset .2s ease;
    }

    .progress-ring-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-family: 'Playfair Display', serif;
      font-size: 1.1rem;
      font-weight: 900;
      color: var(--chai-lt);
      text-align: center;
      line-height: 1;
    }

    .progress-ring-sub {
      font-family: 'JetBrains Mono', monospace;
      font-size: .55rem;
      color: var(--muted);
      display: block;
      margin-top: .15rem
    }

    .progress-ring-container {
      position: relative;
      width: 90px;
      height: 90px;
      margin: 0 auto
    }

    /* Track bar */
    .progress-track {
      height: 5px;
      background: var(--surface2);
      border-radius: 100px;
      overflow: hidden;
      margin: 1rem 0 .7rem
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--chai), var(--chai-lt), #fbbf24);
      border-radius: 100px;
      transition: width .15s ease;
      box-shadow: 0 0 10px rgba(217, 119, 6, .5)
    }

    /* Milestones */
    .milestones {
      display: flex;
      justify-content: space-between;
      margin-bottom: 1rem;
      position: relative
    }

    .milestones::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 1px;
      background: var(--border);
      transform: translateY(-50%);
      z-index: 0
    }

    .milestone {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 2px solid var(--border);
      background: var(--surface2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .6rem;
      z-index: 1;
      transition: all .3s ease;
      cursor: default;
      position: relative;
    }

    .milestone.reached {
      border-color: var(--chai-lt);
      background: var(--chai-dim);
      color: var(--chai-lt)
    }

    .milestone.reached::after {
      content: '✓';
      font-size: .6rem;
      font-weight: 700
    }

    .milestone:not(.reached)::after {
      content: attr(data-label);
      font-family: 'JetBrains Mono', monospace;
      font-size: .55rem;
      color: var(--muted)
    }

    .milestone-labels {
      display: flex;
      justify-content: space-between;
      font-family: 'JetBrains Mono', monospace;
      font-size: .6rem;
      color: var(--muted);
      margin-bottom: 1rem
    }

    /* Status message */
    .progress-status {
      font-family: 'JetBrains Mono', monospace;
      font-size: .72rem;
      color: var(--muted);
      text-align: center;
      padding: .6rem;
      background: var(--surface2);
      border-radius: 8px;
      line-height: 1.4;
    }

    .progress-status .status-emoji {
      font-size: .9rem;
      display: block;
      margin-bottom: .2rem
    }

    /* Time remaining */
    .time-remaining {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: .8rem;
      padding-top: .8rem;
      border-top: 1px solid var(--border);
      font-size: .71rem;
      font-family: 'JetBrains Mono', monospace;
      color: var(--muted);
    }

    .time-val {
      color: var(--text);
      font-weight: 600
    }

    /* ── MOBILE FLOATING PROGRESS PILL ── */
    .mobile-progress-pill {
      display: none;
      position: fixed;
      bottom: 1.5rem;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 100px;
      padding: .55rem 1.2rem;
      z-index: 400;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
      align-items: center;
      gap: .8rem;
      transition: transform .4s cubic-bezier(.4, 0, .2, 1);
      min-width: 200px;
    }

    .mobile-progress-pill.visible {
      transform: translateX(-50%) translateY(0)
    }

    .pill-bar-wrap {
      flex: 1;
      height: 4px;
      background: var(--surface2);
      border-radius: 100px;
      overflow: hidden
    }

    .pill-bar-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--chai), var(--chai-lt));
      border-radius: 100px;
      transition: width .15s ease
    }

    .pill-pct {
      font-family: 'JetBrains Mono', monospace;
      font-size: .75rem;
      font-weight: 700;
      color: var(--chai-lt);
      white-space: nowrap
    }

    .pill-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: .68rem;
      color: var(--muted);
      white-space: nowrap
    }

    /* ── ARTICLE BODY ── */
    .article-content {
      min-width: 0;
      padding-bottom: 3rem
    }

    .article-content h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.7rem;
      font-weight: 800;
      letter-spacing: -.022em;
      line-height: 1.2;
      margin: 3.2rem 0 1.1rem;
      padding-top: .5rem;
      color: var(--text);
      scroll-margin-top: calc(var(--nav-h) + 1.5rem);
      border-top: 1px solid var(--border);
      padding-top: 1.8rem;
    }

    .article-content h2:first-child {
      border-top: none;
      padding-top: 0;
      margin-top: 0
    }

    .article-content h3 {
      font-family: 'Playfair Display', serif;
      font-size: 1.22rem;
      font-weight: 700;
      letter-spacing: -.01em;
      line-height: 1.3;
      margin: 2rem 0 .8rem;
      color: var(--text);
      scroll-margin-top: calc(var(--nav-h) + 1.5rem);
    }

    .article-content p {
      font-size: 1.05rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.9;
      margin-bottom: 1.5rem
    }

    .article-content strong {
      color: var(--text);
      font-weight: 600
    }

    .article-content em {
      color: var(--chai-lt);
      font-style: italic
    }

    .article-content a {
      color: var(--chai-lt);
      text-decoration: underline;
      text-underline-offset: 3px
    }

    .article-content ul,
    .article-content ol {
      color: var(--text2);
      font-size: 1.02rem;
      font-weight: 300;
      line-height: 1.85;
      margin: 0 0 1.5rem 1.5rem
    }

    .article-content li {
      margin-bottom: .55rem
    }

    .article-content pre {
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 12px;
      padding: 1.6rem 1.5rem;
      overflow-x: auto;
      margin: 2rem 0;
      position: relative
    }

    .code-lang {
      position: absolute;
      top: .8rem;
      right: 1rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: .62rem;
      color: var(--muted);
      letter-spacing: .06em;
      text-transform: uppercase;
      background: var(--surface);
      border: 1px solid var(--border);
      padding: .15rem .5rem;
      border-radius: 4px
    }

    .article-content code {
      font-family: 'JetBrains Mono', monospace;
      font-size: .82rem;
      line-height: 1.75;
      color: var(--text)
    }

    .article-content p code,
    .article-content li code {
      background: var(--surface2);
      border: 1px solid var(--border);
      padding: .12em .45em;
      border-radius: 4px;
      font-size: .87em;
      color: var(--chai-lt)
    }

    .callout {
      border-left: 3px solid var(--chai);
      background: var(--chai-dim);
      border-radius: 0 10px 10px 0;
      padding: 1.2rem 1.5rem;
      margin: 2rem 0
    }

    .callout-title {
      font-weight: 700;
      font-size: .85rem;
      color: var(--chai-lt);
      margin-bottom: .5rem;
      display: flex;
      align-items: center;
      gap: .4rem
    }

    .callout p {
      margin-bottom: 0;
      font-size: .95rem
    }

    /* ── ARTICLE FOOTER ── */
    .article-end {
      margin-top: 4rem;
      padding-top: 3rem;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1.5rem
    }

    .article-tags {
      display: flex;
      gap: .5rem;
      flex-wrap: wrap
    }

    .article-tag {
      font-family: 'JetBrains Mono', monospace;
      font-size: .71rem;
      padding: .28rem .7rem;
      border-radius: 4px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      color: var(--text2)
    }

    .article-share {
      display: flex;
      gap: .7rem;
      align-items: center
    }

    .share-label {
      font-size: .78rem;
      color: var(--muted)
    }

    .share-btn {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .9rem;
      cursor: pointer;
      transition: all var(--tr)
    }

    .share-btn:hover {
      border-color: var(--chai);
      background: var(--chai-dim)
    }

    /* Finished banner */
    .finished-banner {
      display: none;
      margin: 2rem 0;
      padding: 1.5rem 2rem;
      background: linear-gradient(135deg, rgba(217, 119, 6, .15), rgba(251, 191, 36, .08));
      border: 1px solid rgba(217, 119, 6, .35);
      border-radius: 14px;
      text-align: center;
    }

    .finished-banner.show {
      display: block;
      animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1)
    }

    @keyframes popIn {
      from {
        opacity: 0;
        transform: scale(.9)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    .finished-banner-emoji {
      font-size: 2.5rem;
      margin-bottom: .5rem
    }

    .finished-banner-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.3rem;
      font-weight: 800;
      color: var(--chai-lt);
      margin-bottom: .3rem
    }

    .finished-banner-sub {
      font-size: .87rem;
      color: var(--text2);
      font-weight: 300
    }

    /* Nav */
    .article-nav {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
      margin-top: 2.5rem
    }

    .art-nav-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.3rem;
      cursor: pointer;
      transition: all var(--tr)
    }

    .art-nav-card:hover {
      border-color: var(--chai);
      transform: translateY(-3px);
      box-shadow: 0 8px 30px rgba(0, 0, 0, .3)
    }

    .art-nav-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: .67rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .08em;
      margin-bottom: .5rem;
      display: flex;
      align-items: center;
      gap: .3rem
    }

    .art-nav-title {
      font-family: 'Playfair Display', serif;
      font-size: .95rem;
      font-weight: 700;
      line-height: 1.35;
      color: var(--text)
    }

    .art-nav-card.next {
      text-align: right
    }

    .art-nav-card.next .art-nav-label {
      justify-content: flex-end
    }

    /* Responsive */
    @media(max-width:960px) {
      .article-layout {
        grid-template-columns: 1fr
      }

      .toc-card,
      .progress-card {
        display: none
      }

      .mobile-progress-pill {
        display: flex
      }

      .article-cover {
        height: 280px;
        font-size: 5rem;
        border-radius: 14px
      }
    }

    @media(max-width:600px) {
      .article-hero-title {
        font-size: 1.65rem
      }

      .article-content h2 {
        font-size: 1.3rem
      }

      .article-content h3 {
        font-size: 1.1rem
      }

      .article-content p,
      .article-content ul,
      .article-content ol {
        font-size: .97rem
      }

      .article-nav {
        grid-template-columns: 1fr
      }

      .art-nav-card.next {
        text-align: left
      }

      .art-nav-card.next .art-nav-label {
        justify-content: flex-start
      }

      .article-cover {
        height: 200px;
        font-size: 3.5rem
      }

      .article-end {
        flex-direction: column;
        align-items: flex-start
      }

      .article-page {
        padding-bottom: 7rem
      }
    }


    /* ── FINISHED BANNER ── */
    .finished-banner {
      display: none;
      margin: 2.5rem 0;
      padding: 2rem;
      background: linear-gradient(135deg, rgba(217, 119, 6, .12), rgba(251, 191, 36, .06));
      border: 1px solid rgba(217, 119, 6, .4);
      border-radius: 16px;
      text-align: center
    }

    .finished-banner.show {
      display: block;
      animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1)
    }

    @keyframes popIn {
      from {
        opacity: 0;
        transform: scale(.92)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    .finished-banner-emoji {
      font-size: 2.8rem;
      margin-bottom: .6rem
    }

    .finished-banner-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      font-weight: 900;
      color: var(--chai-lt);
      margin-bottom: .4rem
    }

    .finished-banner-sub {
      font-size: .88rem;
      color: var(--text2);
      font-weight: 300
    }

    /* ══ SEARCH MODAL ══ */
    .search-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .8);
      backdrop-filter: blur(8px);
      z-index: 800;
      opacity: 0;
      visibility: hidden;
      transition: all .25s
    }

    .search-overlay.open {
      opacity: 1;
      visibility: visible
    }

    .search-box {
      position: absolute;
      top: 12%;
      left: 50%;
      transform: translateX(-50%);
      width: min(680px, 92vw);
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 40px 80px rgba(0, 0, 0, .6)
    }

    .search-input-wrap {
      display: flex;
      align-items: center;
      gap: .8rem;
      padding: 1.1rem 1.4rem;
      border-bottom: 1px solid var(--border)
    }

    .search-input-wrap svg {
      width: 18px;
      height: 18px;
      stroke: var(--muted);
      fill: none;
      stroke-width: 2;
      flex-shrink: 0
    }

    .search-main-input {
      flex: 1;
      background: none;
      border: none;
      outline: none;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 1rem;
      color: var(--text)
    }

    .search-main-input::placeholder {
      color: var(--muted)
    }

    .search-close {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      background: var(--surface2);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: .75rem;
      color: var(--muted);
      flex-shrink: 0;
      transition: all var(--tr)
    }

    .search-close:hover {
      border-color: var(--chai);
      color: var(--chai-lt)
    }

    .search-results {
      max-height: 440px;
      overflow-y: auto;
      padding: .6rem
    }

    .search-result-item {
      display: flex;
      gap: 1rem;
      align-items: flex-start;
      padding: .9rem .8rem;
      border-radius: 8px;
      cursor: pointer;
      transition: background var(--tr)
    }

    .search-result-item:hover {
      background: var(--surface2)
    }

    .search-result-icon {
      font-size: 1.5rem;
      flex-shrink: 0;
      margin-top: .1rem
    }

    .search-result-body {
      flex: 1;
      min-width: 0
    }

    .search-result-title {
      font-family: 'Playfair Display', serif;
      font-size: .95rem;
      font-weight: 700;
      color: var(--text);
      margin-bottom: .2rem;
      line-height: 1.3
    }

    .search-result-meta {
      font-family: 'JetBrains Mono', monospace;
      font-size: .7rem;
      color: var(--muted)
    }

    .search-result-badge {
      display: inline-block;
      font-size: .62rem;
      padding: .15rem .5rem;
      border-radius: 3px;
      margin-right: .4rem
    }

    .search-empty {
      padding: 2.5rem;
      text-align: center;
      color: var(--muted);
      font-size: .9rem
    }

    .search-empty-icon {
      font-size: 2.5rem;
      margin-bottom: .8rem
    }

    .search-shortcuts {
      display: flex;
      gap: 1.5rem;
      padding: .8rem 1.4rem;
      border-top: 1px solid var(--border);
      background: var(--surface2)
    }

    .search-shortcut {
      font-family: 'JetBrains Mono', monospace;
      font-size: .68rem;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: .35rem
    }

    .kbd {
      background: var(--bg);
      border: 1px solid var(--border2);
      border-radius: 4px;
      padding: .1rem .4rem;
      font-size: .65rem
    }

    /* ══ SPONSOR PAGE ══ */
    .sponsor-hero {
      text-align: center;
      max-width: 640px;
      margin: 0 auto;
      padding-bottom: 4rem
    }

    .sponsor-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
      margin-bottom: 4rem
    }

    .sponsor-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 2rem;
      text-align: center;
      transition: all var(--tr)
    }

    .sponsor-card:hover {
      border-color: var(--chai);
      transform: translateY(-3px)
    }

    .sponsor-card-icon {
      font-size: 2.5rem;
      margin-bottom: 1rem
    }

    .sponsor-card-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.1rem;
      font-weight: 800;
      margin-bottom: .5rem
    }

    .sponsor-card-price {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--chai-lt);
      margin-bottom: .5rem
    }

    .sponsor-card-desc {
      font-size: .83rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.7;
      margin-bottom: 1.4rem
    }

    .sponsor-card-btn {
      display: block;
      padding: .65rem 1.2rem;
      background: var(--chai);
      color: #fff;
      border-radius: var(--radius);
      font-size: .84rem;
      font-weight: 600;
      text-align: center;
      transition: all var(--tr)
    }

    .sponsor-card-btn:hover {
      background: var(--chai-lt)
    }

    .sponsor-logos {
      text-align: center;
      padding-top: 3rem;
      border-top: 1px solid var(--border)
    }

    .sponsor-logos-title {
      font-size: .75rem;
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      letter-spacing: .1em;
      text-transform: uppercase;
      margin-bottom: 2rem
    }

    .sponsor-logo-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: center;
      align-items: center
    }

    .sponsor-logo-item {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: .7rem 1.4rem;
      font-size: .85rem;
      font-weight: 600;
      color: var(--text2)
    }

    /* ══ PRIVACY PAGE ══ */
    .privacy-layout {
      max-width: 740px;
      margin: 0 auto
    }

    .privacy-layout h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      font-weight: 800;
      margin: 2.5rem 0 .8rem;
      color: var(--text)
    }

    .privacy-layout p {
      font-size: .97rem;
      color: var(--text2);
      font-weight: 300;
      line-height: 1.85;
      margin-bottom: 1.2rem
    }

    .privacy-layout ul {
      color: var(--text2);
      font-size: .97rem;
      font-weight: 300;
      line-height: 1.85;
      margin: 0 0 1.2rem 1.5rem
    }

    .privacy-layout li {
      margin-bottom: .35rem
    }

    .privacy-date {
      font-family: 'JetBrains Mono', monospace;
      font-size: .75rem;
      color: var(--muted);
      margin-bottom: 2.5rem
    }

    /* ══ TOAST NOTIFICATION ══ */
    .toast {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 10px;
      padding: .9rem 1.3rem;
      display: flex;
      align-items: center;
      gap: .7rem;
      font-size: .85rem;
      font-weight: 500;
      z-index: 900;
      transform: translateY(120%);
      transition: transform .35s cubic-bezier(.4, 0, .2, 1);
      box-shadow: 0 16px 40px rgba(0, 0, 0, .4)
    }

    .toast.show {
      transform: translateY(0)
    }

    .toast-icon {
      font-size: 1.1rem
    }

    @media(max-width:600px) {
      .sponsor-grid {
        grid-template-columns: 1fr
      }

      .search-box {
        top: 5%;
        width: 96vw
      }
    }
  

/* WordPress integration */
.admin-bar .nav { top: 32px; }
.wp-site-main { min-height: 60vh; }
body.page { display: block !important; }
.page.active { display: block !important; }
.blog-main { min-width: 0; }
.blog-layout > .blog-main { grid-column: 1; }
.blog-layout > .sidebar { grid-column: 2; }
.footer-main ul { list-style: none; padding: 0; margin: 0; }
.footer-main form { display: grid; gap: .75rem; }
.article-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 900; line-height: 1.08; letter-spacing: 0; margin: 0 0 1rem; max-width: 980px; }
.article-kicker { color: var(--chai-lt); font-weight: 700; margin-bottom: 1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .75rem; color: var(--text2); font-weight: 500; }
.article-layout > .article-content { grid-column: 1; max-width: 780px; width: 100%; }
.article-layout > .article-sidebar { grid-column: 2; min-width: 0; }
.article-content.entry-content { font-size: 1.05rem; }
.article-content.entry-content > *:first-child { margin-top: 0; }
.article-content pre.wp-block-preformatted:empty,
.article-content pre.wp-block-preformatted.cwc-empty-pre {
  display: none !important;
}
.article-content pre.wp-block-code,
.article-content pre.cwc-merged-code,
.article-content .wp-block-code,
.article-content pre.wp-block-preformatted {
  display: block;
  margin: 1.5rem 0;
  padding: 1.2rem 1.35rem;
  min-height: 0;
  white-space: pre;
  line-height: 1.65;
}
.article-content pre.wp-block-code code,
.article-content pre.cwc-merged-code code,
.article-content .wp-block-code code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  white-space: pre;
}
.article-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.article-tags a { border: 1px solid var(--border); background: var(--surface); color: var(--chai-lt); padding: .35rem .75rem; border-radius: 999px; }
.cwc-about-profile { max-width: 820px; }
.cwc-about-profile h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; margin: 2rem 0 1rem; }
.cwc-about-profile p, .cwc-about-profile li { color: var(--text2); font-size: 1.05rem; line-height: 1.9; }
.cwc-about-profile ul { margin: 1rem 0 2rem 1.2rem; }
@media(max-width:960px){ .article-layout > .article-content, .article-layout > .article-sidebar { grid-column: auto; max-width: none; } }
.hero, .section, .footer { background-color: transparent; }
.hero-content, .hero-visual, .section-head, .newsletter-strip, .footer { visibility: visible; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.wp-block-image img, .entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.entry-content iframe { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: .8rem; }
.entry-content pre { overflow-x: auto; }
.wp-pagenavi, .pagination { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin: 3rem 0 0; }
.page-numbers {
  border: 1px solid var(--border);
  color: var(--text2);
  padding: .7rem 1rem;
  text-decoration: none;
  background: var(--surface);
  transition: var(--tr);
}
.page-numbers.current, .page-numbers:hover { color: var(--chai-lt); border-color: var(--chai); background: var(--chai-dim); }
.comment-list { list-style: none; padding: 0; }
.comment-body { border: 1px solid var(--border); background: var(--surface); padding: 1.2rem; margin-bottom: 1rem; border-radius: var(--radius); }
.comment-reply-link { color: var(--chai-lt); }
.comment-form input, .comment-form textarea, .search-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1rem;
  border-radius: var(--radius);
}
.comment-form .submit, .search-submit {
  background: var(--chai);
  color: #fff;
  border: 0;
  padding: .95rem 1.3rem;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}
.cwc-response { margin-top: .75rem; color: var(--chai-lt); font-size: .9rem; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }

/* V8 responsive and real-content hardening */
.nav-inner { min-width: 0; }
.nav-links { min-width: 0; }
.nav-right { min-width: 0; }
.btn-primary,
.btn-secondary,
.btn-nav,
.btn-full,
.nl-submit,
.form-submit {
  text-align: center;
  line-height: 1.2;
}
.article-content img,
.entry-content img,
.article-content iframe,
.entry-content iframe {
  max-width: 100%;
}
.cwc-stat-muted {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .nav-inner {
    gap: 1.2rem;
  }
  .nav-links a {
    padding-inline: .55rem;
  }
  .nav-right {
    gap: .6rem;
  }
}

@media (max-width: 860px) {
  .nav {
    height: 64px;
  }
  :root {
    --nav-h: 64px;
  }
  .nav-inner {
    padding: 0 1rem;
  }
  .nav-logo {
    font-size: 1.15rem;
  }
  .nav-links,
  .nav-right {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .mobile-nav {
    display: block !important;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .hero {
    min-height: auto;
  }
  .hero-main {
    padding: 3.5rem 0 2rem;
  }
  .hero-main .container {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .hero-title {
    font-size: clamp(2.35rem, 12vw, 4rem);
  }
  .hero-ctas,
  .nl-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary,
  .btn-secondary {
    justify-content: center;
    width: 100%;
  }
  .stats-bar .container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .stat-item {
    min-width: 0;
    padding: 1rem .75rem;
  }
  .topics .container {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .4rem;
  }
  .topic-pill,
  .filter-btn {
    white-space: nowrap;
  }
  .articles-grid {
    grid-template-columns: 1fr !important;
  }
  .article-card.featured {
    grid-column: auto;
  }
  .blog-layout {
    grid-template-columns: 1fr !important;
  }
  .blog-layout > .blog-main,
  .blog-layout > .sidebar,
  .article-layout > .article-content,
  .article-layout > .article-sidebar {
    grid-column: auto !important;
    max-width: none;
  }
  .blog-list-card {
    flex-direction: column;
  }
  .blog-list-img {
    width: 100%;
    min-height: 120px;
  }
  .sidebar,
  .article-sidebar {
    position: static;
    max-height: none;
  }
  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 1rem;
  }
  .section {
    padding: 3.5rem 0;
  }
  .hero-title,
  .page-hero-title,
  .article-title,
  .article-hero-title {
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .stats-bar .container {
    grid-template-columns: 1fr !important;
  }
  .card-body,
  .article-card.featured .card-body,
  .blog-list-card,
  .toc-card,
  .progress-card {
    padding: 1rem;
  }
  .newsletter-strip .container {
    padding-inline: 1rem;
  }
  .article-content p,
  .cwc-about-profile p,
  .cwc-about-profile li {
    font-size: 1rem;
    line-height: 1.8;
  }
  .article-content pre.wp-block-code,
  .article-content pre.cwc-merged-code,
  .article-content .wp-block-code,
  .article-content pre.wp-block-preformatted {
    font-size: .82rem;
    padding: 1rem;
    overflow-x: auto;
  }
}

/* V9: WordPress content must stay visible and clickable even if JS is delayed. */
.js-animate .reveal,
.js-animate .reveal.in,
.reveal {
  opacity: 1 !important;
  transform: none !important;
}
.blog-list-card,
.article-card,
.blog-main,
.blog-list,
.articles-grid {
  visibility: visible !important;
}

/* V10: professional CodeWithChai visual refresh */
:root {
  --bg: #070b12;
  --bg2: #0b111d;
  --surface: #121a28;
  --surface2: #172235;
  --border: #263244;
  --border2: #35455e;
  --chai: #f59e0b;
  --chai-lt: #fbbf24;
  --chai-dim: rgba(245, 158, 11, .12);
  --chai-glow: rgba(245, 158, 11, .08);
  --indigo: #38bdf8;
  --indigo-dim: rgba(56, 189, 248, .12);
  --text: #f8fafc;
  --text2: #b8c2d6;
  --muted: #748199;
  --shadow: rgba(0, 0, 0, .42);
  --radius: 8px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg2: #eef4fb;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --border: #d8e1ee;
  --border2: #b7c4d6;
  --text: #101828;
  --text2: #475467;
  --muted: #667085;
  --shadow: rgba(15, 23, 42, .12);
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, .08), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(245, 158, 11, .08), transparent 30rem),
    var(--bg);
}

.nav {
  background: rgba(7, 11, 18, .86);
  border-bottom-color: rgba(148, 163, 184, .14);
}

[data-theme="light"] .nav {
  background: rgba(248, 250, 252, .9);
}

.nav-logo,
.footer-brand-logo {
  letter-spacing: 0;
}

.btn-primary,
.btn-nav,
.nl-submit,
.form-submit {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  box-shadow: 0 12px 34px rgba(245, 158, 11, .22);
}

.btn-primary:hover,
.btn-nav:hover,
.nl-submit:hover,
.form-submit:hover {
  background: linear-gradient(135deg, #fbbf24, #fb923c);
}

.btn-secondary,
.nav-search,
.theme-toggle,
.article-card,
.blog-list-card,
.sidebar-card,
.toc-card,
.progress-card,
.code-card {
  border-color: rgba(148, 163, 184, .18);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .18);
}

.hero-title {
  letter-spacing: 0;
}

.hero-title .accent,
.section-label,
.page-hero-label,
.article-kicker,
.card-badge {
  color: var(--chai-lt);
}

.page-hero,
.newsletter-strip,
.footer {
  background:
    linear-gradient(180deg, rgba(18, 26, 40, .68), rgba(7, 11, 18, .92));
}

.article-card:hover,
.blog-list-card:hover {
  border-color: rgba(56, 189, 248, .36);
  transform: translateY(-2px);
}

.card-img-inner,
.blog-list-img {
  background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(245, 158, 11, .16));
}

.article-content a,
.entry-content a {
  color: #38bdf8;
  text-decoration-color: rgba(56, 189, 248, .35);
}

/* V11: premium full-site visual system */
:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg2: #0a0f1c;
  --surface: #111827;
  --surface2: #172033;
  --border: rgba(148, 163, 184, .16);
  --border2: rgba(148, 163, 184, .28);
  --chai: #d79a2b;
  --chai-lt: #f0b94f;
  --chai-dim: rgba(215, 154, 43, .13);
  --chai-glow: rgba(215, 154, 43, .10);
  --indigo: #5cc8ff;
  --indigo-dim: rgba(92, 200, 255, .12);
  --text: #f5f7fb;
  --text2: #b6c0d3;
  --muted: #7f8ba3;
  --shadow: rgba(0, 0, 0, .48);
  --radius: 12px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg2: #edf2f8;
  --surface: #ffffff;
  --surface2: #f7f9fc;
  --border: rgba(17, 24, 39, .10);
  --border2: rgba(17, 24, 39, .18);
  --chai: #a96814;
  --chai-lt: #bf7a1b;
  --chai-dim: rgba(191, 122, 27, .10);
  --chai-glow: rgba(191, 122, 27, .08);
  --indigo: #2563eb;
  --indigo-dim: rgba(37, 99, 235, .08);
  --text: #111827;
  --text2: #475467;
  --muted: #667085;
  --shadow: rgba(15, 23, 42, .12);
}

html,
body {
  background: var(--bg) !important;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(92, 200, 255, .12), transparent 34rem),
    radial-gradient(circle at 86% 8%, rgba(215, 154, 43, .12), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--bg2)) !important;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 15% -10%, rgba(37, 99, 235, .09), transparent 32rem),
    radial-gradient(circle at 85% 0%, rgba(191, 122, 27, .09), transparent 32rem),
    linear-gradient(180deg, #f8fafc, #eef3f8) !important;
}

body::after {
  opacity: .18;
}

.nav {
  background: rgba(7, 10, 18, .82) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03);
}

[data-theme="light"] .nav {
  background: rgba(248, 250, 252, .88) !important;
  box-shadow: 0 1px 0 rgba(17, 24, 39, .06), 0 12px 30px rgba(15, 23, 42, .04);
}

.nav-logo,
.footer-brand-logo {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800;
}

.nav-logo .chai,
.footer-brand-logo .chai,
.hero-title .accent {
  color: var(--chai-lt) !important;
}

.nav-links a {
  color: var(--text2);
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(148, 163, 184, .10);
}

.hero,
.page-hero,
.section,
.newsletter-strip,
.footer {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    transparent !important;
}

[data-theme="light"] .hero,
[data-theme="light"] .page-hero,
[data-theme="light"] .section,
[data-theme="light"] .newsletter-strip,
[data-theme="light"] .footer {
  background: transparent !important;
}

.hero-grid {
  opacity: .45;
}

[data-theme="light"] .hero-grid {
  opacity: .55;
}

.hero-title,
.section-title,
.page-hero-title,
.article-title,
.article-hero-title,
.card-title,
.blog-list-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  letter-spacing: 0 !important;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: .94;
  max-width: 900px;
}

.hero-title .outline {
  -webkit-text-stroke: 1px rgba(245, 247, 251, .28) !important;
  color: transparent !important;
}

[data-theme="light"] .hero-title .outline {
  -webkit-text-stroke: 1px rgba(17, 24, 39, .18) !important;
}

.hero-desc,
.page-hero-desc,
.nl-desc,
.card-excerpt,
.blog-list-excerpt,
.footer-brand p,
.article-content p {
  color: var(--text2) !important;
}

.hero-eyebrow,
.section-label,
.page-hero-label,
.article-kicker {
  background: rgba(215, 154, 43, .10) !important;
  border: 1px solid rgba(215, 154, 43, .24) !important;
  color: var(--chai-lt) !important;
}

.code-card,
.article-card,
.blog-list-card,
.sidebar-card,
.toc-card,
.progress-card,
.newsletter-strip,
.contact-form,
.search-box {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 80px var(--shadow) !important;
}

[data-theme="light"] .code-card,
[data-theme="light"] .article-card,
[data-theme="light"] .blog-list-card,
[data-theme="light"] .sidebar-card,
[data-theme="light"] .toc-card,
[data-theme="light"] .progress-card,
[data-theme="light"] .newsletter-strip,
[data-theme="light"] .contact-form,
[data-theme="light"] .search-box {
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08) !important;
}

.btn-primary,
.btn-nav,
.nl-submit,
.form-submit {
  background: linear-gradient(135deg, #f0b94f, #d98723) !important;
  color: #101828 !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  box-shadow: 0 18px 44px rgba(215, 154, 43, .26) !important;
}

.btn-secondary,
.theme-toggle,
.nav-search,
.filter-btn,
.topic-pill,
.page-numbers {
  background: rgba(148, 163, 184, .08) !important;
  border: 1px solid var(--border) !important;
  color: var(--text2) !important;
  border-radius: 10px !important;
}

[data-theme="light"] .btn-secondary,
[data-theme="light"] .theme-toggle,
[data-theme="light"] .nav-search,
[data-theme="light"] .filter-btn,
[data-theme="light"] .topic-pill,
[data-theme="light"] .page-numbers {
  background: rgba(255, 255, 255, .78) !important;
}

.article-card:hover,
.blog-list-card:hover,
.btn-secondary:hover,
.filter-btn:hover,
.topic-pill:hover {
  border-color: rgba(92, 200, 255, .42) !important;
  transform: translateY(-2px);
}

.card-img,
.blog-list-img,
.card-img-inner {
  background:
    linear-gradient(135deg, rgba(92, 200, 255, .16), rgba(215, 154, 43, .14)),
    var(--surface2) !important;
}

.stats-bar {
  background: rgba(255, 255, 255, .018) !important;
  border-block: 1px solid var(--border) !important;
}

[data-theme="light"] .stats-bar {
  background: rgba(255, 255, 255, .60) !important;
}

.stat-num {
  color: var(--text) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.stat-label,
.footer-col-title {
  color: var(--muted) !important;
}

.footer {
  border-top: 1px solid var(--border) !important;
}

.footer-links-list a,
.footer a {
  color: var(--text2);
}

.footer-links-list a:hover,
.footer a:hover {
  color: var(--chai-lt);
}

.form-input,
.nl-input,
.search-main-input,
.search-field,
.comment-form input,
.comment-form textarea {
  background: rgba(148, 163, 184, .08) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 10px !important;
}

[data-theme="light"] .form-input,
[data-theme="light"] .nl-input,
[data-theme="light"] .search-main-input,
[data-theme="light"] .search-field,
[data-theme="light"] .comment-form input,
[data-theme="light"] .comment-form textarea {
  background: rgba(255, 255, 255, .86) !important;
}

.article-content pre.wp-block-code,
.article-content pre.cwc-merged-code,
.article-content .wp-block-code,
.article-content pre.wp-block-preformatted {
  background: #0b1220 !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  border-radius: 14px !important;
}

[data-theme="light"] .article-content pre.wp-block-code,
[data-theme="light"] .article-content pre.cwc-merged-code,
[data-theme="light"] .article-content .wp-block-code,
[data-theme="light"] .article-content pre.wp-block-preformatted {
  background: #111827 !important;
  color: #f8fafc !important;
}

@media (max-width: 860px) {
  .hero-title {
    font-size: clamp(2.6rem, 13vw, 4.8rem);
  }
  .hero-main {
    padding-top: 3rem !important;
  }
  .code-card {
    max-height: 360px;
    overflow: hidden;
  }
}

/* V12: polish footer leak and blog sidebar rhythm */
body:not(.single-post) .mobile-progress-pill,
body:not(.single-post) #mobilePill,
body:not(.single-post) .read-progress,
body:not(.single-post) #readProgress,
body:not(.single-post) .progress-card,
body:not(.single-post) .article-sidebar {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.blog .page-hero {
  padding-bottom: clamp(3.25rem, 6vw, 5.5rem) !important;
}

.blog .section {
  padding-top: clamp(3.5rem, 6vw, 5rem) !important;
}

.blog-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  gap: clamp(2rem, 4vw, 3.25rem) !important;
  align-items: start !important;
}

.blog-main {
  min-width: 0;
}

.blog-filters {
  margin-bottom: 2.2rem !important;
}

.blog-list {
  gap: 1rem !important;
}

.blog-list-card {
  min-height: 150px;
  padding: 1.1rem !important;
  align-items: center !important;
  border-radius: 14px !important;
}

.blog-list-img {
  width: 118px !important;
  min-height: 96px !important;
  height: auto !important;
  align-self: stretch !important;
  border-radius: 10px !important;
}

.blog-list-title {
  max-width: 820px;
}

.blog-list-excerpt {
  max-width: 760px;
}

.sidebar {
  gap: 1rem !important;
  top: calc(var(--nav-h) + 1.25rem) !important;
}

.sidebar-card {
  border-radius: 18px !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
    rgba(20, 22, 28, .82) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28) !important;
}

[data-theme="light"] .sidebar-card {
  background: rgba(255, 255, 255, .88) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08) !important;
}

.sidebar-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.15rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018)) !important;
  color: var(--text) !important;
  font-size: .72rem !important;
  letter-spacing: .1em !important;
}

.sidebar-card-header span:first-child {
  color: var(--text) !important;
  font-weight: 800 !important;
}

.sidebar-card-header span:last-child {
  color: var(--chai-lt) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: .64rem !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
  opacity: .86;
}

.sidebar-card-body {
  padding: 1.05rem 1.15rem 1.15rem !important;
}

.sidebar-topic-cloud {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .5rem !important;
}

.sidebar-topic-cloud .filter-btn {
  margin: 0 !important;
  padding: .45rem .72rem !important;
  border-radius: 999px !important;
  font-size: .78rem !important;
  line-height: 1 !important;
}

.sidebar-recent-list {
  padding: .25rem 0 !important;
}

.sidebar-recent-link {
  display: block !important;
  padding: .88rem 1.15rem !important;
  border-bottom: 1px solid var(--border) !important;
  transition: background .2s ease, color .2s ease, transform .2s ease !important;
}

.sidebar-recent-link:last-child {
  border-bottom: 0 !important;
}

.sidebar-recent-link span {
  display: block;
  color: var(--text) !important;
  font-size: .94rem !important;
  font-weight: 750 !important;
  line-height: 1.45 !important;
}

.sidebar-recent-link small {
  display: block;
  margin-top: .35rem;
  color: var(--muted) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: .66rem !important;
  letter-spacing: .02em !important;
}

.sidebar-recent-link:hover {
  background: rgba(215, 154, 43, .08) !important;
  transform: translateX(3px) !important;
}

.sidebar-recent-link:hover span {
  color: var(--chai-lt) !important;
}

@media (max-width: 1100px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 960px) {
  .blog-layout {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }
}

@media (max-width: 680px) {
  .blog .page-hero {
    padding-bottom: 2.5rem !important;
  }

  .blog-list-card {
    display: grid !important;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    gap: .9rem !important;
    padding: .9rem !important;
  }

  .blog-list-img {
    width: 84px !important;
    min-height: 84px !important;
  }

  .blog-list-title {
    font-size: .96rem !important;
  }

  .sidebar {
    grid-template-columns: 1fr !important;
  }
}

/* V13: quieter editorial design pass */
:root {
  --bg: #050816;
  --bg2: #080c18;
  --surface: #11151f;
  --surface2: #171c28;
  --border: rgba(148, 163, 184, .12);
  --border2: rgba(148, 163, 184, .20);
  --chai: #eab84e;
  --chai-lt: #f1c969;
  --chai-dim: rgba(234, 184, 78, .10);
  --chai-glow: rgba(234, 184, 78, .06);
  --indigo: #7867f3;
  --indigo-dim: rgba(120, 103, 243, .10);
  --text: #f7f5ef;
  --text2: #aeb6c5;
  --muted: #707a8d;
  --shadow: rgba(0, 0, 0, .34);
  --radius: 14px;
}

body {
  background:
    radial-gradient(circle at 70% -10%, rgba(234, 184, 78, .07), transparent 28rem),
    linear-gradient(180deg, #070b16 0%, #050816 42%, #070b16 100%) !important;
}

body::after,
.hero-grid,
.hero-eyebrow,
.page-hero-label,
.floating-badge,
.pulse-dot {
  display: none !important;
}

.nav {
  background: rgba(7, 10, 18, .86) !important;
  backdrop-filter: blur(18px);
}

.nav-inner {
  max-width: 1120px !important;
}

.nav-logo,
.footer-brand-logo {
  font-size: 1.05rem !important;
  letter-spacing: -.03em !important;
}

.nav-links {
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem;
  gap: .1rem !important;
}

.nav-links a {
  border-radius: 999px !important;
  padding: .46rem .85rem !important;
  font-size: .82rem !important;
}

.nav-search,
.theme-toggle {
  min-height: 38px !important;
  border-radius: 999px !important;
}

.btn-nav,
.btn-primary,
.nl-submit,
.form-submit {
  background: #eee7da !important;
  color: #11151f !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

.btn-nav:hover,
.btn-primary:hover,
.nl-submit:hover,
.form-submit:hover {
  background: #fff8ea !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  border-radius: 999px !important;
  box-shadow: none !important;
}

.hero {
  min-height: auto !important;
}

.hero-main {
  padding: clamp(6.25rem, 10vw, 8rem) 0 clamp(4.5rem, 7vw, 6.5rem) !important;
}

.hero-main .container {
  max-width: 1120px !important;
  grid-template-columns: minmax(0, .92fr) minmax(320px, .78fr) !important;
  gap: clamp(3rem, 6vw, 5.5rem) !important;
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: clamp(3rem, 6.2vw, 5.9rem) !important;
  line-height: .98 !important;
  max-width: 720px !important;
  letter-spacing: -.045em !important;
  margin-bottom: 1.35rem !important;
}

.hero-title .accent,
.hero-title .outline {
  color: inherit !important;
  -webkit-text-stroke: 0 !important;
  font-style: normal !important;
}

.hero-desc {
  max-width: 620px !important;
  font-size: 1.03rem !important;
  line-height: 1.85 !important;
  margin-bottom: 2rem !important;
}

.code-card {
  transform: none !important;
  max-width: 480px !important;
  margin-left: auto !important;
  background: rgba(17, 21, 31, .78) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .28) !important;
}

.code-card:hover {
  transform: translateY(-2px) !important;
}

.stats-bar,
.topics {
  display: none !important;
}

.section {
  padding-block: clamp(4rem, 7vw, 6rem) !important;
}

.section-label {
  display: inline-block !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--indigo) !important;
  padding: 0 !important;
  font-size: .68rem !important;
  letter-spacing: .16em !important;
  margin-bottom: .85rem !important;
}

.page-hero {
  padding: clamp(6.5rem, 10vw, 8rem) 0 clamp(3.25rem, 6vw, 5rem) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
}

.page-hero::before {
  display: none !important;
}

.page-hero .container,
.section > .container,
.footer .container,
.newsletter-strip > .container {
  max-width: 1120px !important;
}

.page-hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: clamp(2.5rem, 5vw, 4.75rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.045em !important;
  max-width: 820px !important;
}

.entry-content.article-content {
  max-width: 860px !important;
}

.entry-content.article-content h1,
.entry-content.article-content h2,
.entry-content.article-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  letter-spacing: -.025em !important;
  color: var(--text) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.entry-content.article-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem) !important;
  line-height: 1.16 !important;
  margin-top: 2.8rem !important;
}

.contact-form {
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: clamp(1.25rem, 3vw, 2rem) !important;
  background: rgba(17, 21, 31, .74) !important;
  border-radius: 22px !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .25) !important;
}

.form-group {
  gap: .5rem !important;
}

.form-label {
  color: var(--text) !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
}

.form-input,
.nl-input,
.search-main-input {
  min-height: 48px !important;
  background: rgba(255, 255, 255, .035) !important;
  border: 1px solid var(--border2) !important;
  border-radius: 14px !important;
}

textarea.form-input {
  min-height: 150px !important;
}

.form-submit {
  align-self: flex-start !important;
  padding: .78rem 1.35rem !important;
}

.newsletter-strip {
  border-block: 1px solid var(--border) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.nl-perks {
  display: none !important;
}

.footer {
  background: rgba(5, 8, 22, .70) !important;
}

[data-theme="light"] body {
  background: linear-gradient(180deg, #fafafa 0%, #f4f6fb 100%) !important;
}

[data-theme="light"] .btn-nav,
[data-theme="light"] .btn-primary,
[data-theme="light"] .nl-submit,
[data-theme="light"] .form-submit {
  background: #101828 !important;
  color: #fff !important;
}

[data-theme="light"] .contact-form,
[data-theme="light"] .code-card {
  background: rgba(255, 255, 255, .92) !important;
}

@media (max-width: 960px) {
  .nav-links {
    background: transparent;
    border: 0;
    padding: 0;
  }

  .hero-main .container {
    grid-template-columns: 1fr !important;
  }

  .code-card {
    margin-left: 0 !important;
    max-width: 100% !important;
  }
}

@media (max-width: 680px) {
  .hero-main {
    padding-top: 5rem !important;
  }

  .hero-title {
    font-size: clamp(2.4rem, 14vw, 3.6rem) !important;
  }

  .contact-form {
    padding: 1rem !important;
  }
}
