/**
 * Genesis Media - Ultra Modern Front Theme
 * Elegant Glassmorphism design with Dark/Light mode support
 * Premium UI/UX for blog content, categories, and pages
 */

/* ========================================
   CSS VARIABLES - THEME SYSTEM
   ======================================== */

:root {
  /* Primary brand colors */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  /* Accent colors */
  --accent-emerald: #10b981;
  --accent-violet: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;
  
  /* Glass effect */
  --glass-blur: 24px;
  --glass-saturation: 180%;
}

/* ========================================
   DARK MODE - Deep cosmic with aurora
   ======================================== */
.dark {
  /* Background - cosmic gradient */
  --bg-primary: #0a0f1c;
  --bg-secondary: #111827;
  --bg-tertiary: #1a1f35;
  --bg-gradient: radial-gradient(ellipse at 0% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
                 radial-gradient(ellipse at 100% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                 radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
                 linear-gradient(180deg, #0a0f1c 0%, #111827 50%, #0f172a 100%);
  
  /* Glass colors */
  --glass-bg: rgba(17, 24, 39, 0.65);
  --glass-bg-hover: rgba(31, 41, 55, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.03);
  
  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  /* Surface colors */
  --surface-1: rgba(17, 24, 39, 0.5);
  --surface-2: rgba(31, 41, 55, 0.7);
  --surface-3: rgba(55, 65, 81, 0.85);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.12);
  --shadow-glow-accent: 0 0 40px rgba(139, 92, 246, 0.18);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #f43f5e 100%);
  --gradient-text: linear-gradient(135deg, #f8fafc 0%, #93c5fd 50%, #c4b5fd 100%);
}

/* ========================================
   LIGHT MODE - Elegant airy
   ======================================== */
.light {
  /* Background - soft gradient */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-gradient: radial-gradient(ellipse at 0% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
                 radial-gradient(ellipse at 100% 0%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
                 radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.04) 0%, transparent 50%),
                 linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  
  /* Glass colors */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(148, 163, 184, 0.15);
  --glass-border-hover: rgba(148, 163, 184, 0.3);
  --glass-highlight: rgba(255, 255, 255, 0.8);
  
  /* Text colors */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  /* Surface colors */
  --surface-1: rgba(255, 255, 255, 0.7);
  --surface-2: rgba(248, 250, 252, 0.85);
  --surface-3: rgba(241, 245, 249, 0.95);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08);
  --shadow-glow-accent: 0 0 40px rgba(139, 92, 246, 0.12);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  --gradient-warm: linear-gradient(135deg, #d97706 0%, #e11d48 100%);
  --gradient-text: linear-gradient(135deg, #0f172a 0%, #2563eb 50%, #7c3aed 100%);
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: color 0.3s ease;
}

/* Selection */
::selection {
  background: var(--primary-500);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

/* ========================================
   GLASSMORPHISM COMPONENTS
   ======================================== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 0 var(--glass-highlight);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl), var(--shadow-glow), inset 0 1px 0 0 var(--glass-highlight);
}

.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
}

.glass-input {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 100%;
}

.glass-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

/* Form inputs inside page/post content */
.prose input[type="text"],
.prose input[type="email"],
.prose input[type="url"],
.prose input[type="tel"],
.prose input[type="number"],
.prose input[type="password"],
.prose input[type="search"],
.prose textarea,
.prose select {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
  width: 100%;
}

.prose input:focus,
.prose textarea:focus,
.prose select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.prose input::placeholder,
.prose textarea::placeholder {
  color: var(--text-muted);
}

.prose button,
.prose input[type="submit"],
.prose input[type="button"] {
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prose button:hover,
.prose input[type="submit"]:hover,
.prose input[type="button"]:hover {
  background: var(--primary-600);
}

/* Strip forced light backgrounds from imported content */
.prose span[style*="background-color"],
.prose em[style*="background-color"],
.prose strong[style*="background-color"],
.prose p[style*="background-color"],
.prose div[style*="background-color"],
.prose *[style*="background-color: rgb(255"],
.prose *[style*="background-color: #fff"],
.prose *[style*="background-color: #ffffff"] {
  background-color: transparent !important;
}

/* Also force all prose inline elements transparent */
.prose span,
.prose em,
.prose strong,
.prose i,
.prose b,
.prose a {
  background-color: transparent !important;
}

/* Elementor widget backgrounds */
.prose .elementor-widget-container {
  background-color: transparent !important;
}

/* Form layout improvements */
.prose .gfield,
.prose .wpforms-field,
.prose p:has(> input),
.prose p:has(> textarea) {
  margin-bottom: 1.25rem;
}

.prose .ginput_container,
.prose .name_wrap,
.prose .ginput_complex {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
}

.prose .wpforms-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.prose .wpforms-field-row-block {
  flex: 1;
  min-width: 12rem;
}

.prose .wpforms-field-row-block input,
.prose .wpforms-field-row-block textarea {
  width: 100%;
}

.prose .gfield_label,
.prose .wpforms-field-label,
.prose label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.prose .gfield_description,
.prose .wpforms-field-sublabel,
.prose .ginput_container + label,
.prose input + label,
.prose textarea + label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

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

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

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

.title-hero {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.title-section {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.title-card {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.body-large {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.body-small {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-1);
  color: var(--text-primary);
}

/* ========================================
   ELEGANT BLOG CARDS
   ======================================== */

.blog-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md), inset 0 1px 0 0 var(--glass-highlight);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-xl), var(--shadow-glow), inset 0 1px 0 0 var(--glass-highlight);
  border-color: var(--glass-border-hover);
}

.blog-card .card-image-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

.blog-card .card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .card-image {
  transform: scale(1.08);
}

.blog-card .card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(0,0,0,0.4) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.blog-card:hover .card-image-overlay {
  opacity: 1;
}

.blog-card .card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
}

.blog-card .card-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
}

.blog-card:hover .card-category-badge {
  background: var(--gradient-primary);
  border-color: transparent;
}

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

.blog-card .card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.blog-card:hover .card-title {
  color: var(--primary-400);
}

.blog-card .card-excerpt {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card .card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.blog-card .card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.blog-card .card-meta-icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

/* Placeholder state */
.blog-card .card-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

.blog-card .card-image-placeholder svg {
  width: 3rem;
  height: 3rem;
  color: var(--text-subtle);
  opacity: 0.5;
}

/* Featured card variant (larger) */
.blog-card-featured .card-image-wrapper {
  padding-top: 60%;
}

.blog-card-featured .card-title {
  font-size: 1.375rem;
}

/* ========================================
   FEATURED HERO CARDS
   ======================================== */

.card-featured {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  min-height: 420px;
}

.card-featured .card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-featured:hover .card-image {
  transform: scale(1.05);
}

.card-featured .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
  transition: all 0.4s ease;
}

.card-featured:hover .card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}

.card-featured .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem;
  z-index: 10;
}

.card-featured .card-category {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.card-featured .card-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  margin-bottom: 1rem;
}

.card-featured .card-excerpt {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
}

.card-featured .card-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

/* ========================================
   CATEGORY CARDS
   ======================================== */

.category-card {
  position: relative;
  height: 280px;
  border-radius: 1.5rem;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.category-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-xl), var(--shadow-glow-accent);
}

.category-card .category-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.category-card .category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  transition: all 0.4s ease;
}

.category-card:hover .category-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.1) 100%);
}

.category-card .category-content {
  position: relative;
  z-index: 1;
  color: white;
}

.category-card .category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.category-card .category-count {
  font-size: 0.875rem;
  opacity: 0.8;
}

.category-card .category-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s ease;
}

.category-card:hover .category-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-400);
}

.dark .badge-primary {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-300);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-rose {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-1);
}

.nav-link.active {
  color: var(--primary-500);
  background: rgba(59, 130, 246, 0.1);
}

/* ========================================
   THEME TOGGLE
   ======================================== */

.theme-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--glass-bg-hover);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.theme-toggle:hover svg {
  color: var(--text-primary);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
  animation: heroPulse 10s ease-in-out infinite;
  pointer-events: none;
}

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

/* ========================================
   GRID & LAYOUT
   ======================================== */

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease forwards;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ========================================
   READING PROGRESS
   ======================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg-primary);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  margin-top: auto;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: var(--primary-500);
  transform: translateX(4px);
}

/* ========================================
   PROSE CONTENT (for blog posts)
   ======================================== */

.prose {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.8;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.prose h1 { font-size: 2.5rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

.prose p {
  margin-bottom: 1.5rem;
}

.prose a {
  color: var(--primary-500);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.prose a:hover {
  border-bottom-color: var(--primary-500);
}

.prose img {
  max-width: 100%;
  border-radius: 1rem;
  margin: 2rem 0;
}

.prose blockquote {
  border-left: 4px solid var(--primary-500);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.prose ul, .prose ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose code {
  background: var(--surface-2);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.9em;
  font-family: 'JetBrains Mono', monospace;
}

.prose pre {
  background: var(--surface-2);
  padding: 1.5rem;
  border-radius: 1rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }
  
  .grid-auto {
    grid-template-columns: 1fr;
  }
  
  .card-featured {
    border-radius: 1.5rem;
    min-height: 350px;
  }
  
  .card-featured .card-content {
    padding: 1.5rem;
  }
  
  .card-featured .card-title {
    font-size: 1.5rem;
  }
  
  .blog-card .card-title {
    font-size: 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .glass-card {
    border-radius: 1.25rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem;
  }
  
  .blog-card .card-body {
    padding: 1.25rem;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-portrait { aspect-ratio: 3 / 4; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
