/* Animations and Custom Styles */

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* Neon Grid Background */
.neon-grid {
  background-image: linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-pulse 4s ease-in-out infinite;
}

@keyframes grid-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Glow Box Effect */
.glow-box {
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
  }
  50% {
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.5), 0 0 80px rgba(139, 92, 246, 0.3);
  }
}

/* Marquee Animation */
.marquee-container {
  position: relative;
  width: 100%;
}

.marquee-content {
  animation: marquee 40s linear infinite;
  will-change: transform;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Enhanced Prose Styling for Markdown Content with Typography Best Practices */
.prose-custom {
  color: #e2e8f0;
  line-height: 1.75;
  font-size: 1.0625rem;
  max-width: 100%;
}

/* Headings with proper hierarchy and spacing */
.prose-custom h1,
.prose-custom h2,
.prose-custom h3,
.prose-custom h4,
.prose-custom h5,
.prose-custom h6 {
  color: #06b6d4;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 0.75em;
  letter-spacing: -0.025em;
}

.prose-custom h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

.prose-custom h2 {
  font-size: 2rem;
  border-bottom: 2px solid rgba(6, 182, 212, 0.2);
  padding-bottom: 0.5em;
}

.prose-custom h3 {
  font-size: 1.625rem;
  color: #8b5cf6;
}

.prose-custom h4 {
  font-size: 1.375rem;
  color: #a78bfa;
}

.prose-custom h5 {
  font-size: 1.125rem;
}

.prose-custom h6 {
  font-size: 1rem;
}

/* Paragraphs with optimal readability */
.prose-custom p {
  margin-bottom: 1.5em;
  line-height: 1.75;
  color: #cbd5e1;
}

.prose-custom p:first-of-type {
  font-size: 1.125rem;
  color: #e2e8f0;
}

/* Links with hover effects */
.prose-custom a {
  color: #06b6d4;
  text-decoration: underline;
  text-decoration-color: rgba(6, 182, 212, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
  font-weight: 500;
}

.prose-custom a:hover {
  color: #8b5cf6;
  text-decoration-color: rgba(139, 92, 246, 0.6);
}

/* Lists with proper spacing */
.prose-custom ul,
.prose-custom ol {
  margin-bottom: 1.5em;
  padding-left: 1.75em;
  color: #cbd5e1;
}

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

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

.prose-custom li {
  margin-bottom: 0.625em;
  line-height: 1.75;
  padding-left: 0.375em;
}

.prose-custom li::marker {
  color: #06b6d4;
  font-weight: 600;
}

.prose-custom ul ul,
.prose-custom ol ul,
.prose-custom ul ol,
.prose-custom ol ol {
  margin-top: 0.625em;
  margin-bottom: 0.625em;
}

/* Strong and emphasis */
.prose-custom strong {
  color: #f1f5f9;
  font-weight: 700;
}

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

/* Code elements */
.prose-custom code {
  background-color: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.prose-custom pre {
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 0.5rem;
  padding: 1.25em;
  overflow-x: auto;
  margin-bottom: 1.5em;
  line-height: 1.6;
}

.prose-custom pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #e2e8f0;
}

/* Blockquotes */
.prose-custom blockquote {
  border-left: 0.25rem solid #06b6d4;
  padding-left: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 2em 0;
  font-style: italic;
  color: #94a3b8;
  background-color: rgba(6, 182, 212, 0.05);
  border-radius: 0 0.375rem 0.375rem 0;
}

.prose-custom blockquote p {
  margin-bottom: 0.75em;
}

.prose-custom blockquote p:last-child {
  margin-bottom: 0;
}

/* Images with responsive sizing */
.prose-custom img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2em auto;
  display: block;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
}

/* Tables with proper styling and overflow handling */
.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9375rem;
  background-color: rgba(15, 23, 42, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose-custom thead {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
}

.prose-custom th {
  padding: 0.875em 1em;
  text-align: left;
  font-weight: 700;
  color: #06b6d4;
  border-bottom: 2px solid rgba(6, 182, 212, 0.4);
  white-space: nowrap;
}

.prose-custom td {
  padding: 0.875em 1em;
  border-bottom: 1px solid rgba(6, 182, 212, 0.1);
  color: #cbd5e1;
  line-height: 1.6;
}

.prose-custom tbody tr {
  transition: background-color 0.2s ease;
}

.prose-custom tbody tr:hover {
  background-color: rgba(6, 182, 212, 0.08);
}

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

/* Table responsive wrapper - MUST be applied to wrapper div, not table itself */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.5rem;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

/* Horizontal rules */
.prose-custom hr {
  border: none;
  border-top: 2px solid rgba(6, 182, 212, 0.2);
  margin: 3em 0;
}

/* Figures and captions */
.prose-custom figure {
  margin: 2em 0;
}

.prose-custom figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 0.75em;
  font-style: italic;
}

/* Definition lists */
.prose-custom dl {
  margin-bottom: 1.5em;
}

.prose-custom dt {
  font-weight: 700;
  color: #06b6d4;
  margin-top: 1em;
}

.prose-custom dd {
  margin-left: 1.75em;
  margin-bottom: 0.5em;
  color: #cbd5e1;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .prose-custom {
    font-size: 1rem;
  }

  .prose-custom h1 {
    font-size: 2rem;
  }

  .prose-custom h2 {
    font-size: 1.625rem;
  }

  .prose-custom h3 {
    font-size: 1.375rem;
  }

  .prose-custom h4 {
    font-size: 1.125rem;
  }

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

  .prose-custom th,
  .prose-custom td {
    padding: 0.625em 0.75em;
  }
}

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

/* Parallax Elements */
[data-parallax] {
  will-change: transform;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #06b6d4, #8b5cf6);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0891b2, #7c3aed);
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
details:focus {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

/* Prevent horizontal overflow */
body {
  overflow-x: clip;
}
