/* Base CSS - Common styles for all pages */

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

/* Root Variables */
:root {
  --primary-color: #667eea;
  --primary-dark: #5a6fd8;
  --secondary-color: #64748b;
  --accent-color: #06b6d4;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e5e7eb;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* Base Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Dark Mode Base */
body.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Dark Mode Additional Styles */
body.dark-mode .tag {
  background: #374151;
  color: #e0f2fe;
}

body.dark-mode .progress-fill {
  background: #60a5fa;
}

body.dark-mode .progress-bar {
  background: #374151;
}

body.dark-mode .navbar {
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .navbar.scrolled {
    background: rgba(26, 26, 26, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-toggle span {
    background: var(--text-primary);
}

body.dark-mode .nav-menu {
    background: rgba(26, 26, 26, 0.98);
}

body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.6));
    border: 2px solid rgba(79, 70, 229, 0.4);
    color: #ffd54f;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

body.dark-mode .dark-mode-toggle:hover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7));
    border-color: rgba(79, 70, 229, 0.6);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.25), inset 0 1px 3px rgba(255, 255, 255, 0.1);
    transform: translateY(-3px) scale(1.05);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section Styles */
.section {
  padding: 6rem 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-primary);
}

.section:nth-child(odd) {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  line-height: 1.8;
}

/* Button Base Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Dark Mode Button Styles */
body.dark-mode .btn-primary {
  background: #60a5fa;
}

body.dark-mode .btn-primary:hover {
  background: #3b82f6;
}

body.dark-mode .btn-secondary {
  color: #60a5fa;
  border-color: #60a5fa;
}

body.dark-mode .btn-secondary:hover {
  background: #60a5fa;
}

/* Hero Small - For secondary pages */
.hero-small {
  padding: 6rem 0 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-small::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.05) 75%, transparent 75%, transparent);
  background-size: 30px 30px;
  opacity: 0.4;
  animation: movePattern 25s linear infinite;
}

.hero-small .container {
  position: relative;
  z-index: 1;
}

.hero-small h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-small p {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Breadcrumb Styles */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb span:last-child {
  color: white;
  font-weight: 500;
}

/* Dark mode styling for breadcrumb */
body.dark-mode .breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .breadcrumb a:hover {
  color: rgba(255, 255, 255, 1);
}

body.dark-mode .breadcrumb-separator {
  color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .breadcrumb span:last-child {
  color: rgba(255, 255, 255, 0.9);
}

/* Page Actions */
.page-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(14, 165, 233, 0.1));
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.page-actions::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.page-actions:hover::before {
  left: 100%;
}

.page-actions .btn {
  position: relative;
  z-index: 1;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-actions .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
}

.page-actions .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.page-actions .btn-secondary {
  background: linear-gradient(135deg, var(--accent-color), #0891b2);
  border: none;
}

.page-actions .btn-secondary:hover {
  background: linear-gradient(135deg, #0891b2, var(--accent-color));
}

/* Dark mode for page actions */
body.dark-mode .page-actions {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.2));
  border-color: #374151;
}

/* Mobile responsiveness for page actions */
@media (max-width: 768px) {
  .page-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-actions .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
}

/* Mobile adjustments for top bar */
@media (max-width: 768px) {
  .hero-section, 
  .hero-small,
  .page-section:first-of-type {
    padding-top: calc(50px + 3.5rem); /* Add top padding to account for top bar height */
  }

  main {
    padding-top: 50px;
  }
  
  /* Fix breadcrumb navigation display on mobile */
  .breadcrumb {
    padding-top: 1.5rem;
    justify-content: center;
  }
  
  /* Since we're hiding navbar in mobile view, adjust padding */
  .hero-small {
    padding-top: calc(50px + 3rem);
  }
}

/* Ensure hero sections have proper padding on all devices */
.hero-section, .hero-small {
  padding-top: 6rem;
}

/* Loading Animation */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 2rem;
}

.loading-text {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Focus styles for accessibility */
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Custom Cursor Effect */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.1s ease;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.2s ease;
  opacity: 0.5;
}

.cursor.hover {
  transform: scale(2);
  background: var(--accent-color);
}

.cursor-follower.hover {
  transform: scale(1.5);
  border-color: var(--accent-color);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .cursor,
  .cursor-follower {
    display: none;
  }
}

/* Custom cursor - hide on mobile */
@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .loading-screen,
    .cursor,
    .cursor-follower,
    #particles-canvas,
    .hero-scroll,
    .contact-form-wrapper {
        display: none !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    .hero-title,
    .hero-subtitle {
        color: black !important;
    }
    
    .section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .btn,
    .social-link {
        border: 1px solid black !important;
        color: black !important;
        background: white !important;
    }
}
