/* ============================================
   Blog Post Typography Styles
   Premium dark-mode optimized prose for blog content
   ============================================ */

/* Base prose container - ensure it's recognized */
.prose {
  color: #cbd5e1 !important;
  line-height: 1.75 !important;
  font-size: 1.125rem !important;
}

.prose>*+* {
  margin-top: 1.5em !important;
}

/* Headings */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #ffffff !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
}

.prose h1 {
  font-size: 2.25em !important;
  margin-top: 0 !important;
  margin-bottom: 0.9em !important;
}

.prose h2 {
  font-size: 1.75em !important;
  margin-top: 2em !important;
  margin-bottom: 1em !important;
  padding-bottom: 0.5em !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.prose h3 {
  font-size: 1.4em !important;
  margin-top: 1.8em !important;
  margin-bottom: 0.75em !important;
}

.prose h4 {
  font-size: 1.2em !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.5em !important;
}

/* Paragraphs */
.prose p {
  margin-top: 1.5em !important;
  margin-bottom: 1.5em !important;
  line-height: 1.85 !important;
  color: #cbd5e1 !important;
}

/* First paragraph after heading - slightly less top margin */
.prose h2+p,
.prose h3+p,
.prose h4+p {
  margin-top: 0.75em !important;
}

/* Links */
.prose a {
  color: #818cf8 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.15s ease !important;
}

.prose a:hover {
  color: #a5b4fc !important;
  text-decoration: underline !important;
}

/* Bold and emphasis */
.prose strong,
.prose b {
  color: #ffffff !important;
  font-weight: 600 !important;
}

.prose em,
.prose i {
  color: #e2e8f0 !important;
  font-style: italic !important;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.5em !important;
  margin-bottom: 1.5em !important;
  padding-left: 1.75em !important;
  color: #cbd5e1 !important;
}

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

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

.prose li {
  margin-top: 0.625em !important;
  margin-bottom: 0.625em !important;
  padding-left: 0.5em !important;
  line-height: 1.75 !important;
}

.prose ul>li::marker,
.prose ol>li::marker {
  color: #64748b !important;
}

/* Nested lists */
.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol {
  margin-top: 0.75em !important;
  margin-bottom: 0.75em !important;
}

/* Blockquotes */
.prose blockquote {
  font-style: italic !important;
  color: #e2e8f0 !important;
  border-left: 4px solid #6366f1 !important;
  padding-left: 1.5em !important;
  padding-top: 1em !important;
  padding-bottom: 1em !important;
  padding-right: 1.5em !important;
  margin-top: 2em !important;
  margin-bottom: 2em !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-radius: 0 0.75rem 0.75rem 0 !important;
}

.prose blockquote p {
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}

.prose blockquote p:first-child {
  margin-top: 0 !important;
}

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

/* Inline code */
.prose code {
  color: #a5b4fc !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  padding: 0.2em 0.4em !important;
  border-radius: 0.25rem !important;
  font-size: 0.875em !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-weight: 400 !important;
}

/* Remove backticks added by some markdown renderers */
.prose code::before,
.prose code::after {
  content: none !important;
}

/* Code blocks */
.prose pre {
  color: #e2e8f0 !important;
  background-color: rgba(15, 23, 42, 0.8) !important;
  overflow-x: auto !important;
  font-size: 0.875em !important;
  line-height: 1.7 !important;
  margin-top: 2em !important;
  margin-bottom: 2em !important;
  border-radius: 0.75rem !important;
  padding: 1.25em 1.5em !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.prose pre code {
  background-color: transparent !important;
  border-width: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-weight: inherit !important;
  color: inherit !important;
  font-size: inherit !important;
  font-family: inherit !important;
  line-height: inherit !important;
}

/* Horizontal rules */
.prose hr {
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-top-width: 1px !important;
  margin-top: 3em !important;
  margin-bottom: 3em !important;
}

/* Images */
.prose img {
  margin-top: 2em !important;
  margin-bottom: 2em !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

/* Figure captions */
.prose figcaption {
  color: #94a3b8 !important;
  font-size: 0.875em !important;
  margin-top: 0.75em !important;
  text-align: center !important;
}

/* Tables */
.prose table {
  width: 100% !important;
  table-layout: auto !important;
  text-align: left !important;
  margin-top: 2em !important;
  margin-bottom: 2em !important;
  font-size: 0.875em !important;
  line-height: 1.7 !important;
  border-collapse: collapse !important;
}

.prose thead {
  border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.prose thead th {
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 0.75em 1em !important;
  text-align: left !important;
}

.prose tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.prose tbody td {
  padding: 0.75em 1em !important;
  color: #cbd5e1 !important;
}

/* prose-lg modifier - larger text */
.prose-lg {
  font-size: 1.125rem !important;
}

.prose-lg p,
.prose-lg li {
  line-height: 1.8 !important;
}

/* prose-invert - already covered but ensure inheritance */
.prose-invert,
.prose-invert * {
  --tw-prose-body: #cbd5e1;
  --tw-prose-headings: #ffffff;
  --tw-prose-links: #818cf8;
  --tw-prose-bold: #ffffff;
  --tw-prose-quotes: #e2e8f0;
  --tw-prose-code: #a5b4fc;
}

/* max-w-none removes width constraint */
.prose.max-w-none {
  max-width: none !important;
}