/*
  Blog typography and content styles
  - Scoped to the blog article container
  - Improves readability for headings, lists, code, quotes, tables, images
*/

.prose {
  line-height: 1.8;
  color: #111827;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.prose h1 {
  font-size: 2.25rem;
}
.prose h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.3rem;
}
.prose h3 {
  font-size: 1.375rem;
}
.prose h4 {
  font-size: 1.125rem;
}

.prose p {
  margin: 1em 0;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}
.prose a:hover {
  color: #1d4ed8;
}

.prose ul,
.prose ol {
  margin: 1em 0 1.25em 1.5em;
  padding-left: 1rem;
}
.prose ul {
  list-style-type: disc;
}
.prose ol {
  list-style-type: decimal;
}
.prose li {
  margin: 0.35em 0;
}

.prose blockquote {
  margin: 1.25em 0;
  padding: 0.75em 1em;
  border-left: 4px solid #e5e7eb;
  color: #374151;
  background: #f9fafb;
}

.prose code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
  font-size: 0.95em;
  background: #f3f4f6;
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

.prose pre {
  overflow: auto;
  background: #0b1020;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.25em 0;
}
.prose pre code {
  background: transparent;
  padding: 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.25em 0;
}

/* TOC styles */
#post-toc a {
  text-decoration: none;
}
#post-toc a.active {
  color: #111827;
  font-weight: 600;
}

/* Dedicated TOC styles to avoid relying on Tailwind in TS-generated markup */
#post-toc .toc-title {
  font-size: 0.875rem; /* text-sm */
  font-weight: 700; /* font-bold */
  text-transform: uppercase;
  letter-spacing: 0.05em; /* tracking-wide */
  color: #374151; /* text-gray-700 */
  margin-bottom: 0.75rem; /* mb-3 */
}

#post-toc .toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#post-toc .toc-item {
  margin: 0 0 0.5rem 0; /* space-y-2 equivalent */
}

#post-toc .toc-link {
  display: block;
  font-size: 0.875rem; /* text-sm */
  color: #374151; /* text-gray-700 */
  text-decoration: none;
}

#post-toc .toc-link:hover {
  color: #8b5dff; /* primary-500 */
  text-decoration: underline;
}

#post-toc .toc-link.active {
  color: #111827; /* text-gray-900 */
  font-weight: 600; /* font-semibold */
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25em 0;
}
.prose th,
.prose td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.prose thead th {
  background: #f3f4f6;
  font-weight: 600;
}

.prose strong {
  font-weight: 700;
}
.prose em {
  font-style: italic;
}
