/* CSS Custom Properties for Theme Management */
:root {
  --primary-bg: #ffffff;
  --primary-text: #000000;
  --secondary-bg: #f8fafc;
  --accent-color: #3b82f6;
  --border-color: #e5e7eb;
  
  /* Spectral gradient colors for Prism Labs */
  --spectral-x: 0%;
  --spectral-y: 50%;
  
  /* Inter font settings */
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] {
  --primary-bg: #000000;
  --primary-text: #ffffff;
  --secondary-bg: #1a1a1a;
  --accent-color: #60a5fa;
  --border-color: #374151;
}

/* Global Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Layout System */
.split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

@media (max-width: 1024px) {
  .split-container {
    grid-template-columns: 1fr;
  }
}

.section-divider {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--border-color);
  z-index: 10;
}

@media (max-width: 1024px) {
  .section-divider {
    display: none;
  }
}

/* Animation System */
@keyframes fadeIn {
  0% { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideUp {
  0% { 
    opacity: 0; 
    transform: translateY(40px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: currentColor; }
}

/* Component Styles */
.project-card {
  background-color: var(--primary-bg);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.project-card .gradient-overlay {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .gradient-overlay {
  opacity: 1;
}

.service-card {
  background-color: var(--secondary-bg);
  transition: all 0.3s ease;
}

.service-card:hover {
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.service-card:hover h3 {
  color: var(--accent-color);
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  transform: scale(1.05);
}

.theme-toggle {
  background-color: var(--primary-bg);
  color: var(--primary-text);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Typography Enhancements */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent-underline {
  position: relative;
}

.accent-underline::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .split-container section {
    padding: 2rem 1rem;
  }
  
  .project-card {
    padding: 1.5rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Loading States */
.loading {
  opacity: 0;
  transform: translateY(20px);
}

.loaded {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Enhanced Hover Effects */
.hover-lift:hover {
  transform: translateY(-2px);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Prism Labs Spectral Gradient */
.spectral-gradient {
  background: linear-gradient(
    90deg,
    #60a5fa 0%,
    #7c3aed 16.67%,
    #a78bfa 33.33%,
    #f472b6 50%,
    #f59e0b 66.67%,
    #34d399 83.33%,
    #60a5fa 100%
  );
  background-size: 200% 100%;
  background-position: var(--spectral-x) var(--spectral-y);
  background-attachment: fixed;
}

.spectral-text {
  background: linear-gradient(
    90deg,
    #60a5fa 0%,
    #7c3aed 16.67%,
    #a78bfa 33.33%,
    #f472b6 50%,
    #f59e0b 66.67%,
    #34d399 83.33%,
    #60a5fa 100%
  );
  background-size: 200% 100%;
  background-position: var(--spectral-x) var(--spectral-y);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Prism Animation Container */
.prism-animation-container {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.prism-animation-container:hover {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}