/* ========== Optimized Tab Styling (2025-05-24) ========== */
/* Optimized for both desktop and mobile views */

/* === Tab Navigation Styling === */
.about-tabs {
  padding: 25px 15px;
  flex: 0 0 100%;
  max-width: 100%;
  text-align: center;
  margin-bottom: 35px;
  display: flex;
  justify-content: center;
  gap: 10px; /* Consistent spacing between tabs */
}

.about-tabs .tab-item {
  display: inline-flex; /* Changed to flex for better alignment */
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 25px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  color: var(--text-black-600);
  font-weight: 500;
  text-transform: capitalize;
  position: relative;
  z-index: 2;
  min-width: 100px; /* Ensures consistent width */
  box-shadow: var(--outer-shadow);
}

.about-tabs .tab-item:hover:not(.active) {
  opacity: 0.8;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-tabs .tab-item.active {
  color: var(--skin-color) !important;
  background-color: rgba(var(--skin-color-rgb), 0.1);
  font-weight: 600;
  box-shadow: var(--inner-shadow);
  transform: translateY(0);
}

/* === Tab Content Styling === */
.tab-content {
  position: relative;
  width: 100%;
  z-index: 1;
  display: none !important;
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  transition: all 0.5s ease;
  flex: 0 0 100%;
  max-width: 100%;
}

.tab-content.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  animation: fadeInContent 0.5s ease forwards;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Center contents of each tab */
.tab-content .row-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Layout fixes for education and experience */
.timeline-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  margin-top: 20px;
  width: 100%;
}

/* Skills section optimization */
#skills-tab .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

/* Skill icons styling - for SVG logos */
#skills-tab .row svg {
  width: 75px;
  height: 75px;
  margin: 15px;
  transition: all 0.3s ease;
}

#skills-tab .row svg:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* === Responsive Styling === */
@media screen and (max-width: 768px) {
  .about-tabs {
    padding: 15px 10px;
    margin-bottom: 25px;
    gap: 5px;
  }
  
  .about-tabs .tab-item {
    padding: 6px 15px;
    font-size: 14px;
    min-width: 85px;
  }
  
  .tab-contents {
    padding: 5px 0;
  }
  
  .tab-content.active {
    display: block !important;
    opacity: 1 !important;
  }
  
  #skills-tab .row {
    gap: 15px;
  }
  
  #skills-tab .row svg {
    width: 60px;
    height: 60px;
    margin: 10px;
  }
  
  .timeline-section {
    padding: 15px;
  }
}

@media screen and (max-width: 480px) {
  .about-tabs .tab-item {
    padding: 5px 12px;
    font-size: 13px;
    min-width: 70px;
  }
  
  #skills-tab .row svg {
    width: 50px;
    height: 50px;
    margin: 8px;
  }
}

/* Ensure proper focus for accessibility */
.about-tabs .tab-item:focus {
  outline: 2px solid var(--skin-color);
  outline-offset: 2px;
}

/* Add smooth transitions for theme switching */
.about-tabs .tab-item,
.tab-content,
#skills-tab .row svg {
  transition: all 0.3s ease;
}
