:root {
  --company-color: #6366f1;
  --color1: #f3f3f3;
  --heading-color: #050d18;
}

/* experience section main styling */
.experience-section {
  background-color: var(--color1);
  padding-top: 5%; /* Space for the fixed menu */
  padding-bottom: 2%;
  margin-bottom: 40px;
}

/* Section title styling for h2 */
#experience h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--heading-color, #050d18);
  margin-bottom: 40px;
  padding-bottom: 20px;
  position: relative;
  letter-spacing: 1px;
}

#experience h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 5px;
  background: var(--company-color, #149ddd);
  left: 0;
  bottom: 0;
  border-radius: 2px;
}


/* Timeline */
.experience-timeline {
  position: relative;
  margin-left: 2%; 
  margin-right: 0;
  padding-left: 0;
}

/* The vertical line itself */
.experience-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: -30px; /* 5px margin + 25px for dot center */
  width: 3px;
  height: 100%;
  border-radius: 2px;
  z-index: 0;
  background: #000000;  
}

/* Timeline item */
.experience-timeline-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 1.5rem;
  flex: auto;
  flex-wrap: nowrap;
  height: 100%;
  width: 100%;
  background-color: #f8f9fa;
  border: 1.5px solid #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(88, 60, 60, 0.08), 0 1.5px 6px rgba(60, 72, 88, 0.04);
  margin-bottom: 2.5rem;
  padding: 1rem;
  transition: box-shadow 0.2s ease;
  position: relative;
}
.experience-timeline-item:hover {
  box-shadow: 0 6px 20px rgba(139, 133, 133, 0.3);
}
.experience-timeline-item::before {
  content: "";
  position: absolute;
  left: -38px; /* aligns with the timeline line */
  top: 40px;   /* adjust to align with your card/logo */
  width: 18px;
  height: 18px;
  background: var(--company-color);
  border: 4px solid var(--company-color);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px #f8f9fa; /* halo effect, match background */
}

/* experience logo container */
.experience-logo {
  flex: 0 0 33.33%;
  max-width: 33.33%;
  display: flex;
  align-items: center;     /* vertical centering */
  justify-content: center; /* horizontal centering */
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  /*box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);*/
  height: 100%;            /* Take full height of timeline-item */
}
.experience-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.experience-logo:hover {
  box-shadow: 0 8px 24px rgba(60, 72, 88, 0.13);
}

/* Card content */
.experience-details {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(60, 72, 88, 0.07);
  border: 1px solid #f0f0f0;
  padding: 24px 24px 18px 24px;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  flex-grow: 1; /* Allow it to grow and fill available space */
  flex-basis: 0; /* Allow it to shrink if needed */
  width: 100%;
}


/* Card content hover effect */
.experience-details:hover {
  box-shadow: 0 8px 24px rgba(60, 72, 88, 0.13);
}

/* Degree title */
.experience-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #000000;
  letter-spacing: 0.5px;
  padding-bottom: 0.1rem;
}

/* Institution name */
.experience-institution {
  font-size: 1.2rem;  
  font-weight: bold;
  letter-spacing: 0.5px;
  color: var(--company-color);
  padding-bottom: 0.3rem;
  display: inline-block;
}

/* Location & date */
.experience-location,
.experience-period {
  color: #000000;
  font-size: 1rem;
  font-weight: 500;
  margin-right: 1.5em;
  letter-spacing: 0.5px;
  display: inline-block;
  padding-bottom: 1rem;
}

/* Missions list: remove indentation, clean look */
.experience-missions ul {
  margin-left: 0;
  padding-left: 0;
  list-style-type: disc;
  list-style-position: inside;
  margin-bottom: 0;
  color: #000;
}

.experience-missions ul li {
  color: #000; /* Ensure list items are black */
  font-size: 1rem;
  line-height: 1.6;
}

/* Style for Missions heading in experience section */
.experience-missions h5 {
  font-size: 1.05rem;
  border-bottom: 1px solid #ddd;
  margin-bottom: 0.5rem;
  padding-bottom: 0.2rem;
  font-weight: 700;
}

.experience-missions.list {
  padding-bottom: 20rem;
}

/* Experience tags styling */
.experience-tags .badge {
  font-size: 1rem;
  font-weight: 400;
  background-color: var(--company-color);   /* Custom background */
  border-radius: 5px;
  padding: 0.4em 0.9em;
  margin-right: 0.4em;
  margin-bottom: 0.4em;
  box-shadow: 0 1px 4px rgba(99,102,241,0.08);
  letter-spacing: 0.5px;
  display: inline-block;
  align-items: center;
  justify-content: center;
}

.experience-tags {
  padding-top: 25px;
}



/* Responsive adjustments for medium screens (tablets) */
@media (max-width: 768px) {
  .experience-timeline-item {
    flex-direction: column; /* Stack content vertically */
    width: 100%; /* Full width for smaller screens */
    gap: 1rem; /* Reduce gap between elements */
  }

  .experience-logo {
    flex: 0 0 auto; /* Allow the logo to resize naturally */
    max-width: 100%; /* Ensure it doesn't exceed the container width */
    margin-bottom: 1rem; /* Add spacing below the logo */
  }

  .experience-details {
    width: 100%; /* Full width for details */
  }
}


/* Responsive adjustments for small screens (mobile) */
@media (max-width: 480px) {
  .experience-timeline-item {
    padding: 0.5rem; /* Reduce padding for smaller screens */
    gap: 0.5rem; /* Reduce gap further */
  }

  .experience-title {
    font-size: 1.2rem; /* Adjust font size for smaller screens */
  }

  .experience-institution {
    font-size: 1rem; /* Adjust font size for smaller screens */
  }

  .experience-location,
  .experience-period {
    font-size: 0.9rem; /* Adjust font size for smaller screens */
  }

  .experience-missions ul li {
    font-size: 0.9rem; /* Adjust font size for list items */
  }

  .experience-tags .badge {
    font-size: 0.8rem; /* Adjust tag size */
    padding: 0.3em 0.7em; /* Reduce padding */
  }
}