/**
 * Custom Styles
 * Timeline animations and global transitions
 */

/* Theme Toggle Button Animations */
.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle i {
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.5s;
}

/* Icon toggle animation logic */
[data-theme="light"] .moon-icon { transform: translateY(20px) rotate(90deg); opacity: 0; }
[data-theme="light"] .sun-icon { transform: translateY(0) rotate(0); opacity: 1; }
[data-theme="dark"] .sun-icon { transform: translateY(-20px) rotate(-90deg); opacity: 0; }
[data-theme="dark"] .moon-icon { transform: translateY(0) rotate(0); opacity: 1; }

/* Prevent icon from intercepting mouse events */
.theme-toggle i {
  pointer-events: none;
}

/* Language Toggle Button */
.lang-toggle {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: inherit;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-toggle:hover,
[data-theme="dark"] .lang-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #3b82f6;
  color: #3b82f6;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #3b82f6;
}

/* Timeline Styles */
.timeline-container {
  position: relative;
  padding-left: 40px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 5px;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.dark .timeline-container::before,
[data-theme="dark"] .timeline-container::before {
  background: #4b5563;
}

.timeline-dot {
  position: absolute;
  left: -40px;
  margin-left: -1px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid #3b82f6;
  z-index: 10;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.timeline-dot-green {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.dark .timeline-dot,
[data-theme="dark"] .timeline-dot {
  background: #1a1a1a;
}

/* Base Animations */
html {
  scroll-behavior: smooth;
}

body {
  transition: background-color 0.3s, color 0.3s;
}

/* GitHub Corner */
.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
  0%, 100% { transform: rotate(0); }
  20%, 60% { transform: rotate(-25deg); }
  40%, 80% { transform: rotate(10deg); }
}

@media (max-width: 500px) {
  .github-corner:hover .octo-arm {
    animation: none;
  }
  .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }
}
