/* Simple Blog Readability Enhancements */
/* Works with existing Tailwind prose classes */

/* Optimal reading width and spacing */
.prose {
  max-width: 72ch !important;
  line-height: 1.75 !important;
  font-size: 1.125rem !important;
}

/* Better heading hierarchy */
.prose h1 {
  font-size: 2.5rem !important;
  line-height: 1.2 !important;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

.prose h2 {
  font-size: 2rem !important;
  line-height: 1.3 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
}

.prose h3 {
  font-size: 1.5rem !important;
  line-height: 1.4 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
}

/* Better paragraph spacing */
.prose p {
  margin-bottom: 1.5rem !important;
}

/* Improved links */
.prose a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 1.5px !important;
  transition: all 0.2s ease !important;
}

.prose a:hover {
  text-decoration-thickness: 2px !important;
}

/* Better code blocks */
.prose pre {
  padding: 1.5rem !important;
  border-radius: 0.5rem !important;
  overflow-x: auto !important;
  margin: 1.5rem 0 !important;
}

.prose code {
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.25rem !important;
  font-size: 0.9em !important;
}

/* Better blockquotes */
.prose blockquote {
  border-left: 4px solid !important;
  padding-left: 1.5rem !important;
  margin: 2rem 0 !important;
  font-style: italic !important;
  background: rgba(0, 0, 0, 0.02) !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
}

.dark .prose blockquote {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Better tables */
.prose table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5rem 0 !important;
}

.prose th,
.prose td {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid !important;
  text-align: left !important;
}

.prose th {
  background: rgba(0, 0, 0, 0.05) !important;
  font-weight: 600 !important;
}

.dark .prose th {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Better lists */
.prose ul,
.prose ol {
  margin: 1.5rem 0 !important;
  padding-left: 1.5rem !important;
}

.prose li {
  margin-bottom: 0.5rem !important;
}

/* TOC styling */
.toc {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.02);
  margin: 2rem 0;
}

.dark .toc {
  background: rgba(255, 255, 255, 0.05);
}

.toc a {
  display: block;
  padding: 0.25rem 0;
  text-decoration: none !important;
  color: inherit;
}

.toc a:hover {
  text-decoration: underline !important;
}

/* Heading anchors */
a.anchor {
  float: left;
  margin-left: -1.5rem;
  padding-right: 0.5rem;
  opacity: 0.3;
  text-decoration: none !important;
  color: inherit;
  font-size: 1.2em;
}

a.anchor:hover {
  opacity: 0.7;
}
