/**
 * Blog-specific styles for better content formatting
 */

.prose {
  color: var(--color-text-primary);
  max-width: 75ch;
}

.prose h1,
.prose h1 + p,
.prose h2,
.prose h2 + p,
.prose h3,
.prose h3 + p {
  color: var(--color-text-primary);
}

.prose > h1:first-child {
  display: none; /* Hide if same as page title */
}

.prose h1 {
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary-dark);
}

.prose h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  color: var(--color-text-primary);
}

.prose h5 {
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose h6 {
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.prose ul,
.prose ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

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

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

.prose li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  font-size: 1rem;
}

.prose li > p {
  margin-bottom: 0.5rem;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose strong {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.prose em {
  font-style: italic;
  color: var(--color-text-secondary);
}

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.prose a:hover {
  color: var(--color-primary-dark);
}

.prose blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

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

.prose code {
  background: var(--color-bg);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-primary-dark);
}

.prose pre {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--color-primary);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: #e0e0e0;
  font-size: 0.95em;
  line-height: 1.5;
}

.prose hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 3rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.prose table thead {
  background-color: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
}

.prose table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.prose table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.prose table tr:hover {
  background-color: var(--color-bg);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

/* Special formatting for blog-specific elements */
.prose .highlight {
  background: linear-gradient(120deg, var(--color-primary-light) 0%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 40%;
  background-position: 0 90%;
  padding: 0.2rem 0;
}

/* Checklist styles */
.prose input[type='checkbox'] {
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .prose h1 {
    font-size: 2rem;
  }

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

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

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

  .prose p,
  .prose li {
    font-size: 1rem;
  }

  .prose ul,
  .prose ol {
    padding-left: 1.5rem;
  }

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

  .prose table th,
  .prose table td {
    padding: 0.5rem;
  }
}

