/* Particle Animation */
#particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 0.375rem;
  height: 0.375rem;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.6) 0%, rgba(251, 146, 60, 0) 70%);
  border-radius: 50%;
  animation: float linear infinite;
  pointer-events: none;
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* Tilt Effect */
.tilt {
  transition: transform 0.3s ease;
}

.tilt:hover {
  transform: perspective(62.5rem) rotateX(2deg) rotateY(2deg) scale(1.02);
}

.tilt-active {
  transform: perspective(62.5rem) rotateX(5deg) rotateY(5deg) scale(1.05);
}

/* Prose Styling for Markdown Content */
.prose {
  color: #1f2937;
  max-width: 100%;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.25;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.125rem solid #f59e0b;
}

.prose h3 {
  color: #1f2937;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.375;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h4 {
  color: #374151;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.5;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: #374151;
}

.prose a {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #d97706;
  text-decoration: underline;
}

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

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

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

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

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

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

.prose img {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-x: auto;
  display: block;
}

.prose table thead {
  background: linear-gradient(to right, #f59e0b, #d97706);
  color: white;
}

.prose table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 0.125rem solid #92400e;
}

.prose table tbody tr {
  border-bottom: 0.0625rem solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.prose table tbody tr:hover {
  background-color: #fff7ed;
}

.prose table tbody td {
  padding: 0.75rem 1rem;
  color: #374151;
}

.prose blockquote {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
  border-left: 0.25rem solid #f59e0b;
  font-style: italic;
  color: #6b7280;
  background-color: #fffbeb;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 1rem;
  border-radius: 0.375rem;
}

.prose code {
  background-color: #fef3c7;
  color: #92400e;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: #1f2937;
  color: #f3f4f6;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

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

.prose hr {
  margin-top: 3rem;
  margin-bottom: 3rem;
  border: 0;
  border-top: 0.125rem solid #e5e7eb;
}

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

/* Ensure responsive images */
.prose img {
  max-width: 100%;
  height: auto;
}

/* Media Queries for Better Typography */
@media (max-width: 48rem) {
  .prose {
    font-size: 0.9375rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .prose h4 {
    font-size: 1.125rem;
  }
  
  .prose table {
    font-size: 0.8125rem;
  }
  
  .prose table thead th,
  .prose table tbody td {
    padding: 0.5rem 0.75rem;
  }
}

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

/* Focus Styles for Accessibility */
a:focus,
button:focus,
summary:focus {
  outline: 0.125rem solid #f59e0b;
  outline-offset: 0.125rem;
}

/* Animation for Details/Summary */
details summary {
  transition: color 0.2s ease;
}

details[open] summary {
  color: #d97706;
}
