/* ===============================================================
   KairiLab - Modern Clean White & Blue Design System
   =============================================================== */

/* RESET & FOUNDATION */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* DESIGN SYSTEM VARIABLES */
:root {
  /* Primary Color Palette - Clean Blue System */
  --color-primary: #1e293b;
  --color-secondary: #475569;
  --color-tertiary: #64748b;
  --color-quaternary: #94a3b8;

  /* Blue Accent System */
  --color-blue-50: #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-200: #bfdbfe;
  --color-blue-300: #93c5fd;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-blue-800: #1e40af;
  --color-blue-900: #1e3a8a;

  /* Green System */
  --color-green-50: #f0fdf4;
  --color-green-100: #dcfce7;
  --color-green-200: #bbf7d0;
  --color-green-300: #86efac;
  --color-green-400: #4ade80;
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;
  --color-green-700: #15803d;
  --color-green-800: #166534;
  --color-green-900: #14532d;

  /* Red System */
  --color-red-50: #fef2f2;
  --color-red-100: #fee2e2;
  --color-red-200: #fecaca;
  --color-red-300: #fca5a5;
  --color-red-400: #f87171;
  --color-red-500: #ef4444;
  --color-red-600: #dc2626;
  --color-red-700: #b91c1c;
  --color-red-800: #991b1b;
  --color-red-900: #7f1d1d;

  /* Yellow System */
  --color-yellow-50: #fefce8;
  --color-yellow-100: #fef3c7;
  --color-yellow-200: #fde68a;
  --color-yellow-300: #fcd34d;
  --color-yellow-400: #fbbf24;
  --color-yellow-500: #f59e0b;
  --color-yellow-600: #d97706;
  --color-yellow-700: #b45309;
  --color-yellow-800: #92400e;
  --color-yellow-900: #78350f;

  /* Purple System */
  --color-purple-50: #faf5ff;
  --color-purple-100: #f3e8ff;
  --color-purple-200: #e9d5ff;
  --color-purple-300: #d8b4fe;
  --color-purple-400: #c084fc;
  --color-purple-500: #a855f7;
  --color-purple-600: #9333ea;
  --color-purple-700: #7c3aed;
  --color-purple-800: #6b21a8;
  --color-purple-900: #581c87;

  /* Orange System */
  --color-orange-50: #fff7ed;
  --color-orange-100: #ffedd5;
  --color-orange-200: #fed7aa;
  --color-orange-300: #fdba74;
  --color-orange-400: #fb923c;
  --color-orange-500: #f97316;
  --color-orange-600: #ea580c;
  --color-orange-700: #c2410c;
  --color-orange-800: #9a3412;
  --color-orange-900: #7c2d12;

  /* Primary Accent Colors */
  --color-accent: var(--color-blue-600);
  --color-accent-hover: var(--color-blue-700);
  --color-accent-light: var(--color-blue-50);
  --color-accent-muted: var(--color-blue-100);

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;

  /* Background System */
  --bg-primary: var(--color-white);
  --bg-secondary: var(--color-gray-50);
  --bg-tertiary: var(--color-gray-100);
  --bg-accent: var(--color-blue-50);

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing System - Optimized */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px - maximum recommended */
  --space-16: 3.5rem; /* 56px - reduced from 64px */
  --space-20: 4rem; /* 64px - reduced from 80px */
  --space-24: 4.5rem; /* 72px - reduced from 96px */

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

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-blue: 0 10px 25px -3px rgba(59, 130, 246, 0.15);
  --shadow-blue-lg: 0 20px 40px -12px rgba(59, 130, 246, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 70px;
  --max-width: 1280px;
  --content-max-width: 768px;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
  --font-ja: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo",
    sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Monaco", monospace;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* Category Color System - Enhanced */
  --category-ai: #8b5cf6;
  --category-ai-light: #c4b5fd;
  --category-ai-bg: #f3f4f6;
  --category-ai-border: #ddd6fe;
  --category-programming: #3b82f6;
  --category-programming-light: #93c5fd;
  --category-programming-bg: #eff6ff;
  --category-programming-border: #bfdbfe;
  --category-study: #10b981;
  --category-study-light: #6ee7b7;
  --category-study-bg: #d1fae5;
  --category-study-border: #a7f3d0;
  --category-tech: #f59e0b;
  --category-tech-light: #fcd34d;
  --category-tech-bg: #fef3c7;
  --category-tech-border: #fde68a;
  --category-finance: #ef4444;
  --category-finance-light: #fca5a5;
  --category-finance-bg: #fee2e2;
  --category-finance-border: #fecaca;
  --category-news: #6b7280;
  --category-news-light: #9ca3af;
  --category-news-bg: #f9fafb;
  --category-news-border: #e5e7eb;
  --category-all: #6b7280;
  --category-all-light: #9ca3af;
  --category-all-bg: #f9fafb;
  --category-all-border: #e5e7eb;
}

/* GLOBAL STYLES */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  line-height: 1.5;
}

body {
  font-family: var(--font-ja), var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-primary);
  margin: 0 0 var(--space-6) 0;
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-blue-800) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-8);
}

h2 {
  font-size: var(--text-3xl);
  color: var(--color-gray-900);
  margin: var(--space-16) 0 var(--space-6) 0;
  position: relative;
  padding-bottom: var(--space-4);
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(
    135deg,
    var(--color-blue-500) 0%,
    var(--color-blue-600) 100%
  );
  border-radius: var(--radius-full);
}

h3 {
  font-size: var(--text-2xl);
  color: var(--color-gray-800);
  margin: var(--space-12) 0 var(--space-4) 0;
}

h4 {
  font-size: var(--text-xl);
  color: var(--color-gray-700);
  margin: var(--space-8) 0 var(--space-3) 0;
}

p {
  margin: 0 0 var(--space-6) 0;
  color: var(--color-secondary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

/* === ENHANCED HEADER ============================================ */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-blue-600);
  transition: all var(--transition-normal);
}

.logo:hover {
  color: var(--color-blue-700);
  transform: translateY(-1px);
}

.logo-icon {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--color-blue-600);
  background: linear-gradient(
    135deg,
    var(--color-blue-500) 0%,
    var(--color-blue-600) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: 2px solid var(--color-blue-600);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  color: var(--color-tertiary);
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
}

.nav-link:hover {
  color: var(--color-blue-600);
  background: var(--color-blue-50);
}

.nav-icon {
  font-size: 0.5em;
  color: var(--color-blue-600);
  font-weight: 600;
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  color: var(--color-tertiary);
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
  cursor: pointer;
}

.dropdown-toggle:hover {
  color: var(--color-blue-600);
  background: var(--color-blue-50);
}

.dropdown-arrow {
  transition: transform var(--transition-normal);
  margin-left: var(--space-1);
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-normal);
  z-index: 1000;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--color-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  width: 100%;
}

.dropdown-item:hover {
  color: var(--color-blue-600);
  background: var(--color-blue-50);
}

.dropdown-icon {
  font-size: 1em;
  width: 20px;
  text-align: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-line {
  width: 20px;
  height: 2px;
  background: var(--color-gray-600);
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  margin: 2px 0;
}

/* === MAIN CONTENT =============================================== */
.main-content {
  min-height: 100vh;
  margin-top: var(--header-height);
  padding-top: var(--space-8);
}

/* === BREADCRUMB NAVIGATION ====================================== */
.breadcrumb-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--color-gray-200);
  padding: var(--space-4) 0;
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}

.breadcrumb-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    var(--color-blue-50) 0%,
    var(--color-white) 100%
  );
  opacity: 0.8;
  z-index: -1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-tertiary);
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  color: var(--color-quaternary);
  font-weight: 500;
  margin-left: var(--space-2);
}

.breadcrumb a {
  color: var(--color-blue-600);
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
}

.breadcrumb a:hover {
  color: var(--color-blue-700);
  background: var(--color-blue-50);
  transform: translateY(-1px);
}

/* === ARTICLE PAGE LAYOUT ======================================== */
.article-content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-12);
  position: relative;
}

.article-content-wrapper::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  right: -100px;
  bottom: -100px;
  background: radial-gradient(
    ellipse at top center,
    rgba(59, 130, 246, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

.article-hero {
  text-align: center;
  margin-bottom: var(--space-16);
  padding: var(--space-12) var(--space-8);
  background: linear-gradient(
    135deg,
    var(--color-blue-50) 0%,
    var(--color-white) 100%
  );
  border-radius: var(--radius-3xl);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-blue-100);
}

.article-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at top center,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.article-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-blue-700) 100%
  );
  color: var(--color-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}

.article-category-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.article-category-badge:hover::before {
  left: 100%;
}

.article-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-8);
  background: linear-gradient(
    135deg,
    var(--color-gray-900) 0%,
    var(--color-blue-800) 50%,
    var(--color-blue-600) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.article-title::after {
  content: "";
  position: absolute;
  bottom: -var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-blue-600),
    var(--color-blue-400)
  );
  border-radius: var(--radius-full);
}

.article-lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-secondary);
  margin-bottom: var(--space-10);
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-blue-100);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-tertiary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.meta-item:hover {
  background: var(--color-blue-50);
  color: var(--color-blue-700);
  transform: translateY(-1px);
}

.meta-icon {
  opacity: 0.8;
  font-size: var(--text-lg);
}

.article-hero-visual {
  margin-top: var(--space-16);
}

.hero-placeholder {
  width: 140px;
  height: 140px;
  background: linear-gradient(
    135deg,
    var(--color-blue-100) 0%,
    var(--color-blue-200) 100%
  );
  border-radius: var(--radius-3xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color-blue-200);
}

.hero-placeholder::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%
  );
}

.placeholder-icon {
  font-size: 4rem;
  color: var(--color-blue-600);
  z-index: 2;
  position: relative;
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

.placeholder-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 50%
  );
}

/* === ARTICLE CONTENT ============================================ */
.article-content {
  background: var(--color-white);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin-bottom: var(--space-16);
  border: 1px solid var(--color-gray-200);
  position: relative;
}

.article-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-blue-600),
    var(--color-blue-400),
    var(--color-blue-600)
  );
}

.article-body {
  padding: var(--space-12) var(--space-8);
  line-height: var(--leading-relaxed);
  font-size: var(--text-lg);
  color: var(--color-gray-800);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin: var(--space-12) 0 var(--space-6);
  color: var(--color-gray-900);
  position: relative;
  padding-left: var(--space-6);
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--color-blue-600),
    var(--color-blue-400)
  );
  border-radius: var(--radius-full);
}

.article-body h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: var(--space-10) 0 var(--space-4);
  color: var(--color-gray-800);
}

.article-body h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-3);
  color: var(--color-gray-800);
}

.article-body p {
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

.article-body strong {
  font-weight: 700;
  color: var(--color-gray-900);
}

.article-body em {
  font-style: italic;
  color: var(--color-blue-700);
}

.highlight-box {
  background: linear-gradient(
    135deg,
    var(--color-blue-50) 0%,
    var(--color-white) 100%
  );
  border: 1px solid var(--color-blue-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  margin: var(--space-8) 0;
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--color-blue-600),
    var(--color-blue-400)
  );
}

.highlight-box h3 {
  color: var(--color-blue-800);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  font-weight: 700;
}

.highlight-box ul {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}

.highlight-box li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

.tips-box {
  background: linear-gradient(
    135deg,
    var(--color-green-50) 0%,
    var(--color-white) 100%
  );
  border: 1px solid var(--color-green-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  margin: var(--space-8) 0;
  position: relative;
  overflow: hidden;
}

.tips-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--color-green-600),
    var(--color-green-400)
  );
}

.tips-box h3,
.tips-box h4 {
  color: var(--color-green-800);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  font-weight: 700;
}

.warning-box {
  background: linear-gradient(
    135deg,
    var(--color-red-50) 0%,
    var(--color-white) 100%
  );
  border: 1px solid var(--color-red-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  margin: var(--space-8) 0;
  position: relative;
  overflow: hidden;
}

.warning-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--color-red-600),
    var(--color-red-400)
  );
}

.warning-box h3 {
  color: var(--color-red-800);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  font-weight: 700;
}

.warning-box p {
  color: var(--color-red-700);
  margin-bottom: 0;
}

.code-block {
  background: var(--color-gray-900);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  overflow-x: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-100);
}

.code-block code {
  font-family: var(--font-mono);
  background: var(--color-gray-800);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-gray-100);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-white);
}

.table-row {
  border-bottom: 1px solid var(--color-gray-200);
}

.table-row.header {
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-blue-700) 100%
  );
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--text-lg);
}

.table-row:not(.header) {
  transition: background var(--transition-fast);
}

.table-row:not(.header):nth-child(even) {
  background: var(--color-gray-50);
}

.table-row:not(.header):hover {
  background: var(--color-blue-50);
}

.table-cell {
  padding: var(--space-6);
  text-align: left;
  vertical-align: top;
  line-height: var(--leading-relaxed);
}

.table-cell:last-child {
  border-right: none;
}

.table-row.header .table-cell {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-sm);
}

/* === LISTS ====================================================== */
ul,
ol {
  margin: 0 0 var(--space-6) 0;
  padding-left: var(--space-8);
}

li {
  margin: 0 0 var(--space-3) 0;
  line-height: var(--leading-relaxed);
  color: var(--color-secondary);
}

li:last-child {
  margin-bottom: 0;
}

/* === ARTICLE FOOTER ============================================= */
.article-footer {
  padding: var(--space-8) var(--space-12);
  background: var(--color-gray-50);
  border-top: 1px solid var(--color-gray-200);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.tag {
  background: var(--color-blue-100);
  color: var(--color-blue-700);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: var(--color-blue-200);
  transform: translateY(-1px);
}

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

.share-label {
  font-weight: 500;
  color: var(--color-tertiary);
  font-size: var(--text-sm);
}

.share-btn {
  background: var(--color-blue-600);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.share-btn:hover {
  background: var(--color-blue-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* === ENHANCED HOMEPAGE STYLES =================================== */

/* Premium Hero Section */
.hero-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--color-blue-50) 0%,
    var(--color-white) 100%
  );
  border-radius: var(--radius-3xl);
  margin-bottom: var(--space-16);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at top center,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: patternMove 20s linear infinite;
  pointer-events: none;
}

@keyframes patternMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(59, 130, 246, 0.05) 30%,
    transparent 70%
  );
  border-radius: 50%;
  animation: heroGlow 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  padding: var(--space-16) var(--space-8);
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-blue-700) 100%
  );
  color: var(--color-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}

.hero-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.hero-badge:hover::before {
  left: 100%;
}

.hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue-lg);
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-8);
  position: relative;
}

.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--color-gray-900) 0%,
    var(--color-blue-800) 50%,
    var(--color-blue-600) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-gradient::after {
  content: "";
  position: absolute;
  bottom: -var(--space-4);
  left: 0;
  width: 120px;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--color-blue-600),
    var(--color-blue-400)
  );
  border-radius: var(--radius-full);
}

.hero-description {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-secondary);
  margin-bottom: var(--space-10);
  max-width: 500px;
}

.hero-description strong {
  color: var(--color-blue-700);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-blue-700) 100%
  );
  color: var(--color-white);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-2xl);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-blue);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-blue-lg);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: transparent;
  color: var(--color-blue-700);
  padding: var(--space-4) var(--space-8);
  border: 2px solid var(--color-blue-200);
  border-radius: var(--radius-2xl);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-lg);
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: var(--color-blue-50);
  border-color: var(--color-blue-400);
  color: var(--color-blue-800);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  z-index: 3;
}

.hero-card {
  background: var(--color-white);
  border-radius: var(--radius-3xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-gray-200);
  position: relative;
  overflow: hidden;
}

.hero-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
}

.card-dots {
  display: flex;
  gap: var(--space-1);
}

.card-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gray-300);
}

.card-dots span:nth-child(1) {
  background: var(--color-red-500);
}

.card-dots span:nth-child(2) {
  background: var(--color-yellow-500);
}

.card-dots span:nth-child(3) {
  background: var(--color-green-500);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
}

.card-content {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-700);
  background: var(--color-gray-50);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
}

.code-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.line-number {
  color: var(--color-gray-400);
  font-size: var(--text-xs);
  min-width: 20px;
  text-align: right;
}

.keyword {
  color: var(--color-blue-600);
}

.string {
  color: var(--color-green-600);
}

.variable {
  color: var(--color-purple-600);
}

.operator {
  color: var(--color-gray-600);
}

.parameter {
  color: var(--color-orange-600);
}

.method {
  color: var(--color-blue-600);
}

.punctuation {
  color: var(--color-gray-500);
}

.comment {
  color: var(--color-gray-400);
  font-style: italic;
}

.indent {
  margin-left: var(--space-4);
}

.code-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--color-blue-600);
  animation: blink 1s infinite;
  margin-left: var(--space-1);
}

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

.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(59, 130, 246, 0.05)
  );
  animation: float 6s ease-in-out infinite;
}

.decoration-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  right: 10%;
  animation-delay: 0s;
}

.decoration-2 {
  width: 60px;
  height: 60px;
  bottom: 30%;
  left: 5%;
  animation-delay: 2s;
}

.decoration-3 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 20%;
  animation-delay: 4s;
}

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

/* === ENHANCED SECTIONS ========================================== */
.featured-section,
.latest-section {
  padding: var(--space-20) 0;
  background: var(--bg-secondary);
  position: relative;
}

.featured-section {
  background: linear-gradient(
    135deg,
    var(--color-white) 0%,
    var(--color-blue-50) 100%
  );
}

.latest-section {
  background: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
  position: relative;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-white);
  color: var(--color-blue-700);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-blue-200);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.section-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.section-badge:hover::before {
  left: 100%;
}

.section-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  color: var(--color-gray-900);
  position: relative;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* Enhanced Filter Tabs with Category Colors */
.filter-container {
  margin-bottom: var(--space-12);
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  background: var(--color-gray-100);
  padding: var(--space-2);
  border-radius: var(--radius-xl);
  max-width: fit-content;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: none;
  background: transparent;
  color: var(--color-tertiary);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  border: 2px solid transparent;
}

/* Category-specific filter tab styles */
.filter-tab[data-category="all"] {
  color: var(--category-all);
}

.filter-tab[data-category="all"]:hover {
  background: var(--category-all-bg);
  color: var(--category-all);
  border-color: var(--category-all-border);
}

.filter-tab[data-category="all"].active {
  background: var(--category-all);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.filter-tab[data-category="ai"] {
  color: var(--category-ai);
}

.filter-tab[data-category="ai"]:hover {
  background: var(--category-ai-bg);
  color: var(--category-ai);
  border-color: var(--category-ai-border);
}

.filter-tab[data-category="ai"].active {
  background: var(--category-ai);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.filter-tab[data-category="programming"] {
  color: var(--category-programming);
}

.filter-tab[data-category="programming"]:hover {
  background: var(--category-programming-bg);
  color: var(--category-programming);
  border-color: var(--category-programming-border);
}

.filter-tab[data-category="programming"].active {
  background: var(--category-programming);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.filter-tab[data-category="study"] {
  color: var(--category-study);
}

.filter-tab[data-category="study"]:hover {
  background: var(--category-study-bg);
  color: var(--category-study);
  border-color: var(--category-study-border);
}

.filter-tab[data-category="study"].active {
  background: var(--category-study);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.filter-tab[data-category="tech"] {
  color: var(--category-tech);
}

.filter-tab[data-category="tech"]:hover {
  background: var(--category-tech-bg);
  color: var(--category-tech);
  border-color: var(--category-tech-border);
}

.filter-tab[data-category="tech"].active {
  background: var(--category-tech);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.filter-tab[data-category="finance"] {
  color: var(--category-finance);
}

.filter-tab[data-category="finance"]:hover {
  background: var(--category-finance-bg);
  color: var(--category-finance);
  border-color: var(--category-finance-border);
}

.filter-tab[data-category="finance"].active {
  background: var(--category-finance);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.filter-tab[data-category="news"] {
  color: var(--category-news);
}

.filter-tab[data-category="news"]:hover {
  background: var(--category-news-bg);
  color: var(--category-news);
  border-color: var(--category-news-border);
}

.filter-tab[data-category="news"].active {
  background: var(--category-news);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  background: var(--color-gray-200);
  color: var(--color-gray-600);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  transition: all var(--transition-normal);
}

/* Category-specific count styles */
.filter-tab[data-category="all"] .tab-count {
  background: var(--category-all-light);
  color: var(--category-all);
}

.filter-tab[data-category="all"].active .tab-count {
  background: var(--color-white);
  color: var(--category-all);
}

.filter-tab[data-category="ai"] .tab-count {
  background: var(--category-ai-light);
  color: var(--category-ai);
}

.filter-tab[data-category="ai"].active .tab-count {
  background: var(--color-white);
  color: var(--category-ai);
}

.filter-tab[data-category="programming"] .tab-count {
  background: var(--category-programming-light);
  color: var(--category-programming);
}

.filter-tab[data-category="programming"].active .tab-count {
  background: var(--color-white);
  color: var(--category-programming);
}

.filter-tab[data-category="study"] .tab-count {
  background: var(--category-study-light);
  color: var(--category-study);
}

.filter-tab[data-category="study"].active .tab-count {
  background: var(--color-white);
  color: var(--category-study);
}

.filter-tab[data-category="tech"] .tab-count {
  background: var(--category-tech-light);
  color: var(--category-tech);
}

.filter-tab[data-category="tech"].active .tab-count {
  background: var(--color-white);
  color: var(--category-tech);
}

.filter-tab[data-category="finance"] .tab-count {
  background: var(--category-finance-light);
  color: var(--category-finance);
}

.filter-tab[data-category="finance"].active .tab-count {
  background: var(--color-white);
  color: var(--category-finance);
}

.filter-tab[data-category="news"] .tab-count {
  background: var(--category-news-light);
  color: var(--category-news);
}

.filter-tab[data-category="news"].active .tab-count {
  background: var(--color-white);
  color: var(--category-news);
}

/* Enhanced Articles Grid */
.articles-grid,
.articles-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
  padding: var(--space-4) 0;
}

.article-card {
  background: var(--color-white);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-gray-100);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    135deg,
    var(--color-blue-500) 0%,
    var(--color-purple-500) 50%,
    var(--color-blue-600) 100%
  );
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.02) 0%,
    rgba(168, 85, 247, 0.02) 50%,
    rgba(59, 130, 246, 0.02) 100%
  );
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.article-card:hover::before {
  opacity: 1;
  height: 6px;
}

.article-card:hover::after {
  opacity: 1;
}

.article-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 10px 20px -5px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.article-content {
  padding: var(--space-10);
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.article-footer {
  margin-top: auto;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-gray-100);
  position: relative;
  z-index: 2;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  justify-content: flex-start;
  position: relative;
  z-index: 3;
}

.article-category {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.article-category::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: currentColor;
  opacity: 0.8;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Category-specific colors */
.article-category[data-category="ai"] {
  background: var(--category-ai-bg);
  color: var(--category-ai);
  border: 1px solid var(--category-ai-light);
}

.article-category[data-category="programming"] {
  background: var(--category-programming-bg);
  color: var(--category-programming);
  border: 1px solid var(--category-programming-light);
}

.article-category[data-category="study"] {
  background: var(--category-study-bg);
  color: var(--category-study);
  border: 1px solid var(--category-study-light);
}

.article-category[data-category="tech"] {
  background: var(--category-tech-bg);
  color: var(--category-tech);
  border: 1px solid var(--category-tech-light);
}

.article-category[data-category="finance"] {
  background: var(--category-finance-bg);
  color: var(--category-finance);
  border: 1px solid var(--category-finance-light);
}

.article-category[data-category="news"] {
  background: var(--category-news-bg);
  color: var(--category-news);
  border: 1px solid var(--category-news-light);
}

.article-category[data-category="all"] {
  background: var(--category-all-bg);
  color: var(--category-all);
  border: 1px solid var(--category-all-light);
}

.category-icon {
  font-size: 1em;
  font-weight: 700;
  opacity: 0.8;
}

.article-date {
  color: var(--color-quaternary);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
  position: relative;
  z-index: 3;
}

.article-date::before {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.7;
}

.article-title a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  display: block;
  margin-bottom: var(--space-6);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 3;
  background: linear-gradient(
    135deg,
    var(--color-gray-900) 0%,
    var(--color-blue-700) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.article-title a:hover {
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-purple-600) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: translateY(-2px);
}

.article-excerpt {
  color: var(--color-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
  flex-grow: 1;
  position: relative;
  z-index: 3;
  font-weight: 400;
}

.read-more {
  color: var(--color-blue-600);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-base);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 3;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(168, 85, 247, 0.1) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(4px);
}

.read-more:hover {
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-purple-600) 100%
  );
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.read-more::after {
  content: "↗";
  font-size: 1.2em;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.read-more:hover::after {
  transform: translateX(3px) translateY(-3px);
}

/* === FEATURED ARTICLE STYLES =================================== */
.featured-article {
  background: linear-gradient(
    135deg,
    var(--color-white) 0%,
    rgba(248, 250, 252, 0.8) 100%
  );
  border-radius: var(--radius-3xl);
  padding: var(--space-12);
  border: 1px solid var(--color-gray-100);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 20px -5px rgba(59, 130, 246, 0.05);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.featured-article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(
    135deg,
    var(--color-blue-500) 0%,
    var(--color-purple-500) 50%,
    var(--color-blue-600) 100%
  );
}

.featured-article::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(168, 85, 247, 0.1) 100%
  );
  border-radius: var(--radius-full);
  filter: blur(20px);
}

.featured-article .article-meta {
  margin-bottom: var(--space-6);
}

.featured-article .article-category {
  background: linear-gradient(
    135deg,
    var(--color-blue-500) 0%,
    var(--color-purple-500) 100%
  );
  color: var(--color-white);
  border: none;
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-6);
}

.featured-article .article-title a {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: var(--space-8);
  background: linear-gradient(
    135deg,
    var(--color-gray-900) 0%,
    var(--color-blue-700) 50%,
    var(--color-purple-700) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.featured-article .article-excerpt {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  color: var(--color-secondary);
  font-weight: 500;
}

.featured-article .read-more {
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(
    135deg,
    var(--color-blue-600) 0%,
    var(--color-purple-600) 100%
  );
  color: var(--color-white);
  border: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.featured-article .read-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* === ENHANCED FOOTER ============================================ */
.footer {
  background: linear-gradient(
    135deg,
    var(--color-gray-900) 0%,
    var(--color-gray-800) 100%
  );
  color: var(--color-gray-300);
  padding: var(--space-20) 0 var(--space-8);
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gray-600),
    transparent
  );
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  margin-bottom: var(--space-6);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-logo .logo-icon {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--color-blue-400);
  background: linear-gradient(
    135deg,
    var(--color-blue-400) 0%,
    var(--color-blue-600) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: 2px solid var(--color-blue-400);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo .logo-text {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-white);
}

.footer-description {
  color: var(--color-gray-400);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  font-size: var(--text-base);
}

.footer-section-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-6);
  position: relative;
}

.footer-section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-blue-500);
  border-radius: var(--radius-full);
}

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

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--color-gray-400);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-size: var(--text-base);
  display: inline-block;
  position: relative;
}

.footer-links a::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-blue-400);
  transition: width var(--transition-normal);
}

.footer-links a:hover {
  color: var(--color-blue-400);
  transform: translateX(4px);
}

.footer-links a:hover::before {
  width: 100%;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: var(--color-gray-400);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--color-blue-600);
  border-color: var(--color-blue-500);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-700);
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  color: var(--color-gray-500);
  font-size: var(--text-sm);
  margin: 0;
}

.footer-love {
  color: var(--color-gray-400);
  font-size: var(--text-sm);
}

/* === RESPONSIVE DESIGN ========================================== */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-4);
  }

  .article-content-wrapper {
    padding: var(--space-6) var(--space-4) var(--space-10);
  }

  .article-body {
    padding: var(--space-8) var(--space-6);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    padding: var(--space-12) var(--space-6);
  }

  .hero-title {
    font-size: var(--text-5xl);
  }

  .hero-description {
    font-size: var(--text-lg);
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-grid {
    padding: var(--space-8) var(--space-4);
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card {
    max-width: 100%;
  }

  .article-title {
    font-size: var(--text-3xl);
  }

  .articles-grid,
  .articles-grid-modern {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: var(--space-2) 0;
  }

  .article-card {
    margin: 0 var(--space-2) var(--space-6);
    min-height: 280px;
  }

  .article-card:hover {
    transform: translateY(-6px) scale(1.01);
  }

  .article-content {
    padding: var(--space-8);
  }

  .article-title a {
    font-size: var(--text-xl);
  }

  .article-excerpt {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
  }

  .read-more {
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
  }

  .featured-article {
    padding: var(--space-8);
    margin: 0 var(--space-2);
  }

  .featured-article .article-title a {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    margin-bottom: var(--space-6);
  }

  .featured-article .article-excerpt {
    font-size: var(--text-lg);
    margin-bottom: var(--space-8);
  }

  .filter-tabs {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    text-align: center;
  }

  .table-row {
    display: block;
    margin-bottom: var(--space-4);
  }

  .table-cell {
    display: block;
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-gray-200);
  }

  .table-cell:last-child {
    border-bottom: none;
  }

  .article-meta {
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .meta-item {
    justify-content: center;
  }

  .breadcrumb {
    flex-wrap: wrap;
    gap: var(--space-1);
  }

  .breadcrumb li {
    font-size: var(--text-xs);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .article-content-wrapper {
    padding: var(--space-4) var(--space-3) var(--space-8);
  }

  .article-body {
    padding: var(--space-6) var(--space-4);
    font-size: var(--text-base);
  }

  .article-hero-content {
    padding: 0 var(--space-4);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .article-title {
    font-size: var(--text-2xl);
  }

  .articles-grid,
  .articles-grid-modern {
    gap: var(--space-4);
    padding: 0;
  }

  .article-card {
    margin: 0 0 var(--space-4);
    min-height: 260px;
  }

  .article-card:hover {
    transform: translateY(-4px);
  }

  .article-content {
    padding: var(--space-6);
  }

  .article-title a {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
  }

  .article-excerpt {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }

  .read-more {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }

  .featured-article {
    padding: var(--space-6);
    margin: 0;
  }

  .featured-article .article-title a {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    margin-bottom: var(--space-4);
  }

  .featured-article .article-excerpt {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
  }

  h2 {
    font-size: var(--text-2xl);
    padding-left: var(--space-4);
  }

  .article-category-badge {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }

  .hero-badge {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }

  .btn-primary,
  .btn-secondary {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
  }

  .highlight-box,
  .tips-box,
  .warning-box {
    padding: var(--space-6);
    margin: var(--space-6) 0;
  }

  .code-block {
    padding: var(--space-4);
    font-size: var(--text-xs);
  }

  .comparison-table {
    font-size: var(--text-sm);
  }

  .table-cell {
    padding: var(--space-2);
  }

  .article-footer {
    padding: var(--space-6);
  }

  .article-tags {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .tag {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }

  .share-buttons {
    flex-direction: column;
    gap: var(--space-2);
  }

  .share-btn {
    width: 100%;
    text-align: center;
  }
}

/* === READING PROGRESS BAR ======================================= */
.reading-progress,
.reading-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(59, 130, 246, 0.1);
  z-index: 1001;
}

.reading-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-blue-500) 0%,
    var(--color-blue-600) 100%
  );
  width: 0%;
  transition: width 150ms ease-out;
}

/* === ENHANCED MICROINTERACTIONS ================================= */
.article-card {
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
  z-index: 1;
}

.article-card:hover::before {
  left: 100%;
}

/* === NOTIFICATION SYSTEM ======================================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-xl);
  transform: translateX(400px);
  opacity: 0;
  transition: all var(--transition-normal);
  z-index: 10000;
  min-width: 300px;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-info {
  border-left: 4px solid var(--color-blue-500);
}

.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-message {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
  font-weight: 500;
}

.notification-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  background: none;
  border: none;
  font-size: var(--text-lg);
  color: var(--color-tertiary);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.notification-close:hover {
  background: var(--color-gray-100);
  color: var(--color-primary);
}

/* === ENHANCED FILTER TABS ======================================= */
.filter-tab {
  position: relative;
}

.filter-tab::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-blue-600);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.filter-tab.active::before {
  width: 80%;
}

/* === IMPROVED LOADING STATES ==================================== */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-6);
  text-align: center;
}

.sophisticated-loader {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-6);
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid var(--color-blue-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: var(--color-blue-400);
  animation-duration: 1.5s;
  animation-direction: reverse;
}

.loader-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top-color: var(--color-blue-300);
  animation-duration: 2s;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: var(--color-tertiary);
  font-weight: 500;
  font-size: var(--text-base);
}

/* === NO RESULTS STATE =========================================== */
.no-results-container {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--color-tertiary);
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: var(--space-6);
  opacity: 0.7;
}

.no-results-container h3 {
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.no-results-container p {
  color: var(--color-secondary);
  font-size: var(--text-base);
}
