/* Minimal Custom CSS - Most styling is handled by Tailwind */


/* Code Blocks with Copy Button */
.highlight {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.highlight pre {
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
    box-sizing: border-box;
}

.highlight code {
    display: inline-block;
    min-width: 100%;
}

/* Copy Button */
.copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #334155;
    color: #cbd5e1;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    z-index: 10;
}

.copy-button.copied {
    background: #10b981;
    color: white;
}

.copy-button svg {
    width: 14px;
    height: 14px;
}

/* Inline Code */
:not(pre)>code {
    background: #fef3f2;
    color: #db2777;
    padding: 0.25em 0.5em;
    border-radius: 0.3rem;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-weight: 600;
    border: 1px solid #fce7f3;
}


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

/* Line Clamp Utilities (for older browsers) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Blockquote Styling */
blockquote {
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #4b5563;
}

/* Custom Table Styling */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

th {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) {
    background: #f9fafb;
}

/* Selection Color */
::selection {
    background: #bfdbfe;
    color: #1e40af;
}

/* Featured Image Enhancement */
article img[loading="eager"] {
    transition: transform 0.3s ease-in-out;
}

article img[loading="eager"]:hover {
    transform: scale(1.02);
}

/* Smooth fade-in for images */
article img {
    animation: fadeIn 0.6s ease-in-out;
}

/* Enhanced prose spacing for article content */
.prose h2:first-child {
    margin-top: 0;
}

/* Modern focus styles */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
a,
button {
    transition: all 0.2s ease-in-out;
}

/* ========================================
   Article Content Styling (Markdown)
   ======================================== */

.article-content {
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ========================================
   Mobile Footer Alignment
   ======================================== */

@media (max-width: 767px) {
    footer .grid > div {
        text-align: center;
    }
    
    footer .flex.space-x-4 {
        justify-content: center;
    }
}

/* Headings */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #111827;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

/* Paragraphs */
.article-content p {
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

/* Links */
.article-content a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.75rem;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin: 0.75rem 0;
    padding-left: 0.5rem;
    color: #4b5563;
}

.article-content li::marker {
    color: #3b82f6;
    font-weight: 600;
}

.article-content ul ul,
.article-content ol ul,
.article-content ul ol,
.article-content ol ol {
    margin: 0.5rem 0;
}

/* Strong and emphasis */
.article-content strong {
    color: #111827;
    font-weight: 700;
}

.article-content em {
    font-style: italic;
    color: #374151;
}


.article-content pre {
    margin: 2rem 0;
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific code block adjustments */
@media (max-width: 640px) {
    .highlight,
    .article-content pre {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        max-width: calc(100vw - 2rem);
    }
    
    .highlight pre {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: #1f2937;
    font-size: 1.05rem;
}

.article-content blockquote p {
    margin: 0;
    color: inherit;
}

.article-content blockquote p:first-child::before {
    content: '"';
    color: #3b82f6;
    font-size: 1.5em;
    font-weight: 700;
    margin-right: 0.25rem;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin: 2.5rem auto;
    display: block;
}

/* Horizontal rule */
.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 3rem 0;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    overflow: hidden;
}

.article-content thead {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.article-content th {
    color: white;
    font-weight: 600;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.article-content tbody tr:last-child td {
    border-bottom: none;
}

.article-content tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Definition lists */
.article-content dl {
    margin: 1.5rem 0;
}

.article-content dt {
    font-weight: 700;
    color: #111827;
    margin-top: 1rem;
}

.article-content dd {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Keyboard input */
.article-content kbd {
    background: #1f2937;
    color: #f9fafb;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: monospace;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}