/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

/* CSS Variables for shadcn/ui compatibility */
@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 94.1%;
  }
}

/* Custom component styles */
@layer components {
  /* Button variants */
  .btn-primary {
    @apply inline-flex items-center justify-center rounded-lg bg-accent px-6 py-3 text-sm font-semibold text-white shadow-sm hover:bg-accent/90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent transition-all duration-200;
  }

  .btn-secondary {
    @apply inline-flex items-center justify-center rounded-lg border border-border bg-background px-6 py-3 text-sm font-semibold text-foreground shadow-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent transition-all duration-200;
  }

  .btn-ghost {
    @apply inline-flex items-center justify-center rounded-lg px-6 py-3 text-sm font-semibold text-foreground hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent transition-all duration-200;
  }

  /* Card styles */
  .card {
    @apply rounded-xl border border-border bg-card p-6 shadow-sm;
  }

  .card-hover {
    @apply card transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
  }

  /* Glass morphism effect */
  .glass {
    @apply backdrop-blur-sm bg-white/10 border border-white/20 rounded-lg;
  }

  .glass-dark {
    @apply backdrop-blur-sm bg-black/10 border border-black/20 rounded-lg;
  }

  /* Gradient text */
  .text-gradient {
    @apply bg-gradient-to-r from-accent to-accent/80 bg-clip-text text-transparent;
  }

  .text-gradient-vibrant {
    @apply bg-gradient-to-r from-accent via-blue-600 to-purple-600 bg-clip-text text-transparent;
  }

  /* Modern shadows */
  .shadow-modern {
    box-shadow: 0 4px 6px -1px rgba(8, 60, 187, 0.1), 0 2px 4px -1px rgba(8, 60, 187, 0.06);
  }

  .shadow-modern-lg {
    box-shadow: 0 10px 15px -3px rgba(8, 60, 187, 0.1), 0 4px 6px -2px rgba(8, 60, 187, 0.05);
  }

  /* Navigation styles */
  .nav-link {
    @apply text-sm font-medium text-muted-foreground hover:text-foreground transition-colors duration-200;
  }

  .nav-link-active {
    @apply nav-link text-accent;
  }

  /* Hero section styles */
  .hero-title {
    @apply text-4xl font-bold tracking-tight text-foreground sm:text-6xl;
  }

  .hero-subtitle {
    @apply text-lg text-muted-foreground sm:text-xl;
  }

  /* Section spacing */
  .section {
    @apply py-16 sm:py-24;
  }

  .section-sm {
    @apply py-12 sm:py-16;
  }

  /* Container */
  .container {
    @apply mx-auto max-w-7xl px-4 sm:px-6 lg:px-8;
  }

  /* Animations */
  .animate-on-scroll {
    @apply opacity-0 translate-y-8 transition-all duration-700 ease-out;
  }

  .animate-on-scroll.visible {
    @apply opacity-100 translate-y-0;
  }

  /* Blog post styles */
  .prose {
    @apply max-w-none text-foreground;
  }

  .prose h1 {
    @apply text-3xl font-bold text-foreground mb-4;
  }

  .prose h2 {
    @apply text-2xl font-semibold text-foreground mb-3 mt-8;
  }

  .prose h3 {
    @apply text-xl font-semibold text-foreground mb-2 mt-6;
  }

  .prose p {
    @apply text-muted-foreground mb-4 leading-relaxed;
  }

  .prose a {
    @apply text-accent hover:text-accent/80 underline;
  }

  .prose ul {
    @apply list-disc list-inside mb-4 text-muted-foreground;
  }

  .prose ol {
    @apply list-decimal list-inside mb-4 text-muted-foreground;
  }

  .prose li {
    @apply mb-1;
  }

  .prose blockquote {
    @apply border-l-4 border-accent pl-4 italic text-muted-foreground mb-4;
  }

  .prose code {
    @apply bg-muted px-1 py-0.5 rounded text-sm font-mono;
  }

  .prose pre {
    @apply bg-muted p-4 rounded-lg overflow-x-auto mb-4;
  }

  .prose pre code {
    @apply bg-transparent p-0;
  }
}

/* Utility classes */
@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background-color: hsl(var(--accent) / 0.2);
  color: hsl(var(--foreground));
}
