/* Work and education page styles */
.page-content {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 16px;
}

.page-content h2 {
  color: #2563eb;
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 20px;
}

.work-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.work-header h1 {
  font-size: 36px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.work-header p {
  color: #4b5563;
  margin: 0;
}

.experience-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
  align-items: stretch;
}

.experience-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.education-grid,
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.work-card,
.education-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.04);
  padding: 16px 18px;
  border-left: 4px solid #7c3aed;
  transition: all 250ms ease;
  display: flex;
  flex-direction: column;
}

.education-card {
  border-left: 4px solid #ec4899;
}

.work-card:hover,
.education-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.work-card h3,
.education-card h3 {
  margin: 0;
  color: #2563eb;
  font-size: 17px;
  line-height: 1.3;
}

.work-card .subtitle,
.education-card .subtitle {
  margin: 4px 0 0;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 600;
}

.work-card .date,
.education-card .date {
  margin: 8px 0 0;
  font-size: 12px;
  color: #667992;
  display: flex;
  align-items: center;
  gap: 6px;
}

.work-card p,
.education-card p {
  margin: 10px 0 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

/* Alternating Fluid Timeline Setup */
.experience-timeline {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.experience-timeline h2 {
  text-align: center;
  margin-bottom: 24px;
}

.timeline-container {
  position: relative;
  width: 100%;
  flex-grow: 1;
  padding: 12px 0;
}

/* Center Line Spine */
.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: calc(50% - 20px);
  margin-bottom: 20px;
}

.timeline-item:nth-child(odd) {
  margin-right: auto;
}

.timeline-item:nth-child(even) {
  margin-left: auto;
}

.timeline-dot {
  position: absolute;
  top: 18px;
  width: 10px;
  height: 10px;
  background: white;
  border: 2px solid #2563eb;
  border-radius: 50%;
  z-index: 3;
  transition: all 250ms ease;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -27px;
  transform: translateX(50%);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -27px;
  transform: translateX(-50%);
}

.timeline-item:hover .timeline-dot {
  background: #7c3aed;
  border-color: #ec4899;
}

.timeline-item:nth-child(odd):hover .timeline-dot {
  transform: translateX(50%) scale(1.3);
}

.timeline-item:nth-child(even):hover .timeline-dot {
  transform: translateX(-50%) scale(1.3);
}

.timeline-content {
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.06);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.03);
  transition: all 250ms ease;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline-item:nth-child(odd) .timeline-content {
  text-align: right;
  border-right: 3px solid #2563eb;
}

.timeline-item:nth-child(even) .timeline-content {
  text-align: left;
  border-left: 3px solid #7c3aed;
}

.timeline-item:hover .timeline-content {
  background: #fbfbff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.06);
}

.timeline-content h3 {
  margin: 0 0 4px 0;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.timeline-year {
  margin: 0;
  color: #7c3aed;
  font-size: 11px;
  font-weight: 700;
}

/* Viewport Responsiveness handling */
@media (max-width: 1024px) {
  .experience-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Structural transformation to clean single column alignment for timeline path */
  .timeline-container {
    padding-left: 20px;
  }

  .timeline-container::before {
    left: 4px;
    transform: none;
  }

  .timeline-item {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 16px;
  }

  .timeline-dot {
    left: -20px !important;
    right: auto !important;
    transform: none !important;
  }

  .timeline-item:hover .timeline-dot {
    transform: scale(1.3) !important;
  }

  .timeline-content {
    text-align: left !important;
    border-right: none !important;
    border-left: 3px solid #2563eb !important;
  }
}

@media (max-width: 768px) {
  .education-grid,
  .work-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .page-content {
    padding: 0 12px;
  }

  .work-header h1 {
    font-size: 28px;
  }

  .work-card, .education-card {
    padding: 14px 16px;
  }

  .work-card h3, .education-card h3 {
    font-size: 15px;
  }
}