:root {
  /* Light theme colors - Purple/Teal combination */
  --primary-color: #8b5cf6;
  --secondary-color: #7c3aed;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e5e7eb;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #10b981 100%);
}

[data-theme="dark"] {
  /* Dark theme colors */
  --primary-color: #a78bfa;
  --secondary-color: #8b5cf6;
  --accent-color: #22d3ee;
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --text-dark: #f9fafb;
  --text-light: #d1d5db;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --border-color: #4b5563;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #34d399 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.theme-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Navigation */
.navbar {
  backdrop-filter: blur(10px);
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease;
}

.hero-buttons .btn {
  padding: 14px 32px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-buttons .btn-primary {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.hero-buttons .btn-outline-primary {
  border-color: white;
  color: white;
}

.hero-buttons .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}

/* Hero Animation */
.hero-image {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-animation {
  width: 300px;
  height: 200px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-line {
  height: 20px;
  background: var(--gradient-secondary);
  margin-bottom: 15px;
  border-radius: 4px;
  animation: typing 3s infinite;
}

.code-line:nth-child(1) {
  width: 80%;
  animation-delay: 0s;
}
.code-line:nth-child(2) {
  width: 60%;
  animation-delay: 0.7s;
}
.code-line:nth-child(3) {
  width: 90%;
  animation-delay: 1.4s;
}
.code-line:nth-child(4) {
  width: 70%;
  animation-delay: 2.1s;
}

/* Section Styling */
section {
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

section.bg-light {
  background-color: var(--bg-secondary) !important;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* About Section */
.about-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Skills Section */
.skill-category {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px var(--shadow-light);
  height: 100%;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px var(--shadow-medium);
}

.skill-category-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: var(--bg-secondary);
  color: var(--primary-color);
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-tag:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* Projects Section */
.project-card {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-light);
  height: 100%;
  transition: all 0.3s ease;
  border-left: 5px solid var(--primary-color);
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-left-color: var(--accent-color);
}

.project-header {
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}

.tech-tag {
  background: var(--gradient-primary);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.project-features {
  list-style: none;
  padding: 0;
}

.project-features li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.project-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-company {
  color: var(--primary-color);
  font-weight: 500;
}

.timeline-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

.timeline-achievements {
  list-style: none;
  padding: 0;
}

.timeline-achievements li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  color: var(--text-light);
}

.timeline-achievements li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Education */
.education-card {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-light);
  border-left: 5px solid var(--primary-color);
  border: 1px solid var(--border-color);
}

.education-degree {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.education-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 10px;
}

.education-school {
  color: var(--primary-color);
  font-weight: 500;
}

.education-date {
  color: var(--text-light);
}

.education-grade {
  color: var(--text-light);
  font-weight: 500;
}

/* Contact Section */
.contact-info {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px var(--shadow-light);
}

.contact-icon {
  width: 55px;
  height: 55px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  font-size: 1.3rem;
}

.contact-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--text-light);
  margin: 0;
}

.contact-form {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 25px var(--shadow-light);
}

.contact-form .form-control {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-dark);
}

.contact-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
  background: var(--bg-primary);
}

.contact-form .btn {
  padding: 14px 32px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--gradient-primary);
  border: none;
}

.contact-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

/* Footer */
footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border-color);
}

footer .social-links .social-link {
  background: var(--bg-tertiary);
  color: var(--text-dark);
  margin-left: 10px;
}

footer .social-links .social-link:hover {
  background: var(--primary-color);
  color: white;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%,
  30% {
    width: 0;
    opacity: 0.7;
  }
  70% {
    width: 100%;
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0.7;
  }
}

/* Loading animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .about-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .timeline {
    padding-left: 1rem;
  }

  .timeline-marker {
    left: -1.5rem;
  }

  .timeline-meta {
    flex-direction: column;
  }

  .hero-image {
    margin-top: 2rem;
    height: 300px;
  }

  .code-animation {
    width: 250px;
    height: 150px;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .project-card,
  .skill-category,
  .timeline-content,
  .education-card {
    padding: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }
}

/* Print styles for better SEO */
@media print {
  .navbar,
  .theme-toggle,
  .hero-buttons,
  .social-links,
  .contact-form,
  footer {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .section-title {
    color: black !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066cc;
    --text-dark: #000000;
    --text-light: #333333;
    --border-color: #666666;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for better accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}
