/* Custom overrides for Tailwind + Jekyll */

body {
  font-size: 18px;
  line-height: 1.7;
}

/* Smooth transitions for dark mode */
body,
nav,
footer,
main {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Prose code blocks */
.prose pre {
  background-color: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
}

.prose code {
  font-size: 0.875em;
}

.prose :where(code):not(:where(pre *)) {
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  background-color: rgba(59, 130, 246, 0.1);
}

/* Slow spin animation for spiral icon */
@keyframes slow-spin {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.animate-slow-spin {
  animation: slow-spin 20s linear infinite;
}

/* Fade in up animation for sections */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #3B82F6, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Selection color */
::selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: inherit;
}

/* Hover lift effect */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Focus-visible for accessibility */
*:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Active nav link */
.nav-link-active {
  color: white !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-slow-spin {
    animation: none;
  }

  .animate-fade-in-up {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hover-lift:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
