/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Prose Styles for Blog Posts */
.prose {
  color: #1f2937;
}

.dark .prose {
  color: #d1d5db;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #111827;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.dark .prose h1, .dark .prose h2, .dark .prose h3, 
.dark .prose h4, .dark .prose h5, .dark .prose h6 {
  color: #f3f4f6;
}

.prose h1 {
  font-size: 2rem;
}

.prose h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.dark .prose h2 {
  border-bottom-color: #374151;
}

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

.prose p {
  margin-bottom: 1.25rem;
}

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

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

.prose a {
  color: #4f46e5;
  text-decoration: underline;
  transition: color 0.2s;
}

.prose a:hover {
  color: #4338ca;
}

.dark .prose a {
  color: #818cf8;
}

.dark .prose a:hover {
  color: #6366f1;
}

.prose blockquote {
  border-left: 4px solid #4f46e5;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #4b5563;
  font-style: italic;
}

.dark .prose blockquote {
  color: #9ca3af;
}

.prose code {
  background-color: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
}

.dark .prose code {
  background-color: #1f2937;
  color: #e5e7eb;
}

.prose pre {
  background-color: #1f2937;
  color: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

.prose table th,
.prose table td {
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.dark .prose table th,
.dark .prose table td {
  border-color: #374151;
}

.prose table th {
  background-color: #f3f4f6;
  font-weight: 600;
}

.dark .prose table th {
  background-color: #1f2937;
}

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Scrollbar Hide */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Print Styles */
@media print {
  header, footer, .share-buttons, .related-posts {
    display: none !important;
  }
  
  .prose {
    font-size: 12pt;
    line-height: 1.6;
  }
  
  .prose h1, .prose h2, .prose h3 {
    page-break-after: avoid;
  }
  
  .prose img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}
