/* Timeline Page CSS Variables */
:root {
  --accent: #4c5f8f;
}

/* Timeline Page Specific Styles */
.timeline-page {
  background: var(--bg);
  min-height: 100vh;
}

.timeline-hero {
  text-align: center;
  padding: 60px 0;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border-bottom: 1px solid var(--line);
}

.timeline-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.timeline-hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Timeline Container */
.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 0;
}

.timeline-section {
  position: relative;
  margin-top: 40px;
}

/* Interactive Timeline Navigation */
.timeline-navigation {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s ease;
}

.timeline-navigation.sticky-nav.stuck {
  position: fixed;
  top: 20px;
  right: 20px;
  left: auto;
  transform: none;
  z-index: 100;
  max-width: 320px;
  width: auto;
  padding: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.timeline-navigation.stuck h2 {
  font-size: 1rem;
  margin-bottom: 0;
  display: none;
}

.timeline-navigation.stuck p {
  display: none;
}

.timeline-navigation.stuck .timeline-nav-container {
  margin: 0;
}

.timeline-navigation.stuck .timeline-nav-items {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.timeline-navigation.stuck .timeline-nav-item {
  padding: 6px;
  flex-direction: row;
  gap: 6px;
  min-width: auto;
}

.timeline-navigation.stuck .nav-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 0;
}

.timeline-navigation.stuck .nav-icon svg {
  width: 10px;
  height: 10px;
}

.timeline-navigation.stuck .nav-info {
  min-width: auto;
}

.timeline-navigation.stuck .nav-year {
  font-size: 0.7rem;
  margin-bottom: 0;
}

.timeline-navigation.stuck .nav-title {
  display: none;
}

/* Active state for navigation */
.timeline-nav-item.active .nav-icon {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.timeline-nav-item.active .nav-year {
  color: var(--ink);
  font-weight: 700;
}

.timeline-navigation h2 {
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-navigation p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

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

.timeline-nav-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.timeline-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 12px;
  border-radius: var(--radius-sm);
}

.timeline-nav-item:hover {
  background: var(--panel-2);
  transform: translateY(-4px);
}

.nav-icon {
  width: 32px;
  height: 32px;
  background: var(--panel);
  border: 2px solid var(--muted);
  border-radius: 50%;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  transition: all 0.3s ease;
}

.timeline-nav-item:hover .nav-icon {
  transform: scale(1.1);
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.nav-info {
  text-align: center;
  min-width: 80px;
}

.nav-year {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.nav-title {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.timeline-nav-item:hover .nav-year {
  color: var(--ink);
}

.timeline-nav-item:hover .nav-title {
  color: var(--ink);
}

/* Fun Facts */
.fun-fact {
  position: absolute;
  top: 40px;
  width: 280px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  opacity: 0.85;
  z-index: 5;
}

.timeline-item.left .fun-fact {
  left: calc(50% + 60px);
}

.timeline-item.right .fun-fact {
  right: calc(50% + 60px);
}

.fun-fact h4 {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fun-fact-icon {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.fun-fact-icon svg {
  width: 10px;
  height: 10px;
}

.fun-fact p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.timeline-item:hover .fun-fact {
  opacity: 1;
  transform: translateY(-2px);
}

/* Timeline Line */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--muted) 0%, rgba(91, 97, 104, 0.3) 100%);
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Timeline Items */
.timeline-item {
  position: relative;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(40px);
  animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }
.timeline-item:nth-child(10) { animation-delay: 1.0s; }

/* Alternating Layout */
.timeline-item.left .timeline-content {
  margin-right: calc(50% + 50px);
  text-align: left;
}

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

.timeline-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  max-width: 450px;
}

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

/* Timeline Content Arrows */
.timeline-content::before {
  content: '';
  position: absolute;
  top: 30px;
  width: 0;
  height: 0;
  border: 14px solid transparent;
}

.timeline-item.left .timeline-content::before {
  right: -28px;
  border-left-color: var(--panel);
}

.timeline-item.right .timeline-content::before {
  left: -28px;
  border-right-color: var(--panel);
}

/* Timeline Icons */
.timeline-icon {
  position: absolute;
  left: 50%;
  top: 25px;
  width: 28px;
  height: 28px;
  background: var(--panel);
  border: 3px solid var(--muted);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.timeline-icon svg {
  width: 14px;
  height: 14px;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-icon {
  transform: translateX(-50%) scale(1.2);
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

/* Timeline Content Styling */
.timeline-date {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.3;
}

.timeline-company {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.timeline-description {
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.timeline-impact {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.timeline-impact h4 {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.timeline-impact p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
}

.timeline-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  /* justify-content: var(--timeline-align, flex-start); */
}

.timeline-item.left .timeline-links {
  --timeline-align: flex-end;
}

.timeline-link {
  background: var(--accent);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.timeline-link:hover {
  background: var(--ink);
  transform: translateY(-1px);
}

/* Expandable Details */
.expand-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 16px;
  margin-top: 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.expand-toggle:hover {
  border-color: var(--accent);
  background: var(--panel-2);
}

.expand-toggle .arrow {
  transition: transform 0.3s ease;
  font-size: 0.7rem;
}

.expand-toggle.expanded .arrow {
  transform: rotate(180deg);
}

.timeline-details {
  margin-top: 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-details.expanded {
  max-height: 200px;
}

.timeline-details-content {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Animations */
@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeline-hero {
    padding: 40px 0;
  }
  
  .timeline-hero h1 {
    font-size: 2rem;
  }
  
  .timeline-hero p {
    font-size: 1rem;
    padding: 0 20px;
  }
  
  .timeline-container {
    padding: 40px 20px;
  }
  
  .career-summary {
    padding: 24px;
    margin-bottom: 40px;
  }
  
  .career-summary h2 {
    font-size: 1.5rem;
  }
  
  .career-summary p {
    font-size: 1rem;
  }
  
  .timeline-navigation {
    padding: 20px;
    margin-bottom: 40px;
    margin-left: 0;
    margin-right: 0;
  }
  
  .timeline-navigation h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }
  
  .timeline-navigation p {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  .timeline-nav-container {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .timeline-nav-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    min-width: 320px;
    padding: 0 4px;
  }
  
  .timeline-nav-item {
    padding: 12px 6px;
    min-width: 70px;
    text-align: center;
  }
  
  .nav-icon {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0 auto 6px;
  }
  
  .nav-icon svg {
    width: 10px;
    height: 10px;
  }
  
  .nav-year {
    font-size: 0.75rem;
    margin-bottom: 2px;
  }
  
  .nav-title {
    font-size: 0.65rem;
    line-height: 1.2;
  }
  
  /* Mobile timeline optimization */
  .timeline-item {
    margin-bottom: 60px;
  }
  
  .fun-fact {
    position: static;
    width: auto;
    margin: 20px 0;
    margin-left: 50px;
    opacity: 1;
    background: var(--panel);
    border: 1px solid var(--line);
  }
  
  .timeline-item.left .fun-fact,
  .timeline-item.right .fun-fact {
    right: auto;
    left: auto;
    margin-left: 50px;
  }
  
  .timeline-navigation.stuck {
    position: relative !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    background: var(--panel) !important;
    backdrop-filter: none !important;
  }
  
  .timeline-navigation.stuck .timeline-nav-item {
    flex-direction: column !important;
    gap: 4px !important;
  }
  
  .timeline-navigation.stuck .nav-icon {
    margin-bottom: 4px !important;
  }
  
  .timeline-navigation.stuck .nav-title {
    display: block !important;
    font-size: 0.6rem !important;
  }
  
  .timeline-line {
    left: 24px;
  }
  
  .timeline-item {
    margin-bottom: 30px;
  }
  
  .timeline-item.left .timeline-content,
  .timeline-item.right .timeline-content {
    margin-left: 50px;
    margin-right: 0;
    text-align: left;
    max-width: none;
  }
  
  .timeline-item.left .timeline-content::before,
  .timeline-item.right .timeline-content::before {
    left: -28px;
    right: auto;
    border-left-color: transparent;
    border-right-color: var(--panel);
  }
  
  .timeline-icon {
    left: 24px;
    width: 20px;
    height: 20px;
    border-width: 2px;
  }
  
  .timeline-icon svg {
    width: 10px;
    height: 10px;
  }
  
  .timeline-content {
    padding: 24px;
  }
  
  .timeline-title {
    font-size: 1.2rem;
  }
  
  .timeline-company {
    font-size: 1rem;
  }
  
  .timeline-description {
    font-size: 0.9rem;
  }
  
  .timeline-impact {
    padding: 16px;
  }
  
  .timeline-links {
    justify-content: flex-start !important;
  }
}

@media (max-width: 480px) {
  .timeline-container {
    padding: 24px 16px;
  }
  
  .timeline-navigation {
    padding: 16px;
    margin-bottom: 32px;
  }
  
  .timeline-navigation h2 {
    font-size: 1.2rem;
  }
  
  .timeline-nav-container {
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
  }
  
  .timeline-nav-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    min-width: 280px;
    padding: 0 2px;
  }
  
  .timeline-nav-item {
    padding: 10px 4px;
    min-width: 60px;
  }
  
  .nav-icon {
    width: 18px;
    height: 18px;
    margin-bottom: 4px;
  }
  
  .nav-icon svg {
    width: 9px;
    height: 9px;
  }
  
  .nav-year {
    font-size: 0.7rem;
    margin-bottom: 1px;
  }
  
  .nav-title {
    font-size: 0.6rem;
    line-height: 1.1;
  }
  
  .timeline-item.left .timeline-content,
  .timeline-item.right .timeline-content {
    padding: 20px;
    margin-left: 40px;
    margin-right: 16px;
  }
  
  .timeline-item.left .fun-fact,
  .timeline-item.right .fun-fact {
    margin-left: 40px;
    margin-right: 16px;
    padding: 16px;
  }
  
  .timeline-line {
    left: 20px;
  }
  
  .timeline-icon {
    left: 20px;
    width: 16px;
    height: 16px;
  }
  
  .timeline-icon svg {
    width: 8px;
    height: 8px;
  }
  
  .expand-toggle {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-top: 12px;
  }
  
  .timeline-details.expanded {
    max-height: 300px;
  }
  
  .timeline-details-content {
    font-size: 0.85rem;
    padding-top: 12px;
  }
}