/* blog.css - External stylesheet for all blog pages */

/* Article container and layout */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 120px);
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: rgb(17, 24, 39); /* text-gray-900 */
    transition: color 0.3s ease;
}

.dark .article-title {
    color: rgb(243, 244, 246); /* dark:text-gray-100 */
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: rgb(107, 114, 128); /* text-gray-500 */
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.dark .article-meta {
    color: rgb(156, 163, 175); /* dark:text-gray-400 */
}

/* Category tags */
.article-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-tag {
    background: rgb(243, 244, 246); /* bg-gray-100 */
    padding: 0.25rem 0.75rem;
    border-radius: 9999px; /* rounded-full */
    font-size: 0.8rem;
    color: rgb(75, 85, 99); /* text-gray-600 */
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-tag:hover {
    background: rgb(211, 84, 0); /* primary */
    color: white;
}

.dark .category-tag {
    background: rgb(31, 41, 55); /* dark:bg-gray-800 */
    color: rgb(209, 213, 219); /* dark:text-gray-300 */
}

.dark .category-tag:hover {
    background: rgb(211, 84, 0); /* primary */
    color: white;
}

/* Article content */
.article-content {
    line-height: 1.7;
    color: rgb(55, 65, 81); /* text-gray-700 */
    transition: color 0.3s ease;
}

.dark .article-content {
    color: rgb(209, 213, 219); /* dark:text-gray-300 */
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 3rem 0 1.5rem 0;
    color: rgb(17, 24, 39); /* text-gray-900 */
    border-bottom: 2px solid rgb(229, 231, 235); /* border-gray-200 */
    padding-bottom: 0.5rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.dark .article-content h2 {
    color: rgb(243, 244, 246); /* dark:text-gray-100 */
    border-bottom-color: rgb(55, 65, 81); /* dark:border-gray-700 */
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin: 2rem 0 1rem 0;
    color: rgb(211, 84, 0); /* primary */
    transition: color 0.3s ease;
}

.dark .article-content h3 {
    color: rgb(211, 84, 0); /* primary stays same in dark mode */
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: rgb(17, 24, 39); /* text-gray-900 */
    transition: color 0.3s ease;
}

.dark .article-content strong {
    color: rgb(243, 244, 246); /* dark:text-gray-100 */
}

/* Code blocks */
.code-block {
    background: rgb(248, 250, 252); /* bg-slate-50 */
    border: 1px solid rgb(226, 232, 240); /* border-slate-200 */
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark .code-block {
    background: rgb(15, 23, 42); /* dark:bg-slate-900 */
    border-color: rgb(51, 65, 85); /* dark:border-slate-700 */
}

.code-block pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    overflow: visible;
}

.code-block code {
    background: none;
    padding: 0;
    color: rgb(51, 65, 85); /* text-slate-700 */
    transition: color 0.3s ease;
}

.dark .code-block code {
    color: rgb(203, 213, 225); /* dark:text-slate-300 */
}

.code-language {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: rgb(107, 114, 128); /* text-gray-500 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.dark .code-language {
    color: rgb(156, 163, 175); /* dark:text-gray-400 */
}

/* Copy button for code blocks */
.copy-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgb(211, 84, 0); /* primary */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}

.copy-button:hover {
    background: rgb(180, 70, 0); /* primary-dark */
}

.code-block:hover .copy-button {
    opacity: 1;
}

/* Article preview/callout */
.article-preview {
    background: linear-gradient(135deg, rgb(211, 84, 0) 0%, rgb(230, 126, 34) 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin: 3rem 0;
    text-align: center;
    transition: transform 0.3s ease;
}

.article-preview:hover {
    transform: translateY(-2px);
}

.article-preview h3 {
    color: white !important;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-preview ul {
    text-align: left;
    max-width: 500px;
    margin: 1rem auto 0;
}

.article-preview li {
    margin-bottom: 0.5rem;
}

/* Navigation */
.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4rem 0 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgb(229, 231, 235); /* border-gray-200 */
    transition: border-color 0.3s ease;
}

.dark .article-navigation {
    border-top-color: rgb(55, 65, 81); /* dark:border-gray-700 */
}

.nav-link {
    text-decoration: none;
    color: rgb(107, 114, 128); /* text-gray-500 */
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: rgb(211, 84, 0); /* primary */
}

.dark .nav-link {
    color: rgb(156, 163, 175); /* dark:text-gray-400 */
}

.dark .nav-link:hover {
    color: rgb(211, 84, 0); /* primary */
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgb(229, 231, 235); /* border-gray-200 */
    flex-wrap: wrap;
    transition: border-color 0.3s ease;
}

.dark .share-buttons {
    border-top-color: rgb(55, 65, 81); /* dark:border-gray-700 */
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgb(209, 213, 219); /* border-gray-300 */
    border-radius: 0.375rem;
    text-decoration: none;
    color: rgb(75, 85, 99); /* text-gray-600 */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    white-space: nowrap;
}

.share-btn:hover {
    background: rgb(211, 84, 0); /* primary */
    color: white;
    border-color: rgb(211, 84, 0); /* primary */
    transform: translateY(-1px);
}

.dark .share-btn {
    background: rgb(31, 41, 55); /* dark:bg-gray-800 */
    border-color: rgb(55, 65, 81); /* dark:border-gray-700 */
    color: rgb(209, 213, 219); /* dark:text-gray-300 */
}

.dark .share-btn:hover {
    background: rgb(211, 84, 0); /* primary */
    color: white;
    border-color: rgb(211, 84, 0); /* primary */
}

.blog-post {
            max-width: 800px;
            margin: 0 auto;
            padding: 2rem;
            line-height: 1.7;
        }
        .post-header {
            text-align: center;
            margin-bottom: 3rem;
            padding-bottom: 2rem;
            border-bottom: 1px solid #eee;
        }
        .post-meta {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }
        .post-categories {
            margin-bottom: 1.5rem;
        }
        .category {
            background: #f0f0f0;
            color: #333;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            margin-right: 0.5rem;
            text-decoration: none;
        }
        .post-content {
            font-size: 1.1rem;
            color: #333;
        }
        .post-content h2 {
            color: #D35400;
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            font-weight: 500;
        }
        .post-content h3 {
            color: #555;
            margin-top: 2rem;
            margin-bottom: 0.8rem;
            font-weight: 500;
        }
        .post-content p {
            margin-bottom: 1.5rem;
        }
        .quote-callout {
            background: #f8f9fa;
            border-left: 4px solid #D35400;
            padding: 1.5rem;
            margin: 2rem 0;
            font-style: italic;
            font-size: 1.1rem;
        }
        .image-placeholder {
            background: #f0f0f0;
            height: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 2rem 0;
            color: #666;
            border-radius: 8px;
        }
        .back-to-blog {
            text-align: center;
            margin-top: 3rem;
            padding-top: 2rem;
            border-top: 1px solid #eee;
        }
        .back-to-blog a {
            color: #D35400;
            text-decoration: none;
            font-weight: 500;
        }
        .back-to-blog a:hover {
            text-decoration: underline;
        }

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: rgb(211, 84, 0); /* primary */
    z-index: 1000;
    transition: width 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .article-container {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .code-block {
        padding: 1rem;
        font-size: 0.8rem;
        margin: 1.5rem 0;
    }
    
    .copy-button {
        position: static;
        opacity: 1;
        margin-top: 1rem;
        width: 100%;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .article-preview {
        padding: 1.5rem;
        margin: 2rem 0;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .category-tag {
        flex-shrink: 0;
    }
}