/* Modern Tech Blog Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.3;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Article Styles */
.article {
background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  max-width: 1200px;
  margin: 0px auto;
  padding: 3rem;
}

.article:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.article-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-meta .badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-featured-image {
    padding: 10px;
  overflow: hidden;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}
}

.article-content {
    padding: 2rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.7;
}

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

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.article-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.article-content a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

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

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

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

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: var(--light-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
}

.article-content code {
    font-family: var(--font-mono);
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: var(--danger-color);
}

.article-content pre {
    background-color: var(--dark-color);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Navigation Styles */
.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-link.disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-link.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Related Posts Styles */
.related-posts {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-post-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.related-post-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.related-post-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post-image {
    height: 160px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-post-item:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-title {
    padding: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.no-related {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

/* Search Styles */
.search-container {
    margin: 1.5rem 0;
    text-align: center;
}

.search-form {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.search-input {
    padding: 0.75rem 1rem;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    width: 300px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.search-results {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.search-results h2 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.8rem;
}

.search-count {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result-item {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.search-result-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.search-result-item h3 {
    margin-bottom: 0.75rem;
}

.search-result-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

.search-result-item h3 a:hover {
    color: var(--accent-color);
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.search-result-meta span {
    color: var(--text-muted);
}

.search-result-image {
    margin: 1rem 0;
    max-width: 200px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.search-result-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.search-result-image:hover img {
    transform: scale(1.05);
}

.search-result-keywords {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.search-result-keywords strong {
    color: var(--primary-color);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-results p {
    font-size: 1.1rem;
    font-style: italic;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination-current {
    padding: 0.5rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.pagination-dots {
    padding: 0.5rem 0.25rem;
    color: var(--text-muted);
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header {
        padding: 2rem 0;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .article {
        margin-bottom: 2rem;
    }
    
    .article-header,
    .article-content {
        padding: 1.5rem;
    }
    
    .article h2 {
        font-size: 2rem;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .article h2 {
        font-size: 1.75rem;
    }
    
    .article-header,
    .article-content {
        padding: 1rem;
    }
    
    .related-posts {
        padding: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --light-color: #0f172a;
        --border-color: #334155;
    }
    
    body {
        background-color: var(--light-color);
    }
    
    .article {
        background-color: #1e293b;
        border-color: var(--border-color);
    }
    
    .article-navigation {
        background-color: #1e293b;
    }
    
    .related-posts {
        background-color: #1e293b;
    }
    
    .related-post-item {
        background-color: #334155;
    }
    
    .article-content code {
        background-color: #334155;
        color: #fbbf24;
    }
    
    .article-content blockquote {
        background-color: #1e293b;
    }
}