/* ========================================
   TechMind AI - Premium Blog Design System
   ======================================== */

/* === CSS Variables === */
:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B83FF;
  --primary-glow: rgba(108, 99, 255, 0.15);
  --accent: #00D4AA;
  --accent-dark: #00B892;
  --bg-primary: #0A0E1A;
  --bg-secondary: #111827;
  --bg-card: #1A1F35;
  --bg-card-hover: #222842;
  --bg-elevated: #252B45;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(108, 99, 255, 0.3);
  --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #00D4AA 100%);
  --gradient-card: linear-gradient(145deg, rgba(26,31,53,0.8) 0%, rgba(17,24,39,0.9) 100%);
  --gradient-hero: linear-gradient(160deg, #0A0E1A 0%, #1a1145 50%, #0A0E1A 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-width: 1200px;
  --header-height: 72px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 14px;
  background: var(--accent);
  color: #04120f;
  border-radius: var(--radius-sm);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Outfit', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* === Header / Navbar === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  top: 12px;
  width: 92%;
  max-width: var(--max-width);
  margin: 0 auto;
  border-radius: 50px;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(108, 99, 255, 0.08);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: white;
}

.logo span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.nav-cta {
  background: var(--gradient-primary) !important;
  color: white !important;
  padding: 8px 20px !important;
  font-weight: 600 !important;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* === Hero Section === */
.hero {
  padding: 160px 24px 100px;
  background: #0A0E1A; /* Premium dark background */
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Tech-Grid Overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(108, 99, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center center;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  z-index: 2;
  pointer-events: none;
}

/* Mesh Glow System */
.mesh-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.mesh-glow-ball {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  mix-blend-mode: screen;
  pointer-events: none;
}

.mesh-glow-ball-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -10%;
  left: 10%;
  animation: meshFloat1 18s ease-in-out infinite alternate;
}

.mesh-glow-ball-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -10%;
  right: 15%;
  animation: meshFloat2 15s ease-in-out infinite alternate;
}

/* Mouse spotlight glow for Hero */
.hero-mouse-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: translate(-50%, -50%);
  will-change: transform, left, top;
}

.hero:hover .hero-mouse-glow {
  opacity: 1;
}

@keyframes meshFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8%, -4%) scale(1.08); }
  100% { transform: translate(-4%, 8%) scale(0.96); }
}

@keyframes meshFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8%, 6%) scale(0.92); }
  100% { transform: translate(6%, -4%) scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--primary-glow);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(108,99,255,0.3);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(108,99,255,0.4);
  color: white;
}

/* === Main Content === */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
}

.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* === Article Cards Grid === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.article-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.article-card-image {
  width: 100%;
  height: 200px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  /* CLS prevention: explicit dimensions stop layout shift */
  display: block;
  background-color: var(--bg-elevated);
}

.article-card-body {
  padding: 24px;
}

.article-card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-glow);
  color: var(--primary-light);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.article-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-title a {
  color: var(--text-primary);
}

.article-card-title a:hover {
  color: var(--primary-light);
}

.article-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-card-meta .read-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === Featured Article === */
.featured-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.featured-card .article-card-image {
  height: 100%;
  min-height: 320px;
}

.featured-card .article-card-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card .article-card-title {
  font-size: 1.6rem;
  -webkit-line-clamp: 3;
}

.featured-card .article-card-excerpt {
  -webkit-line-clamp: 4;
}

/* === Article Page — Full Responsive Layout === */
.article-page {
  padding-top: calc(var(--header-height) + 40px);
}

/* Article header: wider on large screens */
.article-header {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 0 24px;
  text-align: center;
}

.article-header .article-card-tag {
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

/* Hero image: full-width up to 1100px, high-res */
.article-cover {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* === Two-column layout on desktop === */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* Fallback: single column .article-content (for older articles) */
.article-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* .article-container — simple wrapper, JS (article-sidebar.js) handles the two-column grid */
.article-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.article-container .article-header,
.article-container .article-cover {
  grid-column: 1 / -1;
}

/* Article body (left column) */
.article-body {
  min-width: 0; /* prevent grid blowout */
}

/* Sidebar (right column) */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.sidebar-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.sidebar-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-toc-list li a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0 4px 10px;
  border-left: 2px solid var(--border);
  display: block;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.4;
}

.sidebar-toc-list li a:hover,
.sidebar-toc-list li a.active {
  color: var(--primary-light);
  border-color: var(--primary);
}

/* Article body typography */
.article-layout h2,
.article-body h2,
.article-content h2 {
  font-size: 1.5rem;
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

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

.article-layout h3,
.article-body h3,
.article-content h3 {
  font-size: 1.2rem;
  margin: 30px 0 10px;
  color: var(--primary-light);
}

.article-layout p,
.article-body p,
.article-content p {
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.85;
}

.article-layout ul, .article-layout ol,
.article-body ul, .article-body ol,
.article-content ul, .article-content ol {
  margin: 0 0 20px 24px;
  color: var(--text-secondary);
}

.article-layout li,
.article-body li,
.article-content li {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.75;
}

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

.article-layout a,
.article-body a,
.article-content a {
  color: var(--primary-light);
  text-decoration: underline;
  text-decoration-color: rgba(108,99,255,0.3);
  text-underline-offset: 3px;
}

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

.article-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-content th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
}

.article-content td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.article-content tr:hover td {
  background: rgba(108,99,255,0.03);
}

.pro-tip {
  background: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(108,99,255,0.08));
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 0.95rem;
}

.pro-tip strong { color: var(--accent); }

/* === Newsletter Section === */
.newsletter {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  margin: 60px 0;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
}

.newsletter h2 { font-size: 1.8rem; margin-bottom: 12px; }
.newsletter p { color: var(--text-secondary); margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form input::placeholder { color: var(--text-muted); }

.newsletter-form button {
  padding: 14px 28px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.newsletter-form button:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }

/* === Footer === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 300px;
}

.footer h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Page Header (for static pages) === */
.page-header {
  padding: calc(var(--header-height) + 60px) 24px 40px;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-content h2 { font-size: 1.5rem; margin: 36px 0 12px; }
.page-content h3 { font-size: 1.2rem; margin: 28px 0 10px; color: var(--primary-light); }
.page-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }
.page-content ul, .page-content ol { margin: 0 0 16px 20px; color: var(--text-secondary); }
.page-content li { margin-bottom: 8px; line-height: 1.7; }
.page-content strong { color: var(--text-primary); }
.page-content a { color: var(--primary-light); }

/* === Ad Placeholders === */
.ad-space {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 30px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }

/* === Responsive === */

/* Tablet: collapse sidebar to bottom */
@media (max-width: 1024px) {
  .article-layout,
  .article-container {
    grid-template-columns: 1fr;
    max-width: 760px;
    gap: 32px;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10,14,26,0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }

  .hero { padding: 120px 20px 60px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  .articles-grid { grid-template-columns: 1fr; }
  
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .article-card-image { min-height: 200px; }
  .featured-card .article-card-body { padding: 24px; }
  .featured-card .article-card-title { font-size: 1.3rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  
  .newsletter { padding: 40px 20px; }
  .newsletter-form { flex-direction: column; }
  .nav { padding: 0 18px; }
  .logo { font-size: 1.05rem; }
  .main { padding: 44px 18px; }
  .article-content,
  .article-header,
  .article-cover,
  .page-content { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.6rem; }
  .article-meta,
  .article-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .hero-cta,
  .newsletter-form button {
    width: 100%;
    justify-content: center;
  }
}

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

/* === Dynamic TOC === */
.article-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
}
.article-toc h3 {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}
.article-toc ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.article-toc li {
  margin-bottom: 8px;
}
.article-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}
.article-toc a:hover {
  color: var(--primary-light);
}

/* === Social Shares === */
.social-shares {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.share-btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white !important;
  text-decoration: none !important;
  transition: var(--transition);
}
.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.share-btn.twitter { background: #000000; border: 1px solid #333; }
.share-btn.facebook { background: #1877F2; }
.share-btn.linkedin { background: #0A66C2; }

/* === Related Articles === */
.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-articles h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.related-card {
  background: var(--bg-elevated);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.related-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.related-card h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}
.related-card .read-more {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 600;
}

/* ========================================
   CORE WEB VITALS — PERFORMANCE
   ======================================== */

/* CLS: reserve space for all images before load */
img { max-width: 100%; height: auto; display: block; color: transparent; }

/* CLS: off-screen cards use content-visibility */
.articles-grid .article-card:nth-child(n+7) {
  content-visibility: auto;
  contain-intrinsic-size: 0 380px;
}

/* CLS: isolate card layout calculations */
.article-card { contain: layout style; }

/* LCP: smooth fade-in once image loads */
img[loading="lazy"] { opacity: 0; transition: opacity .3s ease; }
img[loading="lazy"].img-loaded { opacity: 1; }

/* Reduced motion: accessibility + perf */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print: strip decorative elements */
@media print {
  .header, .footer, .share-row, .share-bar,
  #read-progress, .back-top, .filter-pills { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  .article-container { max-width: 100%; padding: 0; }
}

/* ========================================
   ARTICLE TEMPLATE ENHANCEMENTS (UX/SEO)
   ======================================== */

.key-takeaways {
  background: rgba(108, 99, 255, 0.03);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.key-takeaways-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.key-takeaways-title::before {
  content: "💡";
}
.key-takeaways ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: square;
}
.key-takeaways li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.key-takeaways li:last-child {
  margin-bottom: 0;
}

/* Responsive Tables */
.aph-table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.aph-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.aph-table th, .aph-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.aph-table th {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.aph-table tr:last-child td {
  border-bottom: none;
}
.aph-table tr:hover td {
  background-color: rgba(108, 99, 255, 0.04);
  color: var(--text-primary);
}

/* Timeline */
.aph-timeline {
  position: relative;
  margin: 36px 0;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}
.aph-timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.aph-timeline-item:last-child {
  margin-bottom: 0;
}
.aph-timeline-badge {
  position: absolute;
  left: -41px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--border);
}
.aph-timeline-time {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.aph-timeline-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.aph-timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Pros and Cons */
.aph-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}
@media (max-width: 640px) {
  .aph-pros-cons {
    grid-template-columns: 1fr;
  }
}
.aph-pros-box, .aph-cons-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.aph-pros-box {
  border-top: 4px solid var(--accent);
  background: rgba(0, 212, 170, 0.01);
}
.aph-cons-box {
  border-top: 4px solid #EF4444;
  background: rgba(239, 68, 68, 0.01);
}
.aph-pros-title, .aph-cons-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aph-pros-title { color: var(--accent); }
.aph-cons-title { color: #EF4444; }
.aph-pros-cons ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.aph-pros-cons li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.aph-pros-cons li:last-child {
  margin-bottom: 0;
}
.aph-pros-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}
.aph-cons-box li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: #EF4444;
  font-weight: bold;
}

/* Info & Callout Boxes */
.info-box {
  padding: 18px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  display: flex;
  gap: 14px;
  font-size: 0.92rem;
  line-height: 1.6;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.info-box-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.info-box.info {
  border-left: 4px solid var(--primary);
  background: rgba(108, 99, 255, 0.02);
}
.info-box.warning {
  border-left: 4px solid #F59E0B;
  background: rgba(245, 158, 11, 0.02);
}

/* FAQ Accordion */
.aph-faq-section {
  margin: 48px 0;
}
.aph-faq-section h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}
.aph-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
  transition: var(--transition);
}
.aph-faq-item:hover {
  border-color: var(--border-hover);
}
.aph-faq-question {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: rgba(148, 163, 184, 0.01);
  transition: var(--transition);
}
.aph-faq-question:hover {
  background: rgba(148, 163, 184, 0.03);
}
.aph-faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: transform 0.25s ease;
}
.aph-faq-item.active .aph-faq-question::after {
  transform: rotate(45deg);
  color: var(--accent);
}
.aph-faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.aph-faq-item.active .aph-faq-answer {
  padding: 16px 24px 20px;
  max-height: 1000px;
  border-top: 1px solid var(--border);
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

/* === Homepage Revamp Styles === */
.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}
.hero-search:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}
.hero-search button {
  background: var(--gradient-primary);
  border: none;
  border-radius: 50px;
  color: white;
  padding: 10px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.hero-search button:hover {
  opacity: 0.9;
}
.hero-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 2;
  margin-top: 10px;
}
.hero-quick-links span {
  font-weight: 600;
}
.hero-quick-links a {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  transition: var(--transition);
  text-decoration: none;
}
.hero-quick-links a:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
}
.trending-section {
  max-width: var(--max-width);
  margin: 30px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.trending-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trending-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.trending-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.trending-links a:hover {
  color: var(--primary-light);
}
.home-compare-section {
  margin: 80px 0;
  border-top: 1px solid var(--border);
  padding-top: 60px;
}
.home-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.home-compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-compare-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.vs-badge {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--accent);
  background: var(--primary-glow);
  padding: 3px 10px;
  border-radius: 50px;
  align-self: flex-start;
}
.home-compare-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.home-compare-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.view-all-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}
.view-all-link:hover {
  color: var(--accent);
}

/* === Responsive Spacing & Layout Fixes (Mobile Viewports) === */

/* Push the breadcrumb navigation below the fixed header to avoid collision */
.bc {
  margin-top: calc(var(--header-height) + 16px) !important;
}

/* Ensure no elements exceed screen width and cause overflow on small devices */
iframe, video, embed {
  max-width: 100% !important;
}

/* Fix spacing on very small screens (under 480px) */
@media (max-width: 480px) {
  .bc {
    padding: 10px 14px 0 !important;
    margin-top: calc(var(--header-height) + 8px) !important;
  }
  .article-container {
    padding: 0 14px 60px !important;
  }
  .key-takeaways {
    padding: 16px !important;
    margin: 20px 0 !important;
  }
  .personal-take {
    padding: 16px !important;
    margin: 20px 0 !important;
  }
  .share-row {
    padding: 12px 16px !important;
    margin: 20px 0 !important;
    gap: 8px !important;
  }
}

/* === Start Here CTA Section === */
.home-start-here {
  background: var(--gradient-card);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 40px 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.home-start-here::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}
.home-start-here-content {
  flex: 1;
  z-index: 1;
}
.home-start-here-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-start-here-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 650px;
  margin: 0;
}
.home-start-here-action {
  z-index: 1;
}
.home-start-here-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-primary);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
  transition: var(--transition);
  white-space: nowrap;
}
.home-start-here-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
  color: white;
}

/* === Popular Articles Section === */
.home-popular-section {
  margin: 60px 0;
  border-top: 1px solid var(--border);
  padding-top: 60px;
}
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.popular-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: row;
  height: 120px;
  text-decoration: none;
  color: inherit;
}
.popular-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.popular-card-image {
  width: 120px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
.popular-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}
.popular-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}
.popular-card-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .home-start-here {
    flex-direction: column;
    text-align: center;
    padding: 30px 24px;
    gap: 24px;
  }
  .home-start-here-content p {
    font-size: 0.95rem;
  }
}
@media (max-width: 480px) {
  .popular-card {
    height: auto;
    flex-direction: column;
  }
  .popular-card-image {
    width: 100%;
    height: 150px;
  }
}

/* === Product Review System === */
.review-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
  margin-bottom: 40px;
}
.review-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-glow);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--primary-light);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.review-stars {
  color: #FFB800;
  font-size: 1.2rem;
  letter-spacing: 2px;
}
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 40px 0;
}
.pros-box, .cons-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.pros-box {
  border-top: 4px solid var(--accent);
}
.cons-box {
  border-top: 4px solid #FF6B6B;
}
.pros-box h3, .cons-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pros-box h3 { color: var(--accent); }
.cons-box h3 { color: #FF6B6B; }
.pros-cons-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pros-cons-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  padding-left: 24px;
}
.pros-box .pros-cons-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}
.cons-box .pros-cons-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #FF6B6B;
  font-weight: 800;
}

/* Pricing Table */
.pricing-section {
  margin: 60px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.pricing-card.popular-plan {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.pricing-card.popular-plan::before {
  content: 'POPULAR';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.pricing-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.pricing-card .price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.pricing-card .price span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li::before {
  content: '•';
  color: var(--primary-light);
  font-size: 1.2rem;
}
.pricing-btn {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.pricing-card.popular-plan .pricing-btn {
  background: var(--gradient-primary);
  border: none;
  color: white;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}
.pricing-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

/* FAQ Box */
.faq-section {
  margin: 60px 0;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  padding: 24px;
}
.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.faq-item p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .pros-cons-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* === Category Grid === */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.category-card .icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.category-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.category-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* === Brands Grid Section === */
.home-brands-section {
  margin: 60px 0;
}
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.brand-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.brand-card .brand-logo {
  font-size: 2.2rem;
  margin-bottom: 8px;
  transition: transform 0.3s;
}
.brand-card:hover .brand-logo {
  transform: scale(1.1);
}
.brand-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.brand-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}
.brand-card .brand-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  padding: 4px 10px;
  border-radius: 50px;
  margin-top: 8px;
}

/* ==========================================================================
   3D TILT & RADIAL GLOW EFFECTS (Spline & Stripe Inspired)
   ========================================================================== */

/* 1. Reset standard card transitions to allow smooth mouse tracking */
.article-card, 
.sidebar-card, 
.related-card, 
.category-card, 
.brand-card,
.hero-cta,
.newsletter-form button,
.share-btn {
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}

/* 2. Base styles for the glow layers */
.article-card::after,
.sidebar-card::after,
.related-card::after,
.category-card::after,
.brand-card::after,
.hero-cta::after,
.newsletter-form button::after,
.share-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  /* Radial glow spotlight */
  background: radial-gradient(
    600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(108, 99, 255, 0.12),
    transparent 45%
  );
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3. Specific adjustments for buttons to make the glow tighter and colorful */
.hero-cta::after,
.newsletter-form button::after {
  background: radial-gradient(
    200px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(0, 212, 170, 0.35),
    transparent 50%
  );
}

/* Show glow on hover */
.article-card:hover::after,
.sidebar-card:hover::after,
.related-card:hover::after,
.category-card:hover::after,
.brand-card:hover::after,
.hero-cta:hover::after,
.newsletter-form button:hover::after,
.share-btn:hover::after {
  opacity: 1;
}

/* 4. Ensure contents stay above the glow layer */
.article-card-image,
.article-card-body,
.sidebar-card > *,
.related-card > *,
.category-card > *,
.brand-card > *,
.hero-cta > *,
.newsletter-form button > *,
.share-btn > * {
  position: relative;
  z-index: 3;
}

/* 5. Lucide icons integration styling */
.lucide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  transition: transform 0.3s var(--transition);
}

.logo .lucide-icon {
  width: 20px;
  height: 20px;
  color: #fff;
  stroke-width: 2.5;
}

/* Smooth micro-animations for interactive cards */
.article-card:hover .article-card-image {
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card-image {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Typing effect cursor styles */
.typing-cursor::after {
  content: '|';
  margin-left: 2px;
  color: var(--accent);
  animation: typingBlink 0.8s infinite;
}

@keyframes typingBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Staggered animation styles for cards scroll reveal */
.articles-grid .article-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.articles-grid .article-card.revealed {
  opacity: 1;
  transform: translateY(0);
}







