/* ==========================================================================
   CUSTOM ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.8);
  }
}

@keyframes tilt {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
}

/* Tilt Animation */
.tilt-element {
  animation: tilt 3s ease-in-out infinite;
}

/* Particle Container */
#particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

#particles::before,
#particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #10b981;
  border-radius: 50%;
  opacity: 0.6;
  animation: particle-float 8s infinite ease-in-out;
}

#particles::before {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

#particles::after {
  top: 60%;
  right: 20%;
  animation-delay: 2s;
}

@keyframes particle-float {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0.6;
  }
  25% {
    transform: translate(100px, -50px);
    opacity: 0.8;
  }
  50% {
    transform: translate(50px, -100px);
    opacity: 0.4;
  }
  75% {
    transform: translate(-50px, -75px);
    opacity: 0.7;
  }
}

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

/* ==========================================================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ========================================================================== */

.prose {
  color: #d1d5db;
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.75;
}

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

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

.prose h4 {
  color: #34d399;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

/* Paragraphs */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: #d1d5db;
  line-height: 1.7;
}

/* Strong & Em */
.prose strong {
  color: #34d399;
  font-weight: 600;
}

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

/* Links */
.prose a {
  color: #10b981;
  text-decoration: underline;
  transition: color 0.2s;
}

.prose a:hover {
  color: #34d399;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

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

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

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

.prose li::marker {
  color: #10b981;
}

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

/* Blockquotes */
.prose blockquote {
  border-left: 0.25rem solid #10b981;
  padding-left: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #9ca3af;
  background: rgba(16, 185, 129, 0.05);
  padding-top: 1em;
  padding-bottom: 1em;
  padding-right: 1em;
  border-radius: 0.25rem;
}

.prose blockquote p {
  margin: 0;
}

/* Tables */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose thead {
  background: rgba(16, 185, 129, 0.1);
}

.prose thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #34d399;
  border-bottom: 2px solid rgba(16, 185, 129, 0.3);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose tbody tr {
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

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

.prose tbody tr:hover {
  background: rgba(16, 185, 129, 0.05);
}

.prose tbody td {
  padding: 0.875rem 1rem;
  color: #d1d5db;
  font-size: 0.9375rem;
}

/* Code */
.prose code {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: rgba(10, 10, 10, 0.5);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1.25em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #d1d5db;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* HR */
.prose hr {
  border: none;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

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

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

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

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

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

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

/* Ensure proper contrast */
.prose-invert {
  --tw-prose-body: #d1d5db;
  --tw-prose-headings: #34d399;
  --tw-prose-links: #10b981;
  --tw-prose-bold: #34d399;
  --tw-prose-counters: #10b981;
  --tw-prose-bullets: #10b981;
  --tw-prose-quotes: #9ca3af;
  --tw-prose-code: #34d399;
  --tw-prose-th-borders: rgba(16, 185, 129, 0.3);
  --tw-prose-td-borders: rgba(16, 185, 129, 0.1);
}
