/* Blog View Styles - Minimal Design */
.blog-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--dirty-white);
    z-index: 2000;
    overflow-y: auto;
    padding-bottom: 80px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%) scale(0.95);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-view.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.blog-view.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%) scale(0.95);
}

.blog-hero {
    text-align: center;
    padding: 60px 20px 40px;
    border-bottom: 1px solid var(--border-light);
}

.blog-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--charcoal);
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
}

.blog-subtitle {
    font-size: 1rem;
    color: var(--muted-text);
    margin: 0;
    font-weight: 400;
}

.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-header h2 {
    margin: 0;
    color: var(--charcoal);
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    padding: 0;
}

.blog-controls {
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    background: var(--white);
    color: var(--dark-grey);
    font-family: inherit;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-green);
}

.blog-filters {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-section {
    text-align: center;
}

.filter-section-title {
    font-size: 0.9rem;
    color: var(--charcoal);
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.filter-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--dark-grey);
    font-weight: 500;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.articles-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card {
    cursor: pointer;
    transition: all 0.2s;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.article-card:last-child {
    border-bottom: none;
}

.article-card:hover {
    transform: translateX(8px);
}

.article-card:hover .article-title {
    color: var(--accent-green);
}

.article-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 8px 0;
    line-height: 1.3;
    transition: color 0.2s;
}

.article-excerpt {
    color: var(--muted-text);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--muted-text);
    flex-wrap: wrap;
}

.article-date {
    font-weight: 500;
}

.article-topic {
    padding: 4px 10px;
    background: var(--accent-green);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.article-tag {
    padding: 2px 6px;
    background: var(--hover-grey);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--dark-grey);
    border: 1px solid var(--border-light);
}

.article-reader {
    max-width: none;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-reader.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.back-link {
    background: none;
    border: none;
    color: var(--accent-green);
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0;
}

.back-link:hover {
    color: #16a34a;
}

.article-content {
    line-height: 1.7;
    color: var(--muted-text);
}

.article-content h1 {
    color: var(--charcoal);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.article-content h2 {
    color: var(--dark-grey);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 32px 0 16px 0;
    border: none;
    padding: 0;
}

.article-content h3 {
    color: var(--dark-grey);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

.article-content p {
    margin: 0 0 16px 0;
}

.article-content code {
    background: var(--hover-grey);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--dark-grey);
}

.article-content pre {
    background: var(--hover-grey);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border-light);
}

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

.article-content blockquote {
    border-left: 4px solid var(--accent-green);
    margin: 20px 0;
    padding: 16px 20px;
    background: var(--hover-grey);
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin: 8px 0;
}

.article-content a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
}

.article-content a:hover {
    text-decoration: underline;
}

/* Blog toggle button styling */
.blog-toggle {
    background: var(--accent-green) !important;
    color: white !important;
    border-color: var(--accent-green) !important;
}

.blog-toggle:hover {
    background: #16a34a !important;
}

/* Hide portfolio when blog is active */
body.blog-active .desktop {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%) scale(0.95);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.blog-active .desktop .window {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
}

/* Ensure smooth transition back to portfolio view */
.desktop .window {
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.blog-active .taskbar {
    z-index: 3000;
}

/* Disable taskbar buttons in blog mode */
body.blog-active .taskbar-item:not(.blog-toggle) {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* No articles state */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted-text);
    font-style: italic;
}

/* Loading and error states */
.loading, .error {
    text-align: center;
    padding: 40px;
    color: var(--muted-text);
    font-style: italic;
}

.error {
    color: var(--red);
}

/* Responsive blog styles */
@media (max-width: 768px) {
    .blog-hero {
        padding: 40px 16px 24px;
    }
    
    .blog-title {
        font-size: 1.6rem;
    }
    
    .blog-subtitle {
        font-size: 0.9rem;
    }
    
    .blog-container {
        padding: 24px 16px;
    }
    
    .blog-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .blog-controls {
        max-width: none;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .filter-section {
        margin-bottom: 16px;
    }
    
    .filter-section-title {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .filter-tags {
        gap: 6px;
    }
    
    .filter-tag {
        font-size: 12px;
        padding: 4px 10px;
    }
}
