/* Modern Developer-Focused Design System 
All colors MUST be HSL for proper theming.
*/

/* CSS Custom Properties - Design Tokens */
:root {
  /* Light Mode - Professional & Clean */
  --background: 220 14% 96%; /* #F9FAFB */
  --foreground: 222 47% 11%; /* #0F172A */
  
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  
  /* Primary Blue (#2563EB) - Professional */
  --primary: 217 78% 57%;
  --primary-foreground: 0 0% 100%;
  
  /* Accent Gold (#FACC15) - Creative Highlight */
  --accent: 48 95% 53%;
  --accent-foreground: 222 47% 11%;
  
  /* Ink for headings (#0F172A) */
  --ink: 222 47% 11%;
  --ink-foreground: 0 0% 100%;
  
  /* Developer-friendly grays */
  --muted: 220 14% 96%;
  --muted-foreground: 215 16% 47%;
  
  --secondary: 220 14% 96%;
  --secondary-foreground: 222 47% 11%;
  
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --ring: 217 78% 57%;
  
  /* Developer-focused gradients */
  --gradient-hero: linear-gradient(135deg, hsl(217 78% 57%), hsl(212 100% 70%), hsl(48 95% 53%));
  --gradient-code: linear-gradient(135deg, hsl(217 78% 57% / 0.1), hsl(48 95% 53% / 0.1));
  --gradient-card: linear-gradient(135deg, hsl(0 0% 100%), hsl(220 14% 98%));
  
  /* Professional shadows */
  --shadow-elegant: 0 4px 20px -4px hsl(217 78% 57% / 0.08);
  --shadow-glow: 0 8px 30px -8px hsl(48 95% 53% / 0.12);
  --shadow-card: 0 2px 8px -2px hsl(222 47% 11% / 0.08);
  
  /* Smooth animations */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --radius: 0.75rem;

  --sidebar-background: 0 0% 98%;
  --sidebar-foreground: 240 5.3% 26.1%;
  --sidebar-primary: 240 5.9% 10%;
  --sidebar-primary-foreground: 0 0% 98%;
  --sidebar-accent: 240 4.8% 95.9%;
  --sidebar-accent-foreground: 240 5.9% 10%;
  --sidebar-border: 220 13% 91%;
  --sidebar-ring: 217.2 91.2% 59.8%;
}

.dark {
  /* Dark Mode - Developer Dashboard Vibes */
  --background: 222 47% 11%; /* #0F172A */
  --foreground: 0 0% 98%;
  
  --card: 217 33% 16%;
  --card-foreground: 0 0% 98%;
  
  --popover: 217 33% 16%;
  --popover-foreground: 0 0% 98%;
  
  /* Highlight Blue for dark mode (#3B82F6) */
  --primary: 217 78% 65%;
  --primary-foreground: 0 0% 100%;
  
  /* Glowing Gold accent */
  --accent: 48 95% 53%;
  --accent-foreground: 222 47% 11%;
  
  --ink: 0 0% 98%;
  --ink-foreground: 222 47% 11%;
  
  /* Developer-friendly dark grays */
  --muted: 217 33% 16%;
  --muted-foreground: 215 20% 65%;
  
  --secondary: 217 33% 16%;
  --secondary-foreground: 0 0% 98%;
  
  --destructive: 0 63% 31%;
  --destructive-foreground: 0 0% 98%;
  
  --border: 217 33% 21%;
  --input: 217 33% 18%;
  --ring: 217 78% 65%;
  
  /* Dark mode gradients with glow */
  --gradient-hero: linear-gradient(135deg, hsl(217 78% 65%), hsl(212 100% 70%), hsl(48 95% 53%));
  --gradient-code: linear-gradient(135deg, hsl(217 78% 65% / 0.2), hsl(48 95% 53% / 0.2));
  --gradient-card: linear-gradient(135deg, hsl(217 33% 16%), hsl(217 33% 18%));
  
  /* Glowing shadows for dark mode */
  --shadow-elegant: 0 4px 20px -4px hsl(217 78% 65% / 0.3);
  --shadow-glow: 0 8px 30px -8px hsl(48 95% 53% / 0.4);
  --shadow-card: 0 2px 8px -2px hsl(222 47% 11% / 0.5);
  
  --sidebar-background: 240 5.9% 10%;
  --sidebar-foreground: 240 4.8% 95.9%;
  --sidebar-primary: 224.3 76.3% 48%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 240 3.7% 15.9%;
  --sidebar-accent-foreground: 240 4.8% 95.9%;
  --sidebar-border: 240 3.7% 15.9%;
  --sidebar-ring: 217.2 91.2% 59.8%;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 1536px) {
  .container {
    max-width: 1280px;
  }
}

@media (max-width: 1280px) {
  .container {
    max-width: 1024px;
  }
}

@media (max-width: 1024px) {
  .container {
    max-width: 768px;
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 640px;
    padding: 0 1rem;
  }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Spacing Utilities */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-7xl { font-size: 4.5rem; }
.text-8xl { font-size: 6rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }

/* Color Utilities */
.text-white { color: #ffffff; }
.text-hero-white { color: #ffffff !important; } /* Force white text for hero sections */
.text-primary { color: hsl(var(--primary)); }
.text-accent { color: hsl(var(--accent)); }
.text-ink { color: hsl(var(--ink)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-foreground { color: hsl(var(--foreground)); }
.bg-white { background-color: #ffffff; }
.bg-background { background-color: hsl(var(--background)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-accent { background-color: hsl(var(--accent)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-gradient-hero { background: var(--gradient-hero); }
.bg-gradient-code { background: var(--gradient-code); }
.bg-gradient-card { background: var(--gradient-card); }

/* Border Utilities */
.border { border: 1px solid hsl(var(--border)); }
.border-t { border-top: 1px solid hsl(var(--border)); }
.border-b { border-bottom: 1px solid hsl(var(--border)); }
.border-0 { border: 0; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow Utilities */
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-glow { box-shadow: var(--shadow-glow); }
.shadow-elegant { box-shadow: var(--shadow-elegant); }

/* Transition Utilities */
.transition-all { transition: var(--transition-smooth); }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }

/* Display Utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Width and Height Utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-8 { width: 2rem; }
.w-16 { width: 4rem; }
.w-32 { width: 8rem; }
.w-64 { width: 16rem; }
.h-full { height: 100%; }
.h-auto { height: auto; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.h-64 { height: 16rem; }
.min-h-screen { min-height: 100vh; }
.min-h-[90vh] { min-height: 90vh; }

/* Overflow Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }

/* Opacity Utilities */
.opacity-20 { opacity: 0.2; }
.opacity-70 { opacity: 0.7; }
.opacity-90 { opacity: 0.9; }

/* Cursor Utilities */
.cursor-pointer { cursor: pointer; }

/* Focus Utilities */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px hsl(var(--ring)); }

/* Hover Utilities */
.hover\:bg-primary:hover { background-color: hsl(var(--primary)); }
.hover\:bg-accent:hover { background-color: hsl(var(--accent)); }
.hover\:text-primary:hover { color: hsl(var(--primary)); }
.hover\:text-accent:hover { color: hsl(var(--accent)); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.1); }

/* Responsive Utilities */
@media (max-width: 767px) {
  .sm\:flex-col { flex-direction: column; }
  .sm\:text-center { text-align: center; }
  .sm\:hidden { display: none; }
  .sm\:block { display: block; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-5xl { font-size: 3rem; }
  .md\:text-7xl { font-size: 4.5rem; }
  .md\:text-8xl { font-size: 6rem; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Background Image Utilities */
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }
.bg-no-repeat { background-repeat: no-repeat; }

/* Backdrop Utilities */
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-xl { backdrop-filter: blur(12px); }

/* Animation Utilities */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

.animate-scale-in {
  animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Text Utilities */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Max Width Utilities */
.max-w-none { max-width: none; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-full { max-width: 100%; }
.max-w-screen-xl { max-width: 1280px; }

/* Gap Utilities */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Object Fit Utilities */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Aspect Ratio Utilities */
.aspect-square { aspect-ratio: 1/1; }
.aspect-video { aspect-ratio: 16/9; }
