/* ═══════════════════════════════════════════════════════════════
   AstroKamya™ Blog — 2026 Modern Enhancements Layer
   Scroll-Driven Animations · Container Queries · Glassmorphism++
   text-wrap · color-mix() · content-visibility · Micro-motion
   ═══════════════════════════════════════════════════════════════ */

/* ── CASCADE LAYER DECLARATION ── */
@layer blog-modern {

  /* ── ENHANCED CUSTOM PROPERTIES ── */
  :root {
    /* Dynamic color tints via color-mix */
    --gold-soft: color-mix(in oklch, #FFB800 25%, transparent);
    --violet-soft: color-mix(in oklch, #7C3AED 20%, transparent);
    --rose-soft: color-mix(in oklch, #E8367C 15%, transparent);
    --teal-soft: color-mix(in oklch, #06B6D4 15%, transparent);

    /* Gradient interpolation tokens */
    --in-oklch: ;
    --in-oklab: ;

    /* Squircle progressive enhancement */
    --card-radius: 20px;
  }

  @supports (linear-gradient(in oklch, white, black)) {
    :root {
      --in-oklch: in oklch;
      --in-oklab: in oklab;
    }
  }

  @supports (corner-shape: squircle) {
    :root {
      --card-radius: 20px;
    }
    .ak-card,
    .ak-featured-card,
    .ak-search-input,
    .ak-filter-btn {
      corner-shape: squircle;
    }
  }

  /* ── MODERN TYPOGRAPHY ── */
  .ak-hero-title,
  .ak-featured-headline,
  .ak-section-title,
  .ak-article-title {
    text-wrap: balance;
  }

  .ak-hero-subtitle,
  .ak-featured-excerpt,
  .ak-card-excerpt,
  .ak-article-body p {
    text-wrap: pretty;
  }

  /* ── ENHANCED GRADIENT SHIMMER ── */
  .ak-text-gradient {
    background: linear-gradient(110deg var(--in-oklch), #E5A600 0%, #FFB800 20%, #FFCB45 50%, #FFB800 80%, #E5A600 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* ── GLASSMORPHISM UPGRADE — Cards ── */
  .ak-card {
    background: linear-gradient(
      135deg var(--in-oklab),
      rgba(17, 11, 46, 0.55),
      rgba(24, 16, 58, 0.65)
    );
    border: 1px solid rgba(124, 58, 237, 0.12);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.25),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset,
      0 1px 0 rgba(255, 255, 255, 0.06) inset;
    transition:
      transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
      border-color 0.35s ease;
  }

  .ak-card:hover {
    border-color: rgba(255, 184, 0, 0.25);
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.4),
      0 0 40px rgba(255, 184, 0, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 1px 0 rgba(255, 255, 255, 0.1) inset;
    transform: translateY(-8px) scale(1.015);
  }

  /* ── FEATURED CARD — Animated gradient border ── */
  .ak-featured-card {
    position: relative;
    background: linear-gradient(
      160deg var(--in-oklab),
      rgba(17, 11, 46, 0.6),
      rgba(24, 16, 58, 0.7)
    );
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
    overflow: hidden;
  }

  .ak-featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: conic-gradient(
      from 0deg var(--in-oklch),
      rgba(255, 184, 0, 0.3),
      rgba(124, 58, 237, 0.3),
      rgba(232, 54, 124, 0.2),
      rgba(6, 182, 212, 0.2),
      rgba(255, 184, 0, 0.3)
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .ak-featured-card:hover::before {
    opacity: 1;
    animation: rotateGradient 4s linear infinite;
  }

  @keyframes rotateGradient {
    to {
      filter: hue-rotate(360deg);
    }
  }

  /* ── CARD IMAGE — Enhanced hover ── */
  .ak-card-img {
    aspect-ratio: 4/3;
    object-fit: cover;
  }

  .ak-card:hover .ak-card-img {
    transform: scale(1.08);
    filter: brightness(1.05);
  }

  /* ── CARD CATEGORY BADGES — Glow on hover ── */
  .ak-card:hover .ak-card-cat-badge {
    box-shadow: 0 0 16px currentColor;
  }

  .ak-card-cat-badge {
    transition: box-shadow 0.4s ease;
  }

  /* ── FILTER PILLS — Enhanced micro-interaction ── */
  .ak-filter-btn {
    transition:
      all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-block-size: 44px;
    min-inline-size: 44px;
  }

  .ak-filter-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
  }

  .ak-filter-btn.active {
    background: linear-gradient(135deg var(--in-oklch), #F0EAFF, #E8E0FF);
    box-shadow:
      0 4px 16px rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }

  /* ── CONTAINER QUERIES — Responsive cards ── */
  .ak-grid {
    container-type: inline-size;
    container-name: blog-grid;
  }

  @container blog-grid (max-width: 480px) {
    .ak-card-visual {
      height: 180px;
    }
    .ak-card-title {
      font-size: 17px;
    }
    .ak-card-excerpt {
      -webkit-line-clamp: 2;
    }
  }

  @container blog-grid (min-width: 800px) {
    .ak-card-visual {
      height: 240px;
    }
  }

  /* ── SCROLL-DRIVEN CARD REVEAL ANIMATIONS ── */
  @media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
      @keyframes cardReveal {
        from {
          opacity: 0;
          transform: translateY(40px) scale(0.96);
        }
      }

      .ak-card {
        animation: cardReveal auto ease-out backwards;
        animation-timeline: view();
        animation-range: entry 0% entry 100%;
        will-change: transform, opacity;
        transform: translateZ(0);
      }

      /* Override the JS-based stagger animation since we use CSS scroll-driven */
      .stagger-item {
        opacity: 1 !important;
        transform: none !important;
      }

      /* Featured section reveal */
      @keyframes sectionReveal {
        from {
          opacity: 0;
          transform: translateY(50px);
        }
      }

      .ak-featured-section,
      .ak-latest-section {
        animation: sectionReveal auto ease-out backwards;
        animation-timeline: view();
        animation-range: entry 0% entry 80%;
      }

      .fade-up-element {
        opacity: 1 !important;
        transform: none !important;
      }
    }
  }

  /* ── SCROLL-DRIVEN ANIMATIONS FALLBACK (Firefox) ── */
  @media (prefers-reduced-motion: no-preference) {
    @supports not ((animation-timeline: view()) and (animation-range: entry)) {
      /* Keep the existing IntersectionObserver-based approach (already in JS) */
      .stagger-item,
      .fade-up-element {
        /* Styles already defined in blog.css */
      }
    }
  }

  /* ── HERO PARALLAX ── */
  @media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
      @keyframes heroParallax {
        from {
          transform: scale(1.15) translateY(-30px);
        }
        to {
          transform: scale(1) translateY(0);
        }
      }

      .ak-hero-bg-img {
        animation: heroParallax linear both;
        animation-timeline: view();
        animation-range: exit 0% exit 100%;
        will-change: transform;
        transform: translateZ(0);
      }
    }
  }

  /* ── PERFORMANCE OPTIMIZATIONS ── */
  .ak-latest-section,
  .ak-global-newsletter {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
  }

  .ak-card {
    contain: layout style paint;
  }

  /* ── READING PROGRESS BAR — Enhanced ── */
  .ak-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(
      90deg var(--in-oklch),
      #7C3AED,
      #E8367C,
      #FFB800
    );
    z-index: 10000;
    pointer-events: none;
    transition: width 0.15s linear;
    box-shadow: 0 0 16px rgba(255, 184, 0, 0.6);
  }

  /* ── POST COUNT BADGE ── */
  .ak-post-count {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
  }

  /* ── NO RESULTS — Enhanced ── */
  .ak-no-results {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-2);
  }

  .ak-no-results-icon {
    font-size: 56px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
  }

  .ak-no-results h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text-1);
    margin-bottom: 8px;
  }

  /* ── AUTHOR AVATAR — Gradient ring animation ── */
  .ak-author-avatar {
    position: relative;
    background: linear-gradient(135deg var(--in-oklch), rgba(255, 184, 0, 0.12), rgba(124, 58, 237, 0.12));
  }

  /* ── ARROW BUTTON — Spring animation ── */
  .ak-arrow-btn {
    transition:
      all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .ak-card:hover .ak-arrow-btn {
    transform: translateX(5px);
    box-shadow: 0 6px 18px rgba(255, 184, 0, 0.35);
  }

  /* ── SEARCH INPUT — Enhanced focus ── */
  .ak-search-input:focus {
    border-color: rgba(255, 184, 0, 0.5);
    box-shadow:
      0 0 0 4px rgba(255, 184, 0, 0.08),
      0 16px 40px rgba(0, 0, 0, 0.3);
  }

  /* ── NEWSLETTER SECTION — Floating glow ── */
  .ak-global-newsletter {
    position: relative;
  }

  .ak-global-nl-input:user-valid {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  }

  .ak-global-nl-input:user-invalid {
    border-color: rgba(239, 68, 68, 0.3);
  }

  /* ── HERO V2 STYLES (used by blog index) ── */
  .ak-hero-v2 {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px 60px;
    overflow: hidden;
  }

  .ak-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
  }

  .ak-hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .ak-hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(10, 6, 24, 0.55) 0%,
      rgba(10, 6, 24, 0.45) 40%,
      rgba(10, 6, 24, 0.75) 75%,
      rgba(10, 6, 24, 0.95) 100%
    );
  }

  .ak-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ak-hero-v2 .ak-hero-title {
    text-shadow: 0 4px 24px rgba(10, 6, 24, 0.8), 0 0 40px rgba(10, 6, 24, 0.4);
  }

  .ak-hero-v2 .ak-hero-subtitle {
    text-shadow: 0 2px 12px rgba(10, 6, 24, 0.8);
  }

  /* ── HERO STATS BAR ── */
  .ak-hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 48px;
    background: rgba(17, 11, 46, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 32px;
  }

  .ak-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
  }

  .ak-stat-num {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
  }

  .ak-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-top: 4px;
  }

  .ak-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
  }

  /* ── BREADCRUMB ── */
  .ak-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
  }

  .ak-bc-link {
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.2s;
  }

  .ak-bc-link:hover {
    color: var(--gold);
  }

  .ak-bc-sep {
    color: var(--text-3);
    opacity: 0.5;
  }

  .ak-bc-current {
    color: var(--text-2);
  }

  /* ── SCROLL HINT ── */
  .ak-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    animation: fadeInUp 1.5s ease 2s both;
  }

  .ak-scroll-dot {
    width: 6px;
    height: 10px;
    border-radius: 3px;
    background: var(--gold);
    animation: scrollBounce 2s ease infinite;
  }

  @keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.3; }
  }

  .ak-scroll-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  }

  /* ── HERO PARTICLES ── */
  .ak-hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  .ak-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 184, 0, 0.6);
    animation: particleDrift 15s linear infinite;
  }

  .ak-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 18s; }
  .ak-particle:nth-child(2) { left: 30%; top: 60%; animation-delay: -3s; animation-duration: 22s; width: 2px; height: 2px; }
  .ak-particle:nth-child(3) { left: 60%; top: 30%; animation-delay: -7s; animation-duration: 16s; }
  .ak-particle:nth-child(4) { left: 80%; top: 70%; animation-delay: -5s; animation-duration: 20s; width: 4px; height: 4px; background: rgba(124, 58, 237, 0.4); }
  .ak-particle:nth-child(5) { left: 20%; top: 80%; animation-delay: -10s; animation-duration: 25s; width: 2px; height: 2px; }
  .ak-particle:nth-child(6) { left: 70%; top: 15%; animation-delay: -12s; animation-duration: 19s; background: rgba(232, 54, 124, 0.3); }

  @keyframes particleDrift {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(100px, -150px) scale(0.5); opacity: 0; }
  }

  /* ── CARD LINK RESET ── */
  .ak-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
  }

  .ak-card-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ak-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .ak-card-date {
    margin-left: auto;
  }

  /* ── ARTICLE PAGE STYLES ── */
  .ak-article-hero {
    position: relative;
    min-height: 65vh;
    display: flex;
    align-items: flex-end;
    margin-top: -90px;
    padding: 130px 0 60px;
    overflow: hidden;
  }

  .ak-article-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
  }

  .ak-article-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .ak-article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 6, 24, 0.1) 0%, rgba(10, 6, 24, 0.85) 100%);
  }

  .ak-article-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
  }

  .ak-article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
  }

  .ak-article-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-1);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
  }

  .ak-article-desc {
    font-size: 18px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 640px;
  }

  .ak-article-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }

  /* ── SHARE ROW ── */
  .ak-share-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ak-share-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 600;
    letter-spacing: 0.05em;
  }

  .ak-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .ak-share-btn:hover {
    background: rgba(255, 184, 0, 0.1);
    border-color: rgba(255, 184, 0, 0.3);
    color: var(--gold);
    transform: translateY(-2px);
  }

  /* ── ARTICLE LAYOUT ── */
  .ak-article-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 100px;
  }

  .ak-article-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 60px;
    align-items: start;
  }

  /* ── TOC SIDEBAR ── */
  .ak-toc-sidebar {
    position: sticky;
    top: 100px;
  }

  .ak-toc-inner {
    padding: 20px;
    background: var(--surface);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(16px);
  }

  .ak-toc-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .ak-toc-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .ak-toc-links a {
    font-size: 13px;
    color: var(--text-3);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1.4;
  }

  .ak-toc-links a:hover {
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.03);
  }

  .ak-toc-links a.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(255, 184, 0, 0.05);
  }

  /* ── ARTICLE BODY ── */
  .ak-article {
    min-width: 0;
  }

  .ak-article-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-2);
  }

  .ak-article-body h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-1);
    margin: 48px 0 20px;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }

  .ak-article-body h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-1);
    margin: 48px 0 16px;
    letter-spacing: -0.02em;
    scroll-margin-top: 100px;
    text-wrap: balance;
  }

  .ak-article-body h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-1);
    margin: 32px 0 12px;
    scroll-margin-top: 100px;
    text-wrap: balance;
  }

  .ak-article-body p {
    margin: 0 0 20px;
  }

  .ak-article-body blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    border-left: 3px solid var(--gold);
    background: rgba(255, 184, 0, 0.04);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-1);
    font-size: 18px;
    line-height: 1.6;
  }

  .ak-article-body ul,
  .ak-article-body ol {
    margin: 16px 0 24px;
    padding-left: 24px;
  }

  .ak-article-body li {
    margin-bottom: 8px;
  }

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

  .ak-article-body a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
  }

  .ak-article-body a:hover {
    color: var(--gold-light);
  }

  /* ── ARTICLE TAGS ── */
  .ak-article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 48px 0 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .ak-tags-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
  }

  .ak-tag {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    font-size: 13px;
    color: var(--violet);
    font-weight: 500;
  }

  /* ── ARTICLE CTA ── */
  .ak-article-cta {
    text-align: center;
    padding: 48px 32px;
    margin: 48px 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 184, 0, 0.06));
    border: 1px solid rgba(124, 58, 237, 0.15);
  }

  .ak-cta-icon {
    font-size: 40px;
    margin-bottom: 16px;
  }

  .ak-cta-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
  }

  .ak-cta-desc {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .ak-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(110deg var(--in-oklch), #E5A600, #FFB800, #FFCB45);
    background-size: 200% 100%;
    border-radius: 14px;
    color: #0A0618;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
  }

  .ak-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(255, 184, 0, 0.4);
    background-position: 100% 0;
  }

  /* ── BACK TO BLOG LINK ── */
  .ak-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-3);
    text-decoration: none;
    padding: 12px 0;
    transition: all 0.3s;
  }

  .ak-back-link:hover {
    color: var(--gold);
    gap: 12px;
  }

  /* ── RESPONSIVE — Article ── */
  @media (max-width: 900px) {
    .ak-article-layout {
      grid-template-columns: 1fr;
      gap: 0;
    }
    .ak-toc-sidebar {
      display: none;
    }
    .ak-article-hero {
      min-height: 50vh;
    }
  }

  @media (max-width: 600px) {
    .ak-hero-v2 {
      min-height: 70vh;
      padding: 100px 16px 40px;
    }
    .ak-hero-stats {
      flex-direction: column;
      gap: 16px;
      padding: 20px 24px;
    }
    .ak-stat-divider {
      width: 60px;
      height: 1px;
    }
    .ak-stat {
      padding: 0;
    }
    .ak-article-title {
      font-size: 28px;
    }
    .ak-article-wrap {
      padding: 40px 16px 60px;
    }
    .ak-article-author-bar {
      flex-direction: column;
      align-items: flex-start;
    }
    .ak-filter-group {
      overflow-x: auto;
      flex-wrap: nowrap;
      -webkit-overflow-scrolling: touch;
      scroll-snap-type: x mandatory;
      padding-bottom: 8px;
      justify-content: flex-start;
      width: 100%;
    }
    .ak-filter-btn {
      flex-shrink: 0;
      scroll-snap-align: start;
    }
  }

  /* ── ACCESSIBILITY ── */
  @media (prefers-reduced-motion: reduce) {
    .ak-card,
    .ak-featured-card,
    .stagger-item,
    .fade-up-element,
    .ak-particle,
    .ak-scroll-dot,
    .ak-orb,
    .ak-text-gradient {
      animation: none !important;
      transition: none !important;
    }
    .stagger-item,
    .fade-up-element {
      opacity: 1 !important;
      transform: none !important;
    }
  }

  @media (prefers-contrast: more) {
    .ak-card {
      border-color: rgba(255, 255, 255, 0.3);
    }
    .ak-card-title {
      color: #fff;
    }
    .ak-text-gradient {
      -webkit-text-fill-color: var(--gold);
    }
  }



  /* ── 2026 LIQUID GLASS & LIGHTING EFFECT ENHANCEMENTS ── */
  
  .ak-card,
  .ak-featured-card,
  .ak-toc-inner,
  .ak-article-cta {
    position: relative;
    overflow: hidden;
  }

  /* Specular Sheen sweep */
  .ak-card::after,
  .ak-featured-card::after,
  .ak-toc-inner::after,
  .ak-article-cta::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      45deg,
      transparent 45%,
      rgba(255, 255, 255, 0.06) 50%,
      transparent 55%
    );
    transform: rotate(-45deg) translate(-100%, -100%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 3;
  }
  
  .ak-card:hover::after,
  .ak-featured-card:hover::after,
  .ak-toc-inner:hover::after,
  .ak-article-cta:hover::after {
    transform: rotate(-45deg) translate(100%, 100%);
  }

  /* Dynamic mouse spotlight glows */
  .ak-card .spotlight,
  .ak-featured-card .spotlight,
  .ak-toc-inner .spotlight,
  .ak-article-cta .spotlight {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
      circle 160px at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.08),
      transparent 80%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
  }

  .ak-card:hover .spotlight,
  .ak-featured-card:hover .spotlight,
  .ak-toc-inner:hover .spotlight,
  .ak-article-cta:hover .spotlight {
    opacity: 1;
  }

  /* Category-specific card glow themes */
  .ak-card[data-cat="gemstones"]:hover {
    border-color: rgba(255, 184, 0, 0.28);
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(255, 184, 0, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  }

  .ak-card[data-cat="love"]:hover {
    border-color: rgba(232, 54, 124, 0.28);
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(232, 54, 124, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  }

  .ak-card[data-cat="vedic"]:hover {
    border-color: rgba(124, 58, 237, 0.28);
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(124, 58, 237, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  }

  .ak-card[data-cat="remedies"]:hover {
    border-color: rgba(6, 182, 212, 0.28);
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(6, 182, 212, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  }

  /* Inside post Table of Contents override */
  .ak-toc-inner {
    background: linear-gradient(135deg var(--in-oklab), rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.003)) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    box-shadow: 
      0 12px 32px rgba(0, 0, 0, 0.45), 
      inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  }
  .ak-toc-inner:hover {
    border-color: rgba(124, 58, 237, 0.2) !important;
    box-shadow: 
      0 16px 40px rgba(0, 0, 0, 0.5), 
      0 0 20px rgba(124, 58, 237, 0.03),
      inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  }

  /* Inside post Call-To-Action override */
  .ak-article-cta {
    background: linear-gradient(135deg var(--in-oklab), rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.005) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    box-shadow: 
      0 24px 60px rgba(0, 0, 0, 0.45), 
      inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease) !important;
  }
  .ak-article-cta:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 184, 0, 0.25) !important;
    box-shadow: 
      0 32px 80px rgba(0, 0, 0, 0.55),
      0 0 35px rgba(255, 184, 0, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  }

  /* ── 2026 HERO ASTROLABE CELESTIAL OVERLAY ── */
  .ak-hero-astrolabe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(80vw, 750px);
    height: min(80vw, 750px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.28;
    mix-blend-mode: screen;
    will-change: transform;
    filter: drop-shadow(0 0 20px rgba(255, 184, 0, 0.08));
  }

  .astrolabe-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: center;
  }

  .ring-outer {
    animation: rotateClockwise 90s linear infinite;
  }

  .ring-middle {
    width: 82%;
    height: 82%;
    top: 9%;
    left: 9%;
    animation: rotateCounterClockwise 65s linear infinite;
  }

  .ring-inner {
    width: 64%;
    height: 64%;
    top: 18%;
    left: 18%;
    animation: rotateClockwise 35s linear infinite;
  }

  @keyframes rotateClockwise {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes rotateCounterClockwise {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(-360deg);
    }
  }

} /* end @layer blog-modern */
