:root {
    --radius: 10px;
}

/* NEO-BRUTALIST BLOG PAGE - MATCHING PVIDEO */

.blog-body .content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 20px 40px 20px;
}

.blog-layout {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    align-items: flex-start;
    position: relative;
}

/* SIDEBAR - TRULY FIXED POSITION */
.blog-sidebar {
    flex: 0 0 400px;
    width: 400px;
    background: var(--white);
    border: var(--border);
    padding: 25px;
    position: fixed;
    top: 120px;
    left: 40px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 100;
    border-radius: var(--radius);
}

/* Adjust main content to not be covered by fixed sidebar */
#blog-main-content {
    flex: 1;
    min-width: 0;
    margin-left: 440px;
}

.sidebar-title { 
    color: var(--fg); 
    font-size: 1.1rem; 
    margin-bottom: 20px; 
    border-bottom: var(--border); 
    padding-bottom: 10px; 
    text-transform: uppercase; 
    font-weight: 900; 
}

/* FOLDER LIST - MATCHING PVIDEO */
.blog-sidebar ul { 
    list-style: none; 
    padding: 0; 
    margin: 0;
}

.blog-sidebar ul.nested {
    display: none;
    margin-left: 20px;
    border-left: 2px dashed var(--fg);
    padding-left: 10px;
}

.blog-sidebar ul.nested.expanded {
    display: block;
}

.blog-sidebar .folder-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    background: var(--cream);
    border: var(--border);
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: 2px 2px 0px 0px var(--fg);
    transition: all 0.2s;
    border-radius: var(--radius);
    text-transform: uppercase;
}

.blog-sidebar .folder-label:hover {
    background: var(--primary);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px 0px var(--fg);
}

.blog-sidebar .folder-label::before {
    content: "\f07b"; /* fa-folder */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
}

.blog-sidebar .folder.expanded > .folder-label::before {
    content: "\f07c"; /* fa-folder-open */
}

.blog-sidebar .file {
    margin: 5px 0;
}

.blog-sidebar .file a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.blog-sidebar .file a::before {
    content: "\f15c"; /* fa-file-lines */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--primary);
}

.blog-sidebar .file a:hover {
    background: var(--white);
    border-color: var(--fg);
    box-shadow: 2px 2px 0px 0px var(--fg);
    transform: translate(-1px, -1px);
    border-radius: var(--radius);
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border: var(--border);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius);
}

.blog-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px 0px var(--fg);
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    line-height: 1.1;
}

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.modal-content {
    background: var(--bg);
    border: var(--border);
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 20px 20px 0px 0px var(--fg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: var(--white);
    border-bottom: var(--border);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}

#modal-close {
    background: var(--primary);
    color: white;
    border: var(--border);
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 4px 4px 0px 0px var(--fg);
    transition: all 0.1s;
}

#modal-close:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--fg);
}

#modal-close:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px var(--fg);
}

/* RESPONSIVE MANAGEMENT */
@media (max-width: 1200px) {
    .blog-sidebar {
        left: 20px;
    }
}

@media (max-width: 1000px) {
    .blog-layout { flex-direction: column; }
    .blog-sidebar { 
        position: relative; 
        top: 0; 
        left: 0;
        width: 100%; 
        flex: none;
        max-height: 400px;
        margin-bottom: 30px;
    }
    #blog-main-content {
        margin-left: 0;
    }
}

/* Markdown Styling */
.markdown-body {
    font-family: var(--font-main);
    line-height: 1.7;
    color: var(--fg);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    text-transform: uppercase;
    font-weight: 900;
    line-height: 1.2;
}

.markdown-body h1 { font-size: 2.5rem; border-bottom: 6px solid var(--fg); padding-bottom: 10px; }
.markdown-body h2 { font-size: 1.8rem; border-bottom: 4px solid var(--fg); padding-bottom: 5px; }

.markdown-body hr {
    border: none;
    height: 4px;
    background: var(--fg);
    margin: 40px 0;
}

.markdown-body p {
    margin-bottom: 1.5em;
    font-size: 1.1rem;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5em;
    padding-left: 30px;
}

.markdown-body li {
    margin-bottom: 0.5em;
    font-weight: 700;
}

.markdown-body code {
    background: var(--cream);
    padding: 2px 6px;
    font-family: var(--font-mono);
    border: 2px solid var(--fg);
    font-weight: 700;
    border-radius: 4px;
}

/* Reset inline styles for code tags inside pre blocks */
.markdown-body pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--white);
    font-weight: 400;
}

.markdown-body pre {
    background: var(--fg);
    color: var(--white);
    padding: 25px;
    overflow-x: auto;
    border: var(--border);
    border-radius: var(--radius);
    margin: 25px 0;
    box-shadow: 8px 8px 0px 0px var(--primary);
    position: relative;
}

.markdown-body img {
    max-width: 100%;
    border: var(--border);
    margin: 20px 0;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
