/* ===== THEME SYSTEM - CSS CUSTOM PROPERTIES ===== */
:root {
  /* Theme transition */
  --theme-transition: all 0.3s ease;
  
  /* Font weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== LIGHT THEME (DEFAULT) ===== */
[data-theme="light"] {
  /* Primary colors */
  --color-primary: #667eea;
  --color-primary-dark: #5a67d8;
  --color-primary-light: #7c8af0;
  --color-primary-alpha: rgba(102, 126, 234, 0.1);
  
  /* Secondary colors */
  --color-secondary: #764ba2;
  --color-secondary-dark: #6b4394;
  --color-secondary-light: #8b5db0;
  
  /* Accent colors */
  --color-accent: #10b981;
  --color-accent-dark: #059669;
  --color-accent-light: #34d399;
  
  /* Background colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-bg-elevated: #ffffff;
  --color-bg-overlay: rgba(255, 255, 255, 0.95);
  
  /* Text colors */
  --color-text-primary: #1e293b;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748b;
  --color-text-inverse: #ffffff;
  --color-text-muted: #94a3b8;
  
  /* Border colors */
  --color-border-primary: #e2e8f0;
  --color-border-secondary: #cbd5e1;
  --color-border-tertiary: #94a3b8;
  
  /* Status colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Surface colors */
  --color-surface: #ffffff;
  --color-surface-hover: #f8fafc;
  --color-surface-active: #f1f5f9;
  
  /* Navigation colors */
  --color-nav-bg: #ffffff;
  --color-nav-text: #1e293b;
  --color-nav-hover: #f8fafc;
  
  /* Card colors */
  --color-card-bg: #ffffff;
  --color-card-border: #e2e8f0;
  --color-card-shadow: var(--shadow-md);
  
  /* Button colors */
  --color-btn-primary-bg: var(--color-primary);
  --color-btn-primary-text: #ffffff;
  --color-btn-primary-hover: var(--color-primary-dark);
  --color-btn-secondary-bg: transparent;
  --color-btn-secondary-text: var(--color-primary);
  --color-btn-secondary-border: var(--color-primary);
  --color-btn-secondary-hover: var(--color-primary-alpha);
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  /* Primary colors */
  --color-primary: #818cf8;
  --color-primary-dark: #6366f1;
  --color-primary-light: #a5b4fc;
  --color-primary-alpha: rgba(129, 140, 248, 0.1);
  
  /* Secondary colors */
  --color-secondary: #a78bfa;
  --color-secondary-dark: #8b5cf6;
  --color-secondary-light: #c4b5fd;
  
  /* Accent colors */
  --color-accent: #34d399;
  --color-accent-dark: #10b981;
  --color-accent-light: #6ee7b7;
  
  /* Background colors */
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-bg-elevated: #1e293b;
  --color-bg-overlay: rgba(15, 23, 42, 0.95);
  
  /* Text colors */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #e2e8f0;
  --color-text-tertiary: #cbd5e1;
  --color-text-inverse: #1e293b;
  --color-text-muted: #64748b;
  
  /* Border colors */
  --color-border-primary: #334155;
  --color-border-secondary: #475569;
  --color-border-tertiary: #64748b;
  
  /* Status colors */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-error: #f87171;
  --color-info: #60a5fa;
  
  /* Surface colors */
  --color-surface: #1e293b;
  --color-surface-hover: #334155;
  --color-surface-active: #475569;
  
  /* Navigation colors */
  --color-nav-bg: rgba(15, 23, 42, 0.95);
  --color-nav-text: #f8fafc;
  --color-nav-hover: #334155;
  
  /* Card colors */
  --color-card-bg: #1e293b;
  --color-card-border: #334155;
  --color-card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  
  /* Button colors */
  --color-btn-primary-bg: var(--color-primary);
  --color-btn-primary-text: var(--color-text-inverse);
  --color-btn-primary-hover: var(--color-primary-light);
  --color-btn-secondary-bg: transparent;
  --color-btn-secondary-text: var(--color-primary);
  --color-btn-secondary-border: var(--color-primary);
  --color-btn-secondary-hover: var(--color-primary-alpha);
  
  /* Dark theme specific shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* ===== SYSTEM THEME PREFERENCE SUPPORT ===== */
/* Auto dark theme when system preference is dark and no explicit theme is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    /* Primary colors */
    --color-primary: #818cf8;
    --color-primary-dark: #6366f1;
    --color-primary-light: #a5b4fc;
    --color-primary-alpha: rgba(129, 140, 248, 0.1);
    
    /* Secondary colors */
    --color-secondary: #a78bfa;
    --color-secondary-dark: #8b5cf6;
    --color-secondary-light: #c4b5fd;
    
    /* Accent colors */
    --color-accent: #34d399;
    --color-accent-dark: #10b981;
    --color-accent-light: #6ee7b7;
    
    /* Background colors */
    --color-bg-primary: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;
    --color-bg-elevated: #1e293b;
    --color-bg-overlay: rgba(15, 23, 42, 0.95);
    
    /* Text colors */
    --color-text-primary: #f8fafc;
    --color-text-secondary: #e2e8f0;
    --color-text-tertiary: #cbd5e1;
    --color-text-inverse: #1e293b;
    --color-text-muted: #64748b;
    
    /* Border colors */
    --color-border-primary: #334155;
    --color-border-secondary: #475569;
    --color-border-tertiary: #64748b;
    
    /* Status colors */
    --color-success: #34d399;
    --color-warning: #fbbf24;
    --color-error: #f87171;
    --color-info: #60a5fa;
    
    /* Surface colors */
    --color-surface: #1e293b;
    --color-surface-hover: #334155;
    --color-surface-active: #475569;
    
    /* Navigation colors */
    --color-nav-bg: rgba(15, 23, 42, 0.95);
    --color-nav-text: #f8fafc;
    --color-nav-hover: #334155;
    
    /* Card colors */
    --color-card-bg: #1e293b;
    --color-card-border: #334155;
    --color-card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    
    /* Button colors */
    --color-btn-primary-bg: var(--color-primary);
    --color-btn-primary-text: var(--color-text-inverse);
    --color-btn-primary-hover: var(--color-primary-light);
    --color-btn-secondary-bg: transparent;
    --color-btn-secondary-text: var(--color-primary);
    --color-btn-secondary-border: var(--color-primary);
    --color-btn-secondary-hover: var(--color-primary-alpha);
    
    /* Dark theme specific shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  }
}

/* ===== RESET AND BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== FONT OPTIMIZATION ===== */
/* Icon font smoothing and optimization to reduce console warnings */
.fa, .fas, .far, .fab, .fal, .fad, .fass, .fasr, .fasl,
[class^="fa-"], [class*=" fa-"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  font-size: 16px;
  font-display: swap;
  transition: var(--theme-transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 0.5em;
  transition: var(--theme-transition);
}

h1 {
  font-size: 2.5rem;
  font-weight: var(--font-bold);
}

h2 {
  font-size: 2rem;
  font-weight: var(--font-semibold);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  transition: var(--theme-transition);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--theme-transition);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  background: var(--color-surface-primary);
  border: 2px solid var(--color-border-primary);
  color: var(--color-text-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--theme-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  height: 40px;
  margin-left: var(--space-md);
  font-size: 0.875rem;
  font-weight: var(--font-medium);
  position: relative;
  overflow: hidden;
  min-width: 80px;
  box-shadow: var(--shadow-sm);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-primary);
  opacity: 0;
  transition: var(--theme-transition);
  border-radius: inherit;
}

.theme-toggle:hover {
  background-color: var(--color-surface-hover);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.theme-toggle:hover::before {
  opacity: 0.1;
}

.theme-toggle:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.theme-toggle i {
  font-size: 1rem;
  transition: var(--theme-transition);
  position: relative;
  z-index: 1;
}

.theme-toggle .theme-text {
  position: relative;
  z-index: 1;
  transition: var(--theme-transition);
}

/* Dark theme specific styling */
[data-theme="dark"] .theme-toggle {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(34, 197, 94, 0.3);
  color: #ffffff;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-toggle::before {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

/* This old paragraph style is redundant - removed as we have the updated one above */

/* ===== BUTTON STYLES ===== */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-medium);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--theme-transition);
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-text);
  border: none;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-btn-primary-hover);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: var(--theme-transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: var(--color-btn-secondary-bg);
  color: var(--color-btn-secondary-text);
  border-color: var(--color-btn-secondary-border);
}

.btn-secondary:hover {
  background: var(--color-btn-secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Header and Navigation */
/* ===== NAVIGATION STYLES ===== */
.header {
  background: var(--color-nav-bg);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--theme-transition);
  border-bottom: 1px solid var(--color-border-primary);
}

.navbar {
  padding: var(--space-md) 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand h1 {
  font-size: 1.8rem;
  color: var(--color-primary);
  font-weight: var(--font-bold);
  margin-bottom: 0;
  transition: var(--theme-transition);
}

.nav-brand i {
  margin-right: var(--space-sm);
  color: var(--color-primary);
  transition: var(--theme-transition);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--color-nav-text);
  font-weight: var(--font-medium);
  transition: var(--theme-transition);
  position: relative;
  padding: var(--space-sm) 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
  border-radius: var(--radius-sm);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--space-sm);
  border: none;
  background: transparent;
  z-index: 1001;
  border-radius: var(--radius-md);
  transition: var(--theme-transition);
}

.nav-toggle:hover {
  background: var(--color-nav-hover);
}

.nav-toggle:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--color-nav-text);
  margin: 3px 0;
  border-radius: var(--radius-sm);
  transition: var(--theme-transition);
}

/* Hamburger animation */
.nav-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-text-inverse);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  transition: var(--theme-transition);
}

/* Dark theme hero background */
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%);
  position: relative;
}

[data-theme="dark"] .hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(129, 140, 248, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(52, 211, 153, 0.1) 0%, transparent 50%);
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,800 1000,1000"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Dark theme overlay pattern */
[data-theme="dark"] .hero::before {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(129,140,248,0.08)" points="0,1000 1000,800 1000,1000"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
}

.hero-text {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: var(--space-xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text-inverse);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transform: translateZ(0);
  transition: var(--theme-transition);
  position: relative;
}

/* Enhanced dark theme text styling */
[data-theme="dark"] .hero-title {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(129, 140, 248, 0.3);
}

.hero-title:hover {
  transform: translateY(-5px) scale(1.02);
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .hero-title:hover {
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(129, 140, 248, 0.5);
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.highlight {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffc107 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  position: relative;
  display: inline-block;
  text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.4);
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #ffd700, #ffc107);
  border-radius: 2px;
  opacity: 0.8;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
  .highlight {
    color: #ffd700;
    background: none;
    text-shadow: 
      2px 2px 4px rgba(255, 215, 0, 0.5),
      0 0 10px rgba(255, 215, 0, 0.3);
  }
}

/* Dark theme highlight styling */
[data-theme="dark"] .highlight {
  background: linear-gradient(135deg, #10b981 0%, #22c55e 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 
    0 0 20px rgba(34, 197, 94, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .highlight::after {
  background: linear-gradient(135deg, #10b981, #22c55e);
  box-shadow: 
    0 0 15px rgba(34, 197, 94, 0.6),
    0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Dark theme fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
  [data-theme="dark"] .highlight {
    color: #10b981;
    background: none;
    text-shadow: 
      2px 2px 4px rgba(16, 185, 129, 0.8),
      0 0 20px rgba(34, 197, 94, 0.5),
      0 0 40px rgba(34, 197, 94, 0.3);
  }
}

.hero-subtitle {
  font-size: 1.4rem;
  font-weight: var(--font-regular);
  margin-bottom: var(--space-3xl);
  opacity: 0.95;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
  transition: var(--theme-transition);
}

[data-theme="dark"] .hero-subtitle {
  text-shadow: 
    2px 2px 6px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.hero-buttons .btn {
  padding: var(--space-md) var(--space-2xl);
  font-size: 1.1rem;
  font-weight: var(--font-semibold);
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--theme-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-lg);
}

.hero-buttons .btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

[data-theme="dark"] .hero-buttons .btn {
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-buttons .btn:hover {
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 30px rgba(34, 197, 94, 0.2);
}

/* Enhanced dark theme primary button */
[data-theme="dark"] .hero-buttons .btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  border: 1px solid rgba(34, 197, 94, 0.5);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .hero-buttons .btn-primary::before {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

[data-theme="dark"] .hero-buttons .btn-primary:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(34, 197, 94, 0.6),
    0 0 40px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Enhanced dark theme secondary button */
[data-theme="dark"] .hero-buttons .btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(34, 197, 94, 0.4);
  color: #ffffff;
  backdrop-filter: blur(15px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-buttons .btn-secondary:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(34, 197, 94, 0.7);
  color: #ffffff;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-buttons .btn-primary {
  background: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-text);
  border: none;
  position: relative;
  overflow: hidden;
}

.hero-buttons .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: inherit;
  z-index: -1;
}

.hero-buttons .btn-primary:hover {
  background: var(--color-btn-primary-hover);
  box-shadow: var(--shadow-xl);
}

.hero-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-inverse);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-text-inverse);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.stat {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: var(--theme-transition);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stat:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 255, 255, 0.4);
}

.stat h3 {
  font-size: 3.2rem;
  color: var(--color-text-inverse);
  margin-bottom: 0.8rem;
  font-weight: 900;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
  line-height: 1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stat p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: var(--font-medium);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Dark theme enhancements for hero stats */
[data-theme="dark"] .stat {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat::before {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

[data-theme="dark"] .stat:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .stat h3 {
  color: #ffffff;
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .stat p {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 
    1px 1px 3px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(255, 255, 255, 0.1);
}

/* ===== SECTION STYLES ===== */
.section {
  padding: var(--space-3xl) 0;
  transition: var(--theme-transition);
}

.section:nth-child(even) {
  background: var(--color-bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-weight: var(--font-bold);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== ABOUT SECTION ===== */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.feature {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-card-border);
  transition: var(--theme-transition);
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.feature i {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  transition: var(--theme-transition);
}

.feature h4 {
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-weight: var(--font-semibold);
}

.feature p {
  color: var(--color-text-secondary);
}

/* ===== SERVICES SECTION ===== */
.services-section {
  background: var(--color-bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
}

.service-card {
  background: var(--color-card-bg);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-card-border);
  transition: var(--theme-transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.service-icon {
  display: inline-block;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.service-icon i {
  font-size: 2rem;
  color: var(--color-text-inverse);
}

.service-card h3 {
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-size: 1.3rem;
  font-weight: var(--font-semibold);
}

.service-card p {
  margin-bottom: var(--space-lg);
  color: var(--color-text-secondary);
}

.service-card ul {
  list-style: none;
}

.service-card li {
  color: var(--color-text-secondary);
  padding: var(--space-xs) 0;
  position: relative;
  padding-left: var(--space-lg);
}

.service-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--font-bold);
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
  background: var(--color-bg-secondary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-xl);
}

.product-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-card-border);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card.featured {
  border: 3px solid #667eea;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.product-icon {
  background: rgba(255, 255, 255, 0.2);
  padding: var(--space-md);
  border-radius: var(--radius-xl);
}

.product-icon i {
  font-size: 2.5rem;
  color: var(--color-text-inverse);
}

.product-badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
}

.product-content {
  padding: var(--space-2xl);
}

.product-content h3 {
  font-size: 1.8rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
  font-weight: var(--font-semibold);
}

.product-tagline {
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.product-content > p {
  margin-bottom: var(--space-xl);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.product-features h4,
.product-tech-stack h4,
.product-use-cases h4,
.product-benefits h4 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-size: 1.1rem;
  font-weight: var(--font-medium);
}

.product-features i,
.product-tech-stack i,
.product-use-cases i,
.product-benefits i {
  color: var(--color-primary);
}

.product-features ul {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.product-features li {
  padding: var(--space-sm) 0;
  padding-left: var(--space-lg);
  position: relative;
  color: var(--color-text-secondary);
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--font-bold);
}

.product-tech-stack {
  margin-bottom: var(--space-xl);
}

.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.use-case {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.8rem;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  transition: var(--theme-transition);
}

.use-case i {
  color: var(--color-primary);
  font-size: 1.2rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.benefit {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  transition: var(--theme-transition);
}

.benefit:hover {
  border-color: var(--color-primary);
  background: var(--color-card-bg);
  box-shadow: var(--shadow-md);
}

.benefit i {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.benefit strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  font-weight: var(--font-semibold);
}

.benefit span {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.product-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.product-actions .btn {
  flex: 1;
  min-width: 150px;
  text-align: center;
}

/* Portfolio item featured style */
.portfolio-item.featured {
  border: 3px solid var(--color-primary);
  box-shadow: 0 15px 35px var(--color-primary-alpha);
}

.portfolio-item.featured .portfolio-image {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  position: relative;
}

.portfolio-item.featured .portfolio-image::after {
  content: 'Featured';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  padding: var(--space-xs) 0.8rem;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
  background: var(--color-bg-secondary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.portfolio-item {
  background: var(--color-card-bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-card-border);
  transition: var(--theme-transition);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.portfolio-image {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  padding: var(--space-2xl);
  text-align: center;
}

.portfolio-image i {
  font-size: 4rem;
  color: var(--color-text-inverse);
}

.portfolio-content {
  padding: var(--space-xl);
}

.portfolio-content h3 {
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-weight: var(--font-semibold);
}

.portfolio-content p {
  margin-bottom: var(--space-lg);
  color: var(--color-text-secondary);
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.portfolio-tech span {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  padding: var(--space-xs) 0.8rem;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  transition: var(--theme-transition);
  border: 1px solid var(--color-border-primary);
}

.portfolio-tech span:hover {
  background: var(--color-primary-alpha);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* ===== TEAM SECTION ===== */
.team-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.team-stat {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-card-border);
  transition: var(--theme-transition);
}

.team-stat i {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.team-stat h3 {
  font-size: 2.5rem;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  font-weight: var(--font-bold);
}

.team-expertise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
}

.expertise-item {
  background: var(--color-card-bg);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--color-card-shadow);
  border: 1px solid var(--color-card-border);
  border-left: 4px solid var(--color-primary);
  transition: var(--theme-transition);
}

.expertise-item h4 {
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-weight: var(--font-semibold);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%) !important;
  color: var(--color-text-inverse);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  transition: var(--theme-transition);
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
}

.contact-section .container {
  position: relative;
  z-index: 2;
}

.contact-section .section-header h2 {
  color: var(--color-text-inverse) !important;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  font-size: 2.8rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--space-md);
}

.contact-section .section-subtitle {
  color: var(--color-text-inverse) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  font-size: 1.3rem;
  margin-bottom: var(--space-2xl);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-info {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-xl);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: var(--theme-transition);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-top: 0.2rem;
  min-width: 24px;
}

.contact-item h4 {
  color: var(--color-text-inverse) !important;
  margin-bottom: var(--space-sm);
  font-weight: var(--font-semibold);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.contact-item p {
  color: var(--color-text-inverse) !important;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.contact-item a {
  color: var(--color-accent) !important;
  text-decoration: none;
  transition: var(--theme-transition);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: var(--font-medium);
}

.contact-item a:hover {
  color: var(--color-accent-light) !important;
  text-decoration: underline;
}

.contact-form {
  background: rgba(255, 255, 255, 0.15);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-xl);
}

.contact-form h3 {
  color: var(--color-text-inverse) !important;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: var(--font-semibold);
}

.form-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.form-group:last-of-type {
  grid-template-columns: 1fr;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-md);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text-primary);
  transition: var(--theme-transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-tertiary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: var(--color-surface);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-primary-alpha);
  transform: translateY(-2px);
}

.contact-form .btn {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
  font-weight: var(--font-semibold);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.contact-form .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-radius: inherit;
  z-index: -1;
}

.contact-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--color-primary-alpha);
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
}

/* CRITICAL: Contact Section Text Visibility Override */
#contact {
  background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%) !important;
}

[data-theme="dark"] #contact {
  background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%) !important;
}

#contact * {
  color: var(--color-text-inverse) !important;
}

[data-theme="dark"] #contact * {
  color: var(--color-text-primary) !important;
}

/* Fix text visibility in form elements */
#contact .form-group input,
#contact .form-group select,
#contact .form-group textarea {
  color: var(--color-text-primary) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] #contact .form-group input,
[data-theme="dark"] #contact .form-group select,
[data-theme="dark"] #contact .form-group textarea {
  color: var(--color-text-primary) !important;
  background: var(--color-surface) !important;
}

#contact .form-group input::placeholder,
#contact .form-group textarea::placeholder {
  color: var(--color-text-tertiary) !important;
}

#contact .form-group input:focus,
#contact .form-group select:focus,
#contact .form-group textarea:focus {
  color: var(--color-text-primary) !important;
  background: var(--color-surface) !important;
}

#contact .form-group select option {
  color: var(--color-text-primary) !important;
  background: var(--color-surface) !important;
}

#contact .section-header h2 {
  color: var(--color-text-inverse) !important;
  font-size: 3rem !important;
  font-weight: 800 !important;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 1) !important;
  margin-bottom: var(--space-md) !important;
}

[data-theme="dark"] #contact .section-header h2 {
  color: var(--color-text-primary) !important;
}

#contact .section-subtitle {
  color: var(--color-text-inverse) !important;
  font-size: 1.4rem !important;
  font-weight: var(--font-medium) !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8) !important;
  margin-bottom: var(--space-2xl) !important;
}

[data-theme="dark"] #contact .section-subtitle {
  color: var(--color-text-secondary) !important;
}

#contact .contact-info {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 3px solid rgba(255, 255, 255, 0.3) !important;
  padding: 2.5rem !important;
}

#contact .contact-item {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  padding: 1.5rem !important;
  margin-bottom: 2rem !important;
}

#contact .contact-item h4 {
  color: #ffffff !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 1) !important;
  margin-bottom: 0.8rem !important;
}

#contact .contact-item p {
  color: #ffffff !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9) !important;
  line-height: 1.6 !important;
}

#contact .contact-item a {
  color: #ffd700 !important;
  font-weight: 700 !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 1) !important;
  text-decoration: underline !important;
}

#contact .contact-item a:hover {
  color: #ffed4e !important;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 1) !important;
}

#contact .contact-item i {
  color: #ffd700 !important;
  font-size: 2rem !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 1) !important;
}

#contact .contact-form {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 3px solid rgba(255, 255, 255, 0.3) !important;
  padding: 2.5rem !important;
}

#contact .contact-form h3 {
  color: #ffffff !important;
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 1) !important;
  text-align: center !important;
  margin-bottom: 2rem !important;
}

#contact .contact-form .btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
  color: #1a252f !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  border: 2px solid #ffd700 !important;
  font-size: 1.1rem !important;
  padding: 1rem 2rem !important;
}

/* Accessibility Improvements */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero {
    background: #000 !important;
    color: #fff !important;
  }
  
  .btn-primary {
    background: #000 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus visible improvements */
*:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove focus outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Better button focus states */
.btn:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* Enhanced form focus states */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  transition: var(--theme-transition);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

/* Dark theme scroll to top */
[data-theme="dark"] .scroll-to-top {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .scroll-to-top:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(34, 197, 94, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.5);
}

#scrollToTop.scroll-to-top:hover {
  background: #16a34a !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* Mobile scroll to top adjustments */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* ===== FOOTER STYLES ===== */
.footer {
  background: var(--color-bg-tertiary);
  color: var(--color-text-inverse);
  padding: var(--space-2xl) 0 var(--space-md);
  transition: var(--theme-transition);
}

[data-theme="dark"] .footer {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h3 {
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  font-size: 1.3rem;
  font-weight: var(--font-semibold);
}

.footer-section h4 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  font-weight: var(--font-medium);
}

[data-theme="dark"] .footer-section h4 {
  color: var(--color-text-primary);
}

.footer-section p {
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-md);
}

[data-theme="dark"] .footer-section p {
  color: var(--color-text-secondary);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-sm);
}

.footer-section ul li a {
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: var(--theme-transition);
}

[data-theme="dark"] .footer-section ul li a {
  color: var(--color-text-secondary);
}

.footer-section ul li a:hover {
  color: var(--color-primary);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  transition: var(--theme-transition);
}

.social-links a:hover {
  transform: translateY(-2px);
  background: var(--color-primary-dark);
}

.footer-bottom {
  border-top: 1px solid var(--color-border-secondary);
  padding-top: var(--space-xl);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #667eea;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .hero-buttons {
    gap: 1rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-form,
  .contact-info {
    padding: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    flex-direction: column;
    background: #ffffff;
    backdrop-filter: blur(20px);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px var(--space-xl) var(--space-xl);
    overflow-y: auto;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    border-right: 1px solid #e2e8f0;
    justify-content: space-between;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.15);
  }

  .nav-menu.active {
    left: 0;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  /* Dark theme mobile menu background */
  [data-theme="dark"] .nav-menu {
    background: #1e293b;
    border-right-color: #334155;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.4);
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 1001;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    background: var(--color-surface-hover);
    backdrop-filter: blur(10px);
    transition: var(--theme-transition);
  }

  .nav-toggle:hover {
    background: var(--color-primary-alpha);
    transform: scale(1.05);
  }

  .nav-toggle.active {
    background: var(--color-primary-alpha);
  }

  .nav-toggle.active .bar {
    background: var(--color-nav-text);
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-xl) 0;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .nav-list li {
    margin: var(--space-sm) 0;
    opacity: 0;
    transform: translateY(30px);
    animation: none;
  }

  .nav-menu.active .nav-list li {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .nav-menu.active .nav-list li:nth-child(1) { animation-delay: 0.1s; }
  .nav-menu.active .nav-list li:nth-child(2) { animation-delay: 0.15s; }
  .nav-menu.active .nav-list li:nth-child(3) { animation-delay: 0.2s; }
  .nav-menu.active .nav-list li:nth-child(4) { animation-delay: 0.25s; }
  .nav-menu.active .nav-list li:nth-child(5) { animation-delay: 0.3s; }
  .nav-menu.active .nav-list li:nth-child(6) { animation-delay: 0.35s; }
  .nav-menu.active .nav-list li:nth-child(7) { animation-delay: 0.4s; }

  .nav-link {
    color: var(--color-nav-text);
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    padding: var(--space-md) var(--space-xl);
    margin: var(--space-sm) 0;
    border-radius: var(--radius-lg);
    background: #f8fafc;
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    display: block;
    transition: var(--theme-transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
  }

  .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-primary-alpha), transparent);
    transition: left 0.5s;
  }

  .nav-link:hover::before {
    left: 100%;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--color-primary-alpha);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
  }

  .nav-link::after {
    display: none;
  }

  /* Dark theme mobile navigation links */
  [data-theme="dark"] .nav-link {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
  }

  [data-theme="dark"] .nav-link:hover,
  [data-theme="dark"] .nav-link.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
  }

  /* Mobile theme toggle positioning */
  .theme-toggle {
    margin-left: 0;
    margin-top: auto;
    margin-bottom: var(--space-xl);
    min-width: 140px;
    height: 50px;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    border-radius: 25px;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface-primary);
    border: 2px solid var(--color-border-primary);
    box-shadow: var(--shadow-md);
    font-weight: var(--font-medium);
    letter-spacing: 0.5px;
    align-self: center;
  }

  .nav-menu.active .theme-toggle {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.45s;
    margin-top: auto;
    margin-bottom: var(--space-xl);
    min-width: 140px;
    opacity: 1 !important;
    transform: translateY(0) !important;
    background: var(--color-surface-secondary);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    align-self: center;
  }

  /* Fallback for theme toggle visibility */
  .nav-menu.active .theme-toggle {
    display: flex !important;
    visibility: visible !important;
  }

  .theme-toggle .theme-text {
    display: inline-block;
  }

  /* Additional mobile theme toggle visibility fix */
  @media (max-width: 768px) {
    .nav-menu.active .theme-toggle {
      opacity: 1 !important;
      transform: translateY(0) !important;
      visibility: visible !important;
      display: flex !important;
      position: relative !important;
    }
    
    /* Enhanced mobile dark theme styling */
    [data-theme="dark"] .theme-toggle {
      background: rgba(30, 41, 59, 0.9);
      border-color: rgba(34, 197, 94, 0.5);
      color: #ffffff;
      box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="dark"] .nav-menu.active .theme-toggle {
      background: rgba(30, 41, 59, 0.95);
      border-color: rgba(34, 197, 94, 0.7);
      box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    
    /* Mobile theme toggle hover effects */
    .theme-toggle:hover {
      transform: translateY(-2px) !important;
      box-shadow: var(--shadow-xl) !important;
      border-color: var(--color-primary) !important;
    }
    
    [data-theme="dark"] .theme-toggle:hover {
      box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(34, 197, 94, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Mobile icon and text styling */
    .theme-toggle i {
      font-size: 1.1rem;
      margin-right: 2px;
    }
    
    .theme-toggle .theme-text {
      font-size: 0.95rem;
      font-weight: var(--font-semibold);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
  }

  /* Close button for mobile menu */
  .nav-menu::before {
    content: '';
    position: absolute;
    top: 25px;
    right: 25px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: all 0.3s ease;
  }

  /* Mobile menu overlay */
  .nav-menu.active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }

  /* Enhanced hamburger animation */
  .bar {
    width: 28px;
    height: 3px;
    background: var(--color-nav-text);
    margin: 4px 0;
    border-radius: var(--radius-sm);
    transition: var(--theme-transition);
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--color-nav-text);
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
    background: var(--color-nav-text);
  }

  /* Animation keyframes */
  @keyframes slideInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  /* Mobile brand adjustment */
  .nav-brand h1 {
    font-size: 1.5rem;
    color: var(--color-primary);
    z-index: 1001;
    position: relative;
  }

  /* Navbar container adjustment for mobile */
  .navbar .container {
    position: relative;
  }

  /* Desktop theme toggle hidden in mobile nav */
  .navbar .theme-toggle {
    display: none;
  }

  .hero-title {
    font-size: 3rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .services-grid,
  .portfolio-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-actions .btn {
    width: 100%;
  }

  .form-group {
    grid-template-columns: 1fr;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-form,
  .contact-info {
    padding: 1.5rem;
  }
  
  .contact-item {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
  }
  
  .stat {
    padding: 2rem 1rem;
  }
  
  .stat h3 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card {
    margin: 0;
  }

  .product-content {
    padding: 2rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .use-cases {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: 100vh;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .hero-buttons {
    margin-bottom: 2.5rem;
  }
  
  .hero-buttons .btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .service-card,
  .contact-form,
  .contact-info {
    padding: 1.5rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  .contact-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.8rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .contact-form h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
  }
  
  .stat {
    padding: 1.5rem 1rem;
  }
  
  .stat h3 {
    font-size: 2.2rem;
  }
}

/* Additional responsive styles for enhanced mobile UX */
@media (max-width: 480px) {
  .nav-brand h1 {
    font-size: 1.3rem;
  }
  
  .nav-link {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
  
  .nav-menu {
    padding: 80px 1rem 2rem;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .nav-menu {
    padding: 60px 1rem 1rem;
    height: 100vh;
  }
  
  .nav-list {
    padding: 1rem 0;
  }
  
  .nav-link {
    padding: 0.6rem 1.5rem;
    margin: 0.3rem 0;
    font-size: 1.1rem;
  }
}

/* Smooth transitions for better performance */
.nav-menu,
.nav-toggle,
.nav-link {
  will-change: transform, opacity;
}

/* Focus styles for better accessibility */
.nav-toggle:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  border-radius: 8px;
}

.nav-link:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-menu {
    background: #000;
    border: 2px solid #fff;
  }
  
  .nav-link {
    border: 1px solid #fff;
    background: transparent;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: #fff;
    color: #000;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .nav-menu,
  .nav-toggle .bar,
  .nav-link,
  .nav-list li {
    transition: none;
    animation: none;
  }
  
  .nav-menu.active .nav-list li {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
