/* Additional styles to fix frontend issues */

/* Fix for any layout inconsistencies */
body {
  overflow-x: hidden;
}

/* Fix for potential z-index issues */
header {
  z-index: 1000 !important;
}

/* Adding smooth transitions */
a, button, .btn, .project-card, .experience-item, .education-item {
  transition: all 0.3s ease-in-out;
}

/* Fix potential spacing issues */
.section-header {
  margin-bottom: 40px;
}

/* Fix form rendering issues */
.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Fix for missing or broken animations */
.hero-profile {
  animation: pulse 2s infinite alternate;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

/* Fix potential responsive issues */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .experience-timeline::before,
  .education-timeline::before {
    left: 15px;
  }
  
  .experience-item,
  .education-item {
    padding-left: 45px;
  }
  
  .experience-item::before,
  .education-item::before {
    left: 7px;
  }

  /* Better hero section layout for mobile */
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 40px;
    height: auto;
    min-height: 100vh;
  }
  
  .hero-content {
    width: 100%;
    order: 2; /* Content appears after the image on mobile */
  }
  
  .hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 40px;
    order: 1; /* Image appears first on mobile */
  }
  
  .hero-profile {
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }
  
  .cta-buttons {
    justify-content: center;
  }
}

/* Timeline alignment fixes */
.experience-timeline::before,
.education-timeline::before {
  content: '';
  position: absolute;
  left: 8px; /* Adjusted to align with the dots */
  top: 20px;
  height: calc(100% - 40px);
  width: 3px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.experience-item,
.education-item {
  position: relative;
  padding-left: 40px; /* Increased to give more space after the dots */
  margin-bottom: 50px;
}

.experience-item::before,
.education-item::before {
  content: '';
  position: absolute;
  left: 0; /* Aligned directly with the line */
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  z-index: 1;
}

.experience-item::before {
  background-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.2);
}

.education-item::before {
  background-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(245, 0, 87, 0.2);
}

/* Improve hero image alignment on all screen sizes */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
