/* ==========================================================================
   TechAI Insights - Modern Dark Theme Design System (Vanilla CSS)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Colors */
  --bg-primary: #05070f;
  --bg-secondary: #0c1021;
  --bg-card: rgba(18, 24, 43, 0.7);
  --bg-card-hover: rgba(26, 35, 64, 0.85);
  --bg-glass: rgba(10, 14, 28, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.35);
  --border-highlight: rgba(99, 102, 241, 0.4);

  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-link: #60a5fa;

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glows */
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(59, 130, 246, 0.1);
  --shadow-glow: 0 0 50px -10px rgba(59, 130, 246, 0.35);
  --shadow-cyan: 0 0 40px -10px rgba(6, 182, 212, 0.3);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lighting Effect */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(99, 102, 241, 0.08) 45%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 860px;
}

.container-sm {
  max-width: 680px;
}

/* ==========================================================================
   Navigation Bar (Header)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header-inner {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  padding: 0.45rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.logo-badge svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: #ffffff;
}

.brand-text-accent {
  color: var(--accent-blue);
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-indigo));
  border-radius: 2px;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f92fa, #1d4ed8);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.55);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu.open {
  display: flex;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 0 7rem;
  text-align: center;
  overflow: hidden;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
  animation: float 4s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa 10%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 44rem;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Features Cards (Three Pillar Grid)
   ========================================================================== */
.section {
  padding: 4.5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 2.25rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08), transparent 60%);
  pointer-events: none;
}

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

.feature-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform var(--transition-bounce);
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(2deg);
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.feature-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   Section Header & Blog Post Cards
   ========================================================================== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

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

.card-thumbnail {
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(168, 85, 247, 0.25));
}

.card-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(5, 7, 15, 0.6) 100%);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 0.75rem;
}

.meta-dot {
  color: var(--text-muted);
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.post-card:hover .post-card-title {
  color: #93c5fd;
}

.post-card-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  transition: gap var(--transition-fast);
}

.post-card:hover .post-card-cta {
  gap: 0.75rem;
  color: var(--accent-blue);
}

/* ==========================================================================
   Newsletter Callout Banner
   ========================================================================== */
.newsletter-banner {
  position: relative;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #4338ca 100%);
  border-radius: 2.5rem;
  padding: 3.5rem 2rem;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.4);
}

.newsletter-orb {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

.newsletter-content {
  position: relative;
  z-index: 2;
  max-width: 38rem;
  margin: 0 auto;
}

.newsletter-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.newsletter-subtitle {
  color: #dbeafe;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 30rem;
  margin: 0 auto;
}

.input-field {
  flex: 1;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  transition: box-shadow var(--transition-fast);
}

.input-field:focus {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.btn-dark {
  background: #05070f;
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-dark:hover {
  background: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Article Page / Markdown Prose Typography
   ========================================================================== */
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.article-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 1rem 0 1.5rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
}

.meta-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Rich Prose */
.prose {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.85;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.8rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.6rem; }
.prose h3 { font-size: 1.4rem; color: #93c5fd; }

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

.prose strong {
  color: #ffffff;
  font-weight: 600;
}

.prose a {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose ul, .prose ol {
  padding-left: 1.75rem;
  margin-bottom: 1.75rem;
}

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

.prose blockquote {
  border-left: 4px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.06);
  padding: 1rem 1.5rem;
  border-radius: 0 1rem 1rem 0;
  color: #94a3b8;
  font-style: italic;
  margin: 2rem 0;
}

.prose code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  padding: 0.2rem 0.45rem;
  border-radius: 0.375rem;
  font-size: 0.88em;
}

.prose pre {
  background: #090d1a;
  border: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #e2e8f0;
}

/* ==========================================================================
   Filter Tabs & Search (Blog Hub)
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-tab.active {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Forms (Contact Page)
   ========================================================================== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 2rem;
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 0.875rem;
  background: #02040a;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #020308;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

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

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-link {
  color: var(--text-secondary);
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
}

.social-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  border: 1px solid var(--accent-blue);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
