.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-elegant);
  padding: var(--space-2xl);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
  color: var(--white);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  background: var(--card-bg);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-flowing);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  z-index: var(--z-modal);
  opacity: 0;
  transform: translateX(-50%) translateY(100%);
  transition: var(--transition);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: #10b981;
  color: var(--white);
}

.toast.error {
  background: #ef4444;
  color: var(--white);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4xl);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 30px);
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 30px);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 4px solid var(--bg-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-icon {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50px;
  height: 50px;
  background: var(--primary);
  border: 4px solid var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .timeline-icon {
  border-color: var(--gray-800);
}

.timeline-icon i {
  color: var(--white);
  font-size: 1.25rem;
}

.timeline-content {
  background: var(--card-bg);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.timeline-date {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.timeline-content h4 {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.timeline-skills {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.timeline-skills span {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

[data-theme="dark"] .timeline-skills span {
  background: var(--gray-700);
}