/* Experience Timeline Styles */
.experience-timeline-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Timeline Sidebar */
.timeline-sidebar {
  position: relative;
  padding: 1rem 0;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 2rem;
  bottom: 2rem;
  width: 2px;
  background: linear-gradient(to bottom, #3b82f6, #e5e7eb);
  border-radius: 1px;
}

.timeline-milestone {
  display: flex;
  align-items: flex-start;
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 0;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.timeline-milestone:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transform: translateX(4px);
}

.timeline-milestone:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  background-color: rgba(59, 130, 246, 0.05);
}

.timeline-milestone.active {
  background-color: rgba(59, 130, 246, 0.1);
}

.milestone-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 2px solid #fff;
  margin-right: 1rem;
  margin-left: 14px;
  margin-top: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.timeline-milestone:hover .milestone-node,
.timeline-milestone.active .milestone-node {
  background: #3b82f6;
  transform: scale(1.2);
}

.milestone-content {
  flex: 1;
  min-width: 0;
}

.milestone-date {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.milestone-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.125rem;
  line-height: 1.25;
}

.milestone-company {
  font-size: 0.8125rem;
  color: #4b5563;
  font-weight: 500;
}

.timeline-milestone.active .milestone-date {
  color: #3b82f6;
}

.timeline-milestone.active .milestone-title {
  color: #1e40af;
}

.timeline-milestone.active .milestone-company {
  color: #3b82f6;
}

/* Detail Panel */
.detail-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

.experience-detail {
  display: none;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.experience-detail.active {
  display: block;
}

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

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.company-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.detail-info {
  flex: 1;
}

.detail-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.detail-company {
  font-size: 1.125rem;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.detail-company:hover {
  color: #1e40af;
}

.detail-date {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.detail-description {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.tag-blue {
  background: #dbeafe;
  color: #1e40af;
}

.tag-green {
  background: #d1fae5;
  color: #065f46;
}

.tag-purple {
  background: #e9d5ff;
  color: #6b21a8;
}

.tag-red {
  background: #fee2e2;
  color: #b91c1c;
}

.detail-actions {
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.detail-link:hover {
  color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .experience-timeline-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .timeline-sidebar {
    order: 2;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
  }

  .timeline-line {
    display: none;
  }

  .timeline-milestone {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  }

  .milestone-node {
    margin-left: 0;
  }

  .detail-panel {
    order: 1;
    min-height: 350px;
  }

  .experience-detail {
    padding: 1.5rem;
  }

  .detail-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    align-items: center;
  }

  .detail-info {
    text-align: center;
    width: 100%;
  }

  .detail-description {
    text-align: center;
  }

  .detail-tags {
    justify-content: center;
  }

  .detail-actions {
    text-align: center;
  }

  .company-logo {
    align-self: center;
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 480px) {
  .experience-detail {
    padding: 1rem;
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .detail-company {
    font-size: 1rem;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
