/* Animations & Custom Styles */

@keyframes tilt {
  0%,
  100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  }
  75% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg);
  }
}

.tilt-on-hover {
  transition: transform 0.3s ease;
}

.tilt-on-hover:hover {
  animation: tilt 0.6s ease-in-out;
}

.parallax-img {
  transition: transform 0.5s ease-out;
}

body.scrolling .parallax-img {
  transform: translateY(var(--scroll-y, 0));
}

.delay-1000 {
  animation-delay: 1s;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 40rem;
}

/* Prose Styling for Markdown Content */
.prose {
  color: #e5e7eb;
  max-width: 100%;
  line-height: 1.75;
}

.prose h2 {
  color: #d4af37;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
}

.prose h3 {
  color: #f4d03f;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  line-height: 1.4;
}

.prose h4 {
  color: #e5e7eb;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #d1d5db;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 0.125rem solid rgba(212, 175, 55, 0.2);
}

.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.75;
  color: #d1d5db;
}

.prose li::marker {
  color: #d4af37;
}

.prose strong {
  color: #f9fafb;
  font-weight: 600;
}

.prose em {
  color: #f3f4f6;
  font-style: italic;
}

.prose a {
  color: #d4af37;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.prose a:hover {
  color: #f4d03f;
}

.prose blockquote {
  border-left: 0.25rem solid #d4af37;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #9ca3af;
  background-color: rgba(26, 31, 53, 0.5);
  padding-top: 1em;
  padding-bottom: 1em;
  border-radius: 0.375rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.9375rem;
}

.prose thead {
  border-bottom: 0.125rem solid rgba(212, 175, 55, 0.3);
}

.prose thead th {
  color: #d4af37;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  vertical-align: bottom;
}

.prose tbody tr {
  border-bottom: 0.0625rem solid rgba(212, 175, 55, 0.1);
}

.prose tbody tr:last-child {
  border-bottom: none;
}

.prose tbody td {
  padding: 0.75rem 1rem;
  vertical-align: top;
  color: #d1d5db;
}

.prose tbody tr:hover {
  background-color: rgba(26, 31, 53, 0.3);
}

.prose code {
  background-color: rgba(26, 31, 53, 0.6);
  color: #f4d03f;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background-color: rgba(26, 31, 53, 0.8);
  color: #e5e7eb;
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border: 0.0625rem solid rgba(212, 175, 55, 0.2);
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }

  .prose table {
    font-size: 0.875rem;
  }

  .prose thead th,
  .prose tbody td {
    padding: 0.5rem 0.75rem;
  }
}

/* Ensure no horizontal overflow */
.prose > * {
  max-width: 100%;
}

/* Additional scrolling enhancement */
.prose .table-responsive {
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-radius: 0.75rem;
  border: 0.0625rem solid rgba(212, 175, 55, 0.2);
}
