/* Experiences Timeline Styles */

/* Constrain the full layout to readable width */
.page-layout-full .quarto-container,
.page-layout-full #quarto-content,
.page-layout-full main.content {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Grid should use full available width */
.grid {
  max-width: 100% !important;
  width: 100% !important;
}

/* Ensure content columns are properly sized */
.column-page,
.column-body,
.column-screen {
  max-width: 100% !important;
}

/* Extra wide screens */
@media (min-width: 1600px) {
  .page-layout-full .quarto-container,
  .page-layout-full #quarto-content,
  .page-layout-full main.content {
    max-width: 1600px !important;
  }
}

.timeline-intro {
  margin-bottom: 3rem;
  text-align: left;
  max-width: 100%;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem 0;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--bs-primary), var(--bs-secondary));
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: flex-start;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: calc(50% - 2rem);
  padding: 1.5rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  position: relative;
}

.timeline-content:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* Arrow pointing to center line */
.timeline-item:nth-child(odd) .timeline-content::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 24px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid var(--bs-border-color);
}

.timeline-item:nth-child(even) .timeline-content::before {
  content: '';
  position: absolute;
  right: -12px;
  top: 24px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid var(--bs-border-color);
}

/* Timeline dot */
.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--bs-primary);
  border: 4px solid var(--bs-body-bg);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 0 4px var(--bs-primary-bg-subtle);
}

.timeline-date {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bs-primary);
  color: white;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-organization {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
}

.timeline-position {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-body-color);
  margin-bottom: 0.5rem;
}

.timeline-location {
  font-size: 0.875rem;
  color: var(--bs-secondary);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.timeline-summary {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--bs-body-color);
  margin-bottom: 0.75rem;
}

.timeline-achievements {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

.timeline-achievements h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-achievements ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.timeline-achievements li {
  margin-bottom: 0.25rem;
}

.timeline-project {
  font-size: 0.875rem;
  color: var(--bs-secondary);
  margin-bottom: 0.25rem;
}

.section-divider {
  text-align: center;
  margin: 4rem 0 3rem 0;
  position: relative;
}

.section-divider h2 {
  display: inline-block;
  background: var(--bs-body-bg);
  padding: 0 2rem;
  position: relative;
  z-index: 5;
  color: var(--bs-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.section-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--bs-border-color);
}

.back-link {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bs-border-color);
}

/* Responsive design */
@media (max-width: 768px) {
  .timeline::before {
    left: 10px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd) {
    flex-direction: row;
  }

  .timeline-content {
    width: calc(100% - 3rem);
    margin-left: 2rem;
  }

  .timeline-item:nth-child(odd) .timeline-content::before {
    display: none;
  }

  .timeline-item:nth-child(even) .timeline-content::before {
    left: -12px;
    right: auto;
    border-left: 12px solid var(--bs-border-color);
    border-right: none;
  }

  .timeline-dot {
    left: 10px;
    transform: none;
  }
}
