/* Modern UI/UX Design System */

:root {
  /* Color Palette - Modern & Professional */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-dark: #5568d3;
  --secondary-color: #f093fb;
  --accent-color: #4facfe;
  
  /* Neutral Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 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);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* Global Overrides */
body {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-size: 16px;
  line-height: 1.6;
}

/* Modern Navigation */
.modern-nav {
  background: var(--bg-primary) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.modern-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.modern-nav .navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modern-nav .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
}

.modern-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: var(--bg-secondary);
}

.modern-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: var(--bg-secondary);
}

/* Theme Toggle Button */
#themeToggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#themeToggle:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
  transform: scale(1.05);
}

/* Hero Section */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
  z-index: 0;
}

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

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--spacing-lg);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: var(--spacing-xl);
}

/* Profile Image */
.profile-img-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.profile-img-wrapper::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

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

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 5px solid var(--bg-primary);
  box-shadow: var(--shadow-xl);
}

/* Modern Buttons */
.btn-modern-primary {
  background: var(--primary-gradient) !important;
  color: white !important;
  border: none !important;
  padding: 0.875rem 2rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-full) !important;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease !important;
  position: relative;
  overflow: hidden;
}

.btn-modern-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-modern-outline {
  background: transparent !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
  padding: 0.875rem 2rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-full) !important;
  transition: all 0.3s ease !important;
}

.btn-modern-outline:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 1.25rem;
}

.social-link:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Modern Cards */
.modern-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
}

.modern-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.modern-card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.modern-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.modern-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modern-card-body {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Project Cards */
.project-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.project-body {
  padding: var(--spacing-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.project-body h2 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-body h2 a:hover {
  color: var(--primary-color);
}

.project-meta {
  margin-top: auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.project-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Skills Section */
.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  margin: 0.25rem;
}

.skill-badge:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Section Headings */
.section-heading {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Timeline (for Resume) */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--spacing-xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.timeline-date {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

/* Contact Form */
.modern-form-control {
  background: var(--bg-primary) !important;
  border: 2px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0.875rem 1.25rem !important;
  color: var(--text-primary) !important;
  font-size: 1rem !important;
  transition: all 0.2s ease !important;
}

.modern-form-control:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  outline: none !important;
}

.modern-form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

/* Footer */
.modern-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-2xl);
}

/* Utility Classes */
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: var(--primary-gradient);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }
  
  .profile-img-wrapper {
    width: 200px;
    height: 200px;
    margin-bottom: var(--spacing-lg);
  }
  
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-item::before {
    left: -2rem;
  }
}

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

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

/* Loading State */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
