/* Custom styles for the blog */

/* Prose styling for markdown content */
.prose {
    color: #374151;
    max-width: none;
}

.prose h1 {
    color: #111827;
    font-weight: 800;
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
}

.prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.875rem;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3333333;
}

.prose h3 {
    color: #111827;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.prose h4 {
    color: #111827;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.5;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose strong {
    color: #111827;
    font-weight: 600;
}

.prose ul {
    list-style-type: disc;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ol {
    list-style-type: decimal;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #e5e7eb;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding-left: 1em;
}

.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.25em 0.375em;
    border-radius: 0.25rem;
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7142857;
    margin-top: 1.7142857em;
    margin-bottom: 1.7142857em;
    border-radius: 0.375rem;
    padding: 0.8571429em 1.1428571em;
}

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

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.prose hr {
    border-color: #e5e7eb;
    border-top-width: 1px;
    margin-top: 3em;
    margin-bottom: 3em;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 0.875em;
    line-height: 1.7142857;
}

.prose thead {
    color: #111827;
    font-weight: 600;
    border-bottom-width: 1px;
    border-bottom-color: #d1d5db;
}

.prose thead th {
    vertical-align: bottom;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
}

.prose tbody tr {
    border-bottom-width: 1px;
    border-bottom-color: #e5e7eb;
}

.prose tbody td {
    vertical-align: top;
    padding-top: 0.5714286em;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .prose {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .prose h1 {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
    
    .prose h2 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .prose h3 {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .prose p {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .prose img {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .prose pre {
        font-size: 0.75rem;
        padding: 0.75rem;
        margin: 1.5rem 0;
        overflow-x: auto;
    }
    
    .prose table {
        font-size: 0.75rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h1 {
        font-size: 1.875rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .group:hover .group-hover\:opacity-100 {
        opacity: 1;
    }
    
    .group:hover .group-hover\:visible {
        visibility: visible;
    }
}

/* Focus styles */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    nav, footer {
        display: none !important;
    }
    
    .prose {
        font-size: 12pt;
        line-height: 1.4;
    }
}