:root {
  /* Premium Azure Color Palette */
  --primary: #0078D4;
  /* Classic Azure Blue */
  --primary-glow: rgba(0, 120, 212, 0.4);
  --secondary: #0F172A;
  /* Deep Navy */
  --accent: #06B6D4;
  /* Cyan */
  --accent-glow: rgba(6, 182, 212, 0.4);

  /* Light Theme */
  --bg-main: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.7);
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-color: rgba(226, 232, 240, 0.8);
  --glass-border: rgba(255, 255, 255, 0.5);

  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
  --shadow-glow: 0 0 25px var(--primary-glow);
}

[data-theme="dark"] {
  --bg-main: #0B1120;
  --bg-secondary: #111827;
  --bg-card: rgba(30, 41, 59, 0.5);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border-color: rgba(51, 65, 85, 0.5);
  --glass-border: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.4s ease, color 0.4s ease;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* Abstract Background Glows */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  animation: float 20s infinite ease-in-out alternate;
}

.glow-1 {
  background: var(--primary-glow);
  top: -200px;
  left: -200px;
}

.glow-2 {
  background: var(--accent-glow);
  bottom: -200px;
  right: -200px;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 50px) scale(1.1);
  }

  100% {
    transform: translate(-50px, -20px) scale(0.9);
  }
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.display-3 {
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-primary {
  color: var(--primary) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Form elements accessibility */
.form-control {
  font-size: 16px;
  /* Prevents iOS auto-zoom */
}

/* Navbar - Premium Glass */
.navbar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.25rem 0;
  transition: all 0.4s ease;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  color: var(--primary) !important;
}

.nav-link {
  color: var(--text-main) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(0, 120, 212, 0.08);
  color: var(--primary) !important;
}

/* Buttons */
.btn {
  font-weight: 600;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #005A9E 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

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

.btn-outline:hover {
  background: rgba(0, 120, 212, 0.05);
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: 60px 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-text {
  font-size: 1.25rem;
  line-height: 1.9;
}

/* Cards - Sleek Glassmorphism */
.premium-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  opacity: 0.5;
}

.premium-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 120, 212, 0.3);
}

/* Certifications grid */
.cert-card {
  padding: 1.25rem 1rem;
}

.cert-badge-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.premium-card:hover .cert-badge-img {
  transform: scale(1.1) translateY(-6px);
  filter: drop-shadow(0 10px 15px rgba(0, 120, 212, 0.3));
}

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

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: -2.3rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--bg-main);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Skills */
.skill-category {
  margin-bottom: 2rem;
}

.skill-category-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.6rem 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.skill-tag i {
  color: var(--primary);
  margin-right: 0.5rem;
}

.skill-tag:hover {
  border-color: var(--primary);
  background: rgba(0, 120, 212, 0.05);
  transform: translateY(-2px);
}

/* Footer & Contact */
.contact-form .form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 12px;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.contact-form .form-control:focus {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

footer {
  padding: 1.5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-icon {
  font-size: 1.25rem;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-icon:hover {
  color: var(--primary) !important;
  transform: translateY(-2px);
}

/* Utilities */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

/* Responsive Adjustments for Mobile */
@media (max-width: 768px) {
  section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    margin-bottom: 1.5rem;
    font-size: 1rem;
  }

  .premium-card {
    padding: 1.25rem;
  }

  .timeline-item {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  footer {
    padding: 1rem 0;
  }

  .about-text {
    font-size: 1rem;
    line-height: 1.7;
  }
}