/* Experience Section Styles */

.experience-section {
  position: relative;
  width: 100%;
  min-height: var(--experience-min-height);
  overflow: hidden;
  background-color: var(--experience-bg);
}

/* Background layers */
.experience-background {
  position: absolute;
  inset: 0;
  background-color: var(--experience-bg);
}

.experience-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.experience-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(var(--color_43), var(--experience-overlay-opacity)); /* Using experience-specific overlay */
}

/* Content container - perfectly centered */
.experience-content {
  position: relative;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: var(--experience-min-height);
  max-width: 1200px; /* Consistent with timeline */
  align-items: center;
  justify-content: center;
  padding: var(--experience-content-padding) 1rem;
  width: 100%;
}

/* Section header */
.experience-header {
  text-align: center;
  margin-bottom: var(--experience-header-margin);
  width: 100%;
  align-self: flex-start;
}

/* Typography moved to hero-typography.css - using .experience-headline class */

/* Timeline container - perfectly centered */
.experience-timeline {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Timeline spine (vertical line) - now using accent color! */
.timeline-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: var(--timeline-spine-width);
  background-color: var(--timeline-spine);
  opacity: var(--timeline-spine-opacity);
  transform: translateX(-50%);
  z-index: 1;
}

/* Timeline items */
.timeline-item {
  position: relative;
  display: flex;
  margin-bottom: var(--timeline-card-spacing);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--experience-transition);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline nodes (dots) */
.timeline-node {
  position: absolute;
  left: 50%;
  top: 1rem;
  width: var(--timeline-node-size);
  height: var(--timeline-node-size);
  background-color: var(--timeline-node);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: all 0.3s var(--experience-transition);
  cursor: pointer;
}

.timeline-node:hover {
  background-color: var(--timeline-node-hover);
  transform: translateX(-50%) scale(var(--experience-node-hover-scale));
}

/* Timeline text containers - no card styling */
.timeline-card {
  padding: 1.5rem;
  width: var(--timeline-card-width);
  transition: all 0.3s var(--experience-transition);
  cursor: pointer;
  position: relative;
}

.timeline-card:hover {
  transform: scale(var(--experience-card-hover-scale));
}

/* Card positioning */
.timeline-item:nth-child(odd) .timeline-card {
  margin-left: auto;
  margin-right: calc(50% + var(--timeline-card-offset));
}

.timeline-item:nth-child(even) .timeline-card {
  margin-left: calc(50% + var(--timeline-card-offset));
  margin-right: auto;
}

/* Card content - typography moved to hero-typography.css */
.timeline-company {
  /* Typography controlled by .experience-company in hero-typography.css */
}

.timeline-title {
  /* Typography controlled by .experience-title in hero-typography.css */
}

.timeline-period {
  /* Typography controlled by .experience-period in hero-typography.css */
}

.timeline-description {
  /* Typography controlled by .experience-description in hero-typography.css */
}

/* Expandable details - simplified without card background */
.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--experience-transition);
  margin-top: 1rem;
  opacity: 0.8;
}

.timeline-card.expanded .timeline-details {
  max-height: 500px;
  opacity: 1;
}

.timeline-details-content h4 {
  /* Typography controlled by .experience-details-content h4 in hero-typography.css */
}

.achievement-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.achievement-list li {
  /* Typography controlled by .experience-achievement-list li in hero-typography.css */
}

.achievement-list li::before {
  content: "•";
  color: var(--experience-accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  /* Typography controlled by .experience-skill-tag in hero-typography.css */
  background-color: rgba(var(--experience-accent), 0.15);
  backdrop-filter: blur(5px);
}

/* Responsive design */
@media (max-width: 768px) {
  .experience-content {
    padding: var(--experience-mobile-padding) 1rem;
  }
  
  .timeline-spine {
    left: var(--experience-mobile-spine-left);
  }
  
  .timeline-node {
    left: var(--experience-mobile-spine-left);
  }
  
  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    margin-left: var(--experience-mobile-card-margin-left);
    margin-right: var(--experience-mobile-card-margin-right);
  }
  
  .timeline-card {
    width: calc(100% - calc(var(--experience-mobile-spine-left) + var(--experience-mobile-card-margin-left)));
  }
  
  #experience .experience-background,
  #experience .experience-media {
    display: none !important;
  }
  
  .experience-background,
  .experience-media {
    display: none !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .timeline-item,
  .timeline-node,
  .timeline-card,
  .timeline-details {
    transition: none;
  }
  
  .timeline-item {
    opacity: 1;
    transform: none;
  }
}

/* Focus management */
.timeline-card:focus,
.timeline-node:focus {
  outline: 2px solid var(--experience-accent);
  outline-offset: 2px;
}