/* Blog styles matching the main website theme */

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    background: hsl(var(--background));
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid hsl(var(--border));
}

.post-nav-left,
.post-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-btn:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
    transform: translateY(-1px);
}


/* Header */
.blog-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid hsl(var(--border));
}

.blog-header-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: hsl(var(--foreground));
}

.blog-title-section {
    text-align: center;
}

.blog-main-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: hsl(var(--foreground));
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--foreground)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
    line-height: 1.5;
}

.theme-toggle {
    align-self: center;
    background: none;
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    color: hsl(var(--foreground));
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
}

/* Blog Grid */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.blog-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(8px);
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
}

.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.blog-card-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.blog-card-title a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: hsl(var(--primary));
}

.blog-card-date {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.blog-card-excerpt {
    color: hsl(var(--foreground));
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.tag-more {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--primary));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.read-more-link:hover {
    gap: 0.75rem;
    color: hsl(var(--primary));
}

/* Single Post Styles */
.blog-post {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(16px);
    box-sizing: border-box;
}

.post-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid hsl(var(--border));
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
    border-radius: 2px;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: hsl(var(--foreground));
}

.breadcrumb-separator {
    color: hsl(var(--muted-foreground));
}

.breadcrumb-current {
    color: hsl(var(--foreground));
    font-weight: 500;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: hsl(var(--foreground));
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--foreground)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.post-meta-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-date {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.meta-separator {
    color: hsl(var(--muted-foreground));
    opacity: 0.6;
}

.reading-time {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-weight: 500;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: hsl(var(--foreground));
    background: hsl(var(--muted) / 0.3);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid hsl(var(--border));
    margin-top: 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
    color: hsl(var(--foreground));
}

.post-content h1 {
    font-size: 2rem;
    font-weight: 700;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.post-content p {
    margin: 0 0 1.5rem 0;
}

.post-content a {
    color: hsl(var(--primary));
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.post-content a:hover {
    opacity: 0.8;
}

.post-content code {
    background: hsl(var(--muted));
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'Monaco', 'Consolas', monospace;
}

.post-content pre {
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.post-content .blog-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
}

.post-content th {
    background: hsl(var(--muted));
    font-weight: 600;
    color: hsl(var(--foreground));
}

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

.post-content hr {
    border: none;
    height: 1px;
    background: hsl(var(--border));
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid hsl(var(--primary));
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: hsl(var(--muted-foreground));
}

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

.post-content li {
    margin: 0.5rem 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: hsl(var(--muted-foreground));
}

.empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: hsl(var(--foreground));
}

.empty-state p {
    margin: 0;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .post-nav-left,
    .post-nav-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .blog-post {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .blog-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .blog-main-title {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .blog-card-content {
        padding: 1.5rem;
    }
    
    .blog-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .blog-card-title {
        font-size: 1.25rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h1 {
        font-size: 1.75rem;
    }
    
    .post-content h2 {
        font-size: 1.375rem;
    }
    
    .post-content h3 {
        font-size: 1.125rem;
    }
    
    .empty-state {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .blog-card-tags {
        margin-bottom: 1rem;
    }
    
    .tag {
        font-size: 0.6875rem;
        padding: 0.125rem 0.5rem;
    }
    
    .post-breadcrumb {
        font-size: 0.75rem;
    }
    
    .breadcrumb-current {
        display: none;
    }
}