/* ==========================================================================
   SONARLINK DESIGN SYSTEM — PREMIUM REDESIGN
   Dark-first editorial · AI News Publication · 2026 Cutting Edge
   ========================================================================== */

/* --------------------------------------------------------------------------
   @PROPERTY REGISTRATIONS (for animatable custom properties)
   -------------------------------------------------------------------------- */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-pos {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}

@property --mesh-x1 {
  syntax: '<percentage>';
  initial-value: 20%;
  inherits: false;
}

@property --mesh-y1 {
  syntax: '<percentage>';
  initial-value: 30%;
  inherits: false;
}

@property --mesh-x2 {
  syntax: '<percentage>';
  initial-value: 70%;
  inherits: false;
}

@property --mesh-y2 {
  syntax: '<percentage>';
  initial-value: 60%;
  inherits: false;
}

@property --mesh-x3 {
  syntax: '<percentage>';
  initial-value: 50%;
  inherits: false;
}

@property --mesh-y3 {
  syntax: '<percentage>';
  initial-value: 80%;
  inherits: false;
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@property --progress {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}

/* --------------------------------------------------------------------------
   LAYER ORDER
   -------------------------------------------------------------------------- */
@layer tokens, base, components, utilities;

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
@layer tokens {
  :root {
    /* Type Scale (fluid clamp) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
    --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
    --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
    --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
    --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

    /* 4px Spacing System */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Font Families */
    --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
    --font-body: 'Satoshi', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Content Widths */
    --content-narrow: 680px;
    --content-default: 960px;
    --content-wide: 1200px;

    /* Category Colors */
    --cat-ai-models: #00c8ff;
    --cat-automation: #00e676;
    --cat-industry: #ff9100;
    --cat-research: #e040fb;
    --cat-tools: #ffd740;
    --cat-policy: #ff5252;
  }

  /* DARK MODE (default — dark only) */
  :root,
  [data-theme="dark"] {
    --color-bg: #1a1a1f;
    --color-surface: #242429;
    --color-surface-2: #2a2a30;
    --color-surface-3: #303038;
    --color-text: #e8e8ec;
    --color-text-muted: #9a9aa3;
    --color-text-faint: #6b6b75;
    --color-primary: #4fa3b8;
    --color-primary-hover: #6bb8cc;
    --color-primary-dim: rgba(79, 163, 184, 0.08);
    --color-accent-purple: #8b5cf6;
    --color-accent-magenta: #d946ef;
    --color-verified: #4ade80;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(79, 163, 184, 0.3);
    --color-divider: rgba(255, 255, 255, 0.04);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: none;
    --shadow-glow-strong: none;

    --header-bg: rgba(26, 26, 31, 0.92);
    --gradient-hero: transparent;
    --gradient-cta: transparent;

    --noise-opacity: 0;
    --grid-opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   BASE
   -------------------------------------------------------------------------- */
@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    hanging-punctuation: first last;
    scroll-padding-top: 5rem;
    color-scheme: dark;
  }

  body {
    min-height: 100dvh;
    line-height: 1.6;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    overflow-x: hidden;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
  }

  ul[role='list'], ol[role='list'] {
    list-style: none;
  }

  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }

  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
    line-height: 1.15;
    font-family: var(--font-display);
  }

  p, li, figcaption {
    text-wrap: pretty;
    max-width: 72ch;
  }

  ::selection {
    background: rgba(79, 163, 184, 0.25);
    color: var(--color-text);
  }

  :focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  a:hover {
    color: var(--color-primary-hover);
  }

  button {
    cursor: pointer;
    background: none;
    border: none;
  }

  a, button, [role='button'], [role='link'], input, textarea, select {
    transition:
      color var(--transition-fast),
      background var(--transition-fast),
      border-color var(--transition-fast),
      box-shadow var(--transition-fast),
      transform var(--transition-fast);
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background: var(--color-primary);
    color: #0a0a0f;
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    z-index: 200;
    text-decoration: none;
    transition: top var(--transition-fast);
  }

  .skip-link:focus {
    top: var(--space-4);
  }
}

/* --------------------------------------------------------------------------
   COMPONENTS
   -------------------------------------------------------------------------- */
@layer components {

  /* ================================
     GLOBAL: NOISE OVERLAY
     ================================ */
  .noise-overlay {
    display: none;
  }

  /* ================================
     GLOBAL: GRID PATTERN BACKGROUND
     ================================ */
  .grid-bg {
    display: none;
  }

  /* ================================
     READING PROGRESS BAR
     ================================ */
  .reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-primary);
    z-index: 200;
    transition: width 50ms linear;
    will-change: width;
  }

  /* ================================
     VIEW TRANSITIONS
     ================================ */
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root) {
    animation: vt-fade-out 0.2s cubic-bezier(0.4, 0, 1, 1);
  }
  ::view-transition-new(root) {
    animation: vt-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes vt-fade-out { to { opacity: 0; } }
  @keyframes vt-fade-in { from { opacity: 0; } }


  /* ================================
     LAYOUT
     ================================ */
  .container {
    width: 100%;
    max-width: var(--content-wide);
    margin-inline: auto;
    padding-inline: var(--space-6);
  }

  .container--narrow {
    max-width: var(--content-narrow);
  }

  .container--default {
    max-width: var(--content-default);
  }

  /* ================================
     HEADER
     ================================ */
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background var(--transition-smooth);
  }

  .header--scrolled {
    box-shadow: var(--shadow-md);
  }

  .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.75rem;
    max-width: var(--content-wide);
    margin-inline: auto;
    padding-inline: var(--space-6);
  }

  .header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text);
    text-decoration: none;
    flex-shrink: 0;
  }

  .header__logo-icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
  }

  .header__logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: -0.02em;
  }

  .header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-left: auto;
    margin-right: var(--space-6);
  }

  .header__nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    letter-spacing: 0.01em;
    position: relative;
    padding-block: var(--space-1);
  }

  .header__nav-link:hover,
  .header__nav-link--active {
    color: var(--color-text);
  }

  .header__nav-link--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
  }

  .header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
  }

  .theme-toggle {
    display: none;
  }

  /* Mobile hamburger */
  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
  }

  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  .hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile nav overlay */
  .mobile-nav {
    display: none;
    position: fixed;
    inset: 3.75rem 0 0;
    z-index: 99;
    background: var(--color-bg);
    padding: var(--space-8) var(--space-6);
    flex-direction: column;
    gap: var(--space-6);
    height: calc(100dvh - 3.75rem);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-smooth);
  }

  .mobile-nav--open {
    pointer-events: auto;
    opacity: 1;
  }

  .mobile-nav__link {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    padding-block: var(--space-2);
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-nav__link:hover {
    color: var(--color-primary);
  }

  @media (max-width: 768px) {
    .header__nav {
      display: none;
    }
    .hamburger {
      display: flex;
    }
    .mobile-nav {
      display: flex;
    }
  }

  /* ================================
     HERO SECTION (Homepage) — Premium
     ================================ */
  .hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    padding: var(--space-8) 0 var(--space-6);
    overflow: hidden;
  }

  .hero__mesh {
    display: none;
  }

  /* Sonar wave motif in hero — hidden */
  .hero__sonar {
    display: none;
  }

  .hero__sonar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--color-primary);
    inset: 0;
    animation: sonar-pulse 4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  }

  .hero__sonar-ring:nth-child(2) {
    inset: 15%;
    animation-delay: 0.6s;
    border-width: 1.5px;
    opacity: 0.8;
  }

  .hero__sonar-ring:nth-child(3) {
    inset: 30%;
    animation-delay: 1.2s;
    border-width: 2px;
    opacity: 0.6;
  }

  .hero__sonar-ring:nth-child(4) {
    inset: 45%;
    animation-delay: 1.8s;
    border-width: 2.5px;
    opacity: 0.4;
  }

  .hero__sonar-dot {
    position: absolute;
    inset: 50%;
    width: 8px;
    height: 8px;
    margin: -4px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  }

  @keyframes sonar-pulse {
    0% { transform: scale(0.95); opacity: 1; }
    70% { transform: scale(1.05); opacity: 0.3; }
    100% { transform: scale(0.95); opacity: 1; }
  }

  .hero__particles {
    display: none;
  }

  .hero__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-6);
    align-items: start;
    grid-template-rows: auto;
  }

  .hero__featured {
    position: relative;
    z-index: 2;
  }

  .hero__image {
    margin-top: var(--space-5);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .hero__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
  }

  .hero__label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
  }

  .hero__label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
  }

  .hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--color-text);
    margin-bottom: var(--space-4);
    max-width: 20ch;
  }

  .hero__title .gradient-text {
    color: var(--color-primary);
  }

  .hero__excerpt {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 52ch;
    margin-bottom: var(--space-5);
  }

  .hero__meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
  }

  .hero__read-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-bg);
    text-decoration: none;
    background: var(--color-primary);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    transition:
      transform var(--transition-fast),
      box-shadow var(--transition-fast),
      gap var(--transition-fast);
  }

  .hero__read-link:hover {
    transform: translateY(-1px);
    gap: var(--space-3);
    color: var(--color-bg);
  }

  .hero__read-link:active {
    transform: scale(0.98);
  }

  .hero__read-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
  }

  .hero__read-link:hover svg {
    transform: translateX(3px);
  }

  @media (max-width: 1024px) {
    .hero__layout {
      grid-template-columns: 1fr;
    }
    .signal-panel {
      display: none;
    }
    .hero__image {
      max-width: 600px;
    }
  }

  @media (max-width: 768px) {
    .hero {
      padding: var(--space-6) 0 var(--space-4);
    }
    .hero__title {
      font-size: 1.5rem;
    }
  }

  /* ================================
     SIGNAL PANEL
     ================================ */
  .signal-panel {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    backdrop-filter: blur(8px);
    align-self: start;
    display: flex;
    flex-direction: column;
    max-height: var(--signal-panel-height, 600px);
  }

  /* World Clock */
  .world-clock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .world-clock__zone {
    text-align: center;
    padding: var(--space-2) 0;
  }

  .world-clock__city {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 2px;
  }

  .world-clock__time {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.02em;
  }

  .world-clock__date {
    display: block;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    margin-top: 1px;
  }

  .signal-panel__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .signal-panel__pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: signal-blink 2s ease-in-out infinite;
  }

  @keyframes signal-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  .signal-panel__label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .signal-panel__feed {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
  }

  .signal-panel__feed::-webkit-scrollbar {
    width: 4px;
  }

  .signal-panel__feed::-webkit-scrollbar-track {
    background: transparent;
  }

  .signal-panel__feed::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
  }

  .signal-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

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

  .signal-item__category {
    align-self: flex-start;
    font-size: 10px;
    padding: 2px 8px;
  }

  .signal-item__title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    line-height: 1.4;
    transition: color var(--transition-fast);
  }

  .signal-item__title:hover {
    color: var(--color-primary);
  }

  .signal-item__time {
    font-size: 11px;
    color: var(--color-text-muted);
    opacity: 0.6;
  }

  /* ================================
     BADGES
     ================================ */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    white-space: nowrap;
  }

  .badge--ai-models {
    background: rgba(0, 200, 255, 0.12);
    color: var(--cat-ai-models);
  }
  .badge--automation {
    background: rgba(0, 230, 118, 0.12);
    color: var(--cat-automation);
  }
  .badge--industry {
    background: rgba(255, 145, 0, 0.12);
    color: var(--cat-industry);
  }
  .badge--research {
    background: rgba(224, 64, 251, 0.12);
    color: var(--cat-research);
  }
  .badge--tools {
    background: rgba(255, 215, 64, 0.12);
    color: var(--cat-tools);
  }
  .badge--policy {
    background: rgba(255, 82, 82, 0.12);
    color: var(--cat-policy);
  }



  /* ================================
     META LINE
     ================================ */
  .meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-faint);
  }

  .meta__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-text-faint);
    flex-shrink: 0;
  }

  /* ================================
     SECTION HEADINGS
     ================================ */
  .section-heading {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }

  .section-heading__text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    white-space: nowrap;
  }

  .section-heading__line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
  }

  /* ================================
     ARTICLE CARDS — Redesigned Grid
     ================================ */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: var(--space-5);
  }

  /* Featured card — first card spans full width */
  .card-grid--featured {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  .card-grid--featured > .card:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    min-height: 280px;
  }

  .card-grid--featured > .card:first-child .card__visual {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  }

  .card-grid--featured > .card:first-child .card__visual-sonar {
    display: none;
  }

  .card-grid--featured > .card:first-child .card__visual-sonar span {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--color-primary);
    animation: sonar-pulse 4s ease infinite;
  }

  .card-grid--featured > .card:first-child .card__visual-sonar span:nth-child(1) {
    inset: 0;
  }
  .card-grid--featured > .card:first-child .card__visual-sonar span:nth-child(2) {
    inset: 20%;
    animation-delay: 0.4s;
    border-width: 1.5px;
  }
  .card-grid--featured > .card:first-child .card__visual-sonar span:nth-child(3) {
    inset: 40%;
    animation-delay: 0.8s;
    border-width: 2px;
  }

  .card-grid--featured > .card:first-child .card__content {
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .card-grid--featured > .card:first-child .card__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
  }

  .card-grid--featured > .card:first-child .card__excerpt {
    font-size: var(--text-base);
  }

  /* Rest of cards in asymmetric layout */
  .card-grid--featured .card-grid__rest {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: var(--space-6);
  }

  @media (min-width: 900px) {
    .card-grid--featured .card-grid__rest {
      grid-template-columns: 1fr 1fr 1fr;
    }

    /* Make one card span wider for asymmetry */
    .card-grid--featured .card-grid__rest .card:nth-child(4) {
      grid-column: span 1;
    }
  }

  @media (max-width: 768px) {
    .card-grid--featured > .card:first-child {
      grid-template-columns: 1fr;
      min-height: auto;
    }
    .card-grid--featured > .card:first-child .card__visual {
      min-height: 160px;
      border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
  }

  /* Standard card styling */
  .card {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition:
      border-color var(--transition-fast),
      background var(--transition-smooth);
  }

  /* Animated gradient border on hover */
  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
    transition: background var(--transition-fast);
  }

  .card:hover {
    border-color: var(--color-border-hover);
    background: var(--color-surface-2);
  }

  .card:hover::before {
    background: var(--color-primary);
    opacity: 0.6;
  }

  .card:active {
    transform: scale(0.99);
  }

  .card__badge {
    margin-bottom: var(--space-3);
  }

  .card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card__excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: var(--space-4);
  }

  .card__meta {
    margin-top: auto;
  }

  /* Card accent top line per category */
  .card[data-category="ai-models"]::before { background: var(--cat-ai-models); opacity: 0.4; }
  .card[data-category="automation"]::before { background: var(--cat-automation); opacity: 0.4; }
  .card[data-category="industry"]::before { background: var(--cat-industry); opacity: 0.4; }
  .card[data-category="research"]::before { background: var(--cat-research); opacity: 0.4; }
  .card[data-category="tools"]::before { background: var(--cat-tools); opacity: 0.4; }
  .card[data-category="policy"]::before { background: var(--cat-policy); opacity: 0.4; }

  .card:hover::before { opacity: 1; }

  /* ================================
     TRENDING TOPICS STRIP
     ================================ */
  .topics {
    padding: clamp(var(--space-4), 2vw, var(--space-6)) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
  }

  .topics__scroll {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-block: var(--space-2);
  }

  .topics__scroll::-webkit-scrollbar {
    display: none;
  }

  .topic-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    white-space: nowrap;
    text-decoration: none;
    transition:
      color var(--transition-fast),
      border-color var(--transition-fast),
      background var(--transition-fast),
      box-shadow var(--transition-fast),
      transform var(--transition-fast);
    flex-shrink: 0;
  }

  .topic-pill:hover {
    color: var(--color-text);
    border-color: var(--color-border-hover);
    background: var(--color-surface-2);
    transform: translateY(-1px);
  }

  .topic-pill:active {
    transform: scale(0.98);
  }

  .topic-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* ================================
     NEWSLETTER CTA — Premium
     ================================ */
  .newsletter {
    padding: clamp(var(--space-8), 4vw, var(--space-12)) 0;
    position: relative;
    overflow: hidden;
  }

  .newsletter__inner {
    position: relative;
    z-index: 1;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(var(--space-8), 4vw, var(--space-12));
    text-align: center;
  }

  .newsletter__inner::before {
    display: none;
  }

  .newsletter__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xl);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-3);
    position: relative;
  }

  .newsletter__sub {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-10);
    max-width: 42ch;
    margin-inline: auto;
    position: relative;
    line-height: 1.6;
  }

  .newsletter__form {
    display: flex;
    gap: var(--space-3);
    max-width: 480px;
    margin-inline: auto;
    position: relative;
  }

  .newsletter__input {
    flex: 1;
    padding: var(--space-3) var(--space-5);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  }

  .newsletter__input::placeholder {
    color: var(--color-text-faint);
  }

  .newsletter__input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(79, 163, 184, 0.15);
  }

  .newsletter__btn {
    padding: var(--space-3) var(--space-8);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: var(--text-sm);
    border: none;
    border-radius: var(--radius-full);
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
  }

  .newsletter__btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
  }

  .newsletter__btn:active {
    transform: scale(0.98);
  }

  .newsletter__btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }

  .newsletter__status {
    font-size: var(--text-sm);
    margin-top: var(--space-4);
    min-height: 1.4em;
  }

  @media (max-width: 500px) {
    .newsletter__form {
      flex-direction: column;
    }
  }

  /* ================================
     FOOTER — Polished
     ================================ */
  .footer {
    border-top: 1px solid var(--color-border);
    padding: clamp(var(--space-8), 4vw, var(--space-12)) 0 var(--space-6);
    position: relative;
  }

  .footer::before {
    display: none;
  }

  .footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-10);
    position: relative;
  }

  .footer__brand-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 30ch;
    margin-top: var(--space-4);
  }

  .footer__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
  }

  .footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }

  .footer__link {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
  }

  .footer__link:hover {
    color: var(--color-text);
  }

  .footer__socials {
    display: flex;
    gap: var(--space-3);
  }

  .footer__social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    text-decoration: none;
    transition:
      color var(--transition-fast),
      border-color var(--transition-fast),
      background var(--transition-fast),
      transform var(--transition-fast);
  }

  .footer__social:hover {
    color: var(--color-text);
    border-color: var(--color-border-hover);
    background: var(--color-surface);
    transform: translateY(-1px);
  }

  .footer__social svg {
    width: 16px;
    height: 16px;
  }

  .footer__bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--color-text-faint);
    position: relative;
  }

  .footer__bottom-links {
    display: flex;
    gap: var(--space-4);
  }

  .footer__bottom-links a {
    color: var(--color-text-faint);
    text-decoration: none;
  }

  .footer__bottom-links a:hover {
    color: var(--color-text-muted);
  }

  @media (max-width: 768px) {
    .footer__grid {
      grid-template-columns: 1fr;
      gap: var(--space-8);
    }
    .footer__bottom {
      flex-direction: column;
      gap: var(--space-3);
      text-align: center;
    }
  }

  /* ================================
     ARTICLE PAGE
     ================================ */
  .article-hero {
    padding: clamp(var(--space-8), 4vw, var(--space-12)) 0 clamp(var(--space-5), 3vw, var(--space-8));
    position: relative;
    overflow: visible;
  }

  .article-hero__image {
    width: 100%;
    max-width: var(--content-narrow);
    margin-inline: auto;
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .article-hero__image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  /* Card thumbnail images */
  .card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
  }

  .article-hero::before {
    display: none;
  }

  .article-hero__inner {
    position: relative;
    z-index: 1;
    max-width: var(--content-narrow);
    margin-inline: auto;
  }

  .article-hero__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-2xl);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: var(--space-5) 0 var(--space-6);
  }

  .article-hero__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
  }

  .article-hero__author {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    cursor: default;
    position: relative;
  }

  .article-hero__author-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
  }

  /* Sonar Ripple Easter Egg */
  .sonar-ripple {
    position: fixed;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    pointer-events: none;
    z-index: 9999;
    animation: sonarExpand 1.2s cubic-bezier(0, 0.4, 0.4, 1) forwards;
  }

  .sonar-ripple--delayed {
    animation-delay: 0.15s;
  }

  .sonar-ripple--delayed-2 {
    animation-delay: 0.3s;
  }

  @keyframes sonarExpand {
    0% {
      width: 0;
      height: 0;
      opacity: 0.6;
      transform: translate(-50%, -50%);
    }
    100% {
      width: min(160vw, 160vh);
      height: min(160vw, 160vh);
      opacity: 0;
      transform: translate(-50%, -50%);
    }
  }

  .article-hero__author:hover .article-hero__author-icon {
    filter: drop-shadow(0 0 6px var(--color-primary));
    transition: filter 0.3s ease;
  }

  .article-hero__date,
  .article-hero__read-time {
    font-size: var(--text-xs);
    color: var(--color-text-faint);
  }

  /* Article Body */
  .article-body {
    max-width: var(--content-narrow);
    margin-inline: auto;
    padding: clamp(var(--space-8), 4vw, var(--space-12)) var(--space-6);
  }

  .article-body p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: var(--space-5);
  }

  .article-body h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xl);
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-top: var(--space-12);
    margin-bottom: var(--space-5);
    /* Subtle left accent line */
    padding-left: var(--space-4);
    border-left: 3px solid var(--color-primary);
  }

  .article-body h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--color-text);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
  }

  .article-body a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(79, 163, 184, 0.35);
    transition: text-decoration-color var(--transition-fast);
  }

  .article-body a:hover {
    text-decoration-color: var(--color-primary);
  }

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

  .article-body ul,
  .article-body ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-6);
  }

  .article-body li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: var(--space-2);
  }

  /* Pull Quote — Premium */
  .pullquote {
    margin: var(--space-12) 0;
    padding: var(--space-8);
    border-left: 3px solid var(--color-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    line-height: 1.4;
    color: var(--color-text);
    font-style: italic;
    position: relative;
    background: var(--color-primary-dim);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }

  /* Large decorative quotation mark */
  .pullquote::before {
    content: '\201C';
    position: absolute;
    top: -0.15em;
    left: var(--space-3);
    font-size: 4rem;
    line-height: 1;
    color: var(--color-primary);
    opacity: 0.25;
    font-family: Georgia, serif;
    font-style: normal;
    pointer-events: none;
  }

  /* Inline Code */
  .article-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.15em 0.4em;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
  }

  /* Code Block */
  .article-body pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    overflow-x: auto;
  }

  .article-body pre code {
    padding: 0;
    background: none;
    border: none;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
  }

  /* Table wrap */
  .table-wrap {
    overflow-x: auto;
    margin-bottom: var(--space-6);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
  }

  .table-wrap table {
    border-collapse: collapse;
    width: 100%;
    font-size: var(--text-sm);
  }

  .table-wrap th,
  .table-wrap td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
  }

  .table-wrap th {
    background: var(--color-surface);
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .table-wrap td {
    color: var(--color-text-muted);
  }

  /* Source Citation */
  .source-citation {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin: var(--space-8) 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
  }

  .source-citation svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--color-verified);
  }

  /* AI Disclosure Box — Animated border */
  .ai-disclosure {
    margin: var(--space-12) 0;
    padding: var(--space-6) var(--space-8);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    position: relative;
    overflow: hidden;
  }

  .ai-disclosure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    opacity: 0.5;
  }

  .ai-disclosure__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    color: var(--color-primary);
  }

  .ai-disclosure__content h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
    margin-bottom: var(--space-2);
  }

  .ai-disclosure__content p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
  }

  /* Share Button + Dropdown */
  .article-hero__share {
    position: relative;
    margin-left: auto;
  }

  .share-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: var(--color-text-muted);
  }

  .share-trigger svg {
    width: 18px;
    height: 18px;
  }

  .share-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text);
  }

  .share-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    background: var(--color-surface-raised, #2a2a30);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
  }

  .share-dropdown.open {
    display: flex;
    flex-direction: column;
  }

  .share-dropdown__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: inherit;
    color: var(--color-text-muted);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
  }

  .share-dropdown__item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .share-dropdown__item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text);
  }

  .share-dropdown__item.copied {
    color: #4ade80;
  }

  .share-dropdown__item.copied svg {
    stroke: #4ade80;
  }

  /* Related Articles */
  .related {
    padding: clamp(var(--space-8), 4vw, var(--space-12)) 0;
    border-top: 1px solid var(--color-border);
  }

  /* ================================
     EXPLORE / CATEGORIES PAGE
     ================================ */
  .page-hero {
    padding: clamp(var(--space-6), 4vw, var(--space-10)) 0 clamp(var(--space-4), 3vw, var(--space-6));
    position: relative;
    overflow: hidden;
  }

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

  .page-hero__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-2xl);
    letter-spacing: -0.03em;
    position: relative;
  }

  .page-hero__subtitle {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-top: var(--space-4);
    max-width: 50ch;
    position: relative;
  }

  .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: var(--space-4);
    padding-bottom: clamp(var(--space-8), 4vw, var(--space-12));
  }

  .category-card {
    padding: var(--space-8);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition:
      border-color var(--transition-fast),
      box-shadow var(--transition-smooth),
      background var(--transition-smooth);
  }

  /* Ambient glow on hover per category */
  .category-card:hover {
    border-color: var(--color-border-hover);
    background: var(--color-surface-2);
  }

  /* Category card hover — subtle only */

  .category-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }

  .category-card:hover .category-card__icon {
    transform: scale(1.1);
  }

  .category-card__icon svg {
    width: 24px;
    height: 24px;
  }

  .category-card__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
  }

  .category-card__desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-5);
  }

  .category-card__count {
    font-size: var(--text-xs);
    color: var(--color-text-faint);
    font-weight: 500;
  }

  /* Category tint backgrounds */
  .category-card--ai-models .category-card__icon { background: rgba(0, 200, 255, 0.1); color: var(--cat-ai-models); }
  .category-card--automation .category-card__icon { background: rgba(0, 230, 118, 0.1); color: var(--cat-automation); }
  .category-card--industry .category-card__icon { background: rgba(255, 145, 0, 0.1); color: var(--cat-industry); }
  .category-card--research .category-card__icon { background: rgba(224, 64, 251, 0.1); color: var(--cat-research); }
  .category-card--tools .category-card__icon { background: rgba(255, 215, 64, 0.1); color: var(--cat-tools); }
  .category-card--policy .category-card__icon { background: rgba(255, 82, 82, 0.1); color: var(--cat-policy); }

  /* ================================
     SCROLL ANIMATIONS — opacity + clip-path only (no CLS)
     ================================ */
  @keyframes reveal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes reveal-clip {
    from { clip-path: inset(8% 0 0 0); opacity: 0; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
  }

  @supports (animation-timeline: view()) {
    .animate-in {
      animation: reveal-clip 1s linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }

  /* JS fallback for browsers without scroll-timeline */
  .animate-in.will-animate {
    opacity: 0;
    clip-path: inset(8% 0 0 0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                clip-path 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .animate-in.will-animate.visible {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }

  /* Stagger delays set by JS via custom property */
  .animate-in[style*="--stagger"] {
    transition-delay: var(--stagger);
  }

  /* ================================
     SECTION SPACING
     ================================ */
  .section {
    padding: clamp(var(--space-6), 4vw, var(--space-12)) 0;
  }

  .section--compact {
    padding: clamp(var(--space-4), 3vw, var(--space-8)) 0;
  }

  /* ================================
     MOBILE POLISH
     ================================ */

  /* Show signal panel on mobile as compact strip (clock hidden, feed shown) */
  @media (max-width: 1024px) {
    .signal-panel {
      display: flex;
      max-height: none;
      margin-top: var(--space-6);
    }
    .signal-panel__feed {
      max-height: 260px;
      overflow-y: auto;
    }
    .world-clock {
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-1);
      margin-bottom: var(--space-3);
      padding-bottom: var(--space-3);
    }
    .world-clock__time {
      font-size: 13px;
    }
    .world-clock__date {
      font-size: 8px;
    }
  }

  /* Article meta row — share below meta on mobile */
  @media (max-width: 520px) {
    .article-hero__meta {
      flex-wrap: wrap;
    }
    .article-hero__meta > .article-hero__share {
      margin-left: 0;
      margin-top: var(--space-2);
      flex-basis: 100%;
    }
    .share-dropdown {
      left: 0;
      right: auto;
    }
    .world-clock {
      grid-template-columns: repeat(3, 1fr);
      gap: 0;
    }
    .world-clock__zone {
      padding: var(--space-1) 0;
    }
    .world-clock__city {
      font-size: 9px;
    }
    .world-clock__time {
      font-size: 12px;
    }
  }

  /* Category filter pills — scrollable on mobile */
  @media (max-width: 768px) {
    .category-nav {
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .category-nav::-webkit-scrollbar {
      display: none;
    }
  }
}

  /* ========== ARTICLE SIDEBAR LAYOUT ========== */
  .article-with-sidebars {
    display: grid;
    grid-template-columns: 1fr minmax(0, 680px) 1fr;
    gap: 0;
    max-width: var(--content-wide);
    margin-inline: auto;
    padding-inline: var(--space-6);
  }

  .article-with-sidebars > .article-body {
    grid-column: 2;
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
  }

  /* LEFT SIDEBAR — TOC + Progress */
  .sidebar-left {
    grid-column: 1;
    position: relative;
  }

  .sidebar-left__sticky {
    position: sticky;
    top: 100px;
    padding-right: var(--space-8);
    padding-top: var(--space-4);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }

  .toc {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .toc__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .toc__label svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
  }

  .toc__item {
    margin-bottom: 2px;
  }

  .toc__link {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--color-text-faint);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
  }

  .toc__link:hover {
    color: var(--color-text-muted);
    background: rgba(255,255,255, 0.02);
  }

  .toc__link.active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    background: rgba(79, 163, 184, 0.06);
  }

  /* Progress ring */
  .progress-ring-wrap {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }

  .progress-ring-container {
    position: relative;
    width: 52px;
    height: 52px;
  }

  .progress-ring {
    transform: rotate(-90deg);
  }

  .progress-ring__bg {
    stroke: var(--color-border);
    fill: none;
    stroke-width: 3;
  }

  .progress-ring__fill {
    stroke: var(--color-primary);
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 138.23;
    stroke-dashoffset: 138.23;
    transition: stroke-dashoffset 0.3s ease;
  }

  .progress-ring__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-muted);
  }

  .progress-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-faint);
  }

  /* Floating share (left rail) */
  .sidebar-share {
    margin-top: var(--space-10);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }

  .sidebar-share__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-faint);
  }

  .sidebar-share__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .sidebar-share__btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(79, 163, 184, 0.08);
  }

  .sidebar-share__btn svg {
    width: 16px;
    height: 16px;
  }

  /* RIGHT SIDEBAR — Numbers + Newsletter + Related */
  .sidebar-right {
    grid-column: 3;
    position: relative;
  }

  .sidebar-right__sticky {
    position: sticky;
    top: 100px;
    padding-left: var(--space-8);
    padding-top: var(--space-4);
  }

  /* Key numbers card */
  .key-numbers {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
  }

  .key-numbers__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .key-numbers__label svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
  }

  .key-stat {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }

  .key-stat:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .key-stat__number {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  .key-stat__desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-top: 2px;
  }

  .key-stat__source {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-text-faint);
    text-decoration: none;
    margin-top: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
  }

  .key-stat__source:hover {
    opacity: 1;
    color: var(--color-primary);
  }

  .key-stat__source::before {
    content: '\2197 ';
  }

  /* Newsletter card */
  .sidebar-newsletter {
    background: linear-gradient(135deg, rgba(79, 163, 184, 0.08), rgba(79, 163, 184, 0.02));
    border: 1px solid rgba(79, 163, 184, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
  }

  .sidebar-newsletter__icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(79, 163, 184, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
  }

  .sidebar-newsletter__icon svg {
    width: 14px;
    height: 14px;
    color: var(--color-primary);
  }

  .sidebar-newsletter__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: var(--space-2);
  }

  .sidebar-newsletter__desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-4);
  }

  .sidebar-newsletter__input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.8rem;
    margin-bottom: var(--space-3);
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
  }

  .sidebar-newsletter__input::placeholder {
    color: var(--color-text-faint);
  }

  .sidebar-newsletter__input:focus {
    border-color: var(--color-primary);
  }

  .sidebar-newsletter__btn {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
  }

  .sidebar-newsletter__btn:hover {
    opacity: 0.85;
  }

  /* Related mini-feed */
  .sidebar-related {
    margin-bottom: var(--space-6);
  }

  .sidebar-related__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: var(--space-4);
  }

  .sidebar-related__item {
    display: block;
    text-decoration: none;
    padding: var(--space-3) 0;
    border-top: 1px solid var(--color-border);
    transition: all 0.2s ease;
  }

  .sidebar-related__item:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .sidebar-related__item:hover .sidebar-related__title {
    color: var(--color-primary);
  }

  .sidebar-related__badge {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
  }

  .sidebar-related__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--color-text);
    transition: color 0.2s ease;
  }

  .sidebar-related__meta {
    font-size: 0.65rem;
    color: var(--color-text-faint);
    margin-top: 4px;
  }

  /* Sidebar responsive — hide on tablet/mobile */
  @media (max-width: 1024px) {
    .article-with-sidebars {
      display: block !important;
      padding-inline: 0;
    }
    .sidebar-left,
    .sidebar-right {
      display: none !important;
      visibility: hidden !important;
      width: 0 !important;
      height: 0 !important;
      overflow: hidden !important;
      position: absolute !important;
      clip: rect(0, 0, 0, 0) !important;
    }
    .article-with-sidebars > .article-body {
      max-width: var(--content-narrow);
      margin-inline: auto;
      padding-inline: var(--space-4);
    }
  }

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
@layer utilities {
  .text-primary { color: var(--color-primary); }
  .text-muted { color: var(--color-text-muted); }
  .text-faint { color: var(--color-text-faint); }
  .font-display { font-family: var(--font-display); }
  .font-mono { font-family: var(--font-mono); }
}
