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

body {
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px;
    color: #334155; 
    line-height: 1.5;
    text-align: center; 
}

/* Links */
a { color: #888888; text-decoration: none; } 
a:hover { text-decoration: underline; color: #333333; } 

/* Sidebar List Styling (Clean Links) */
.side ul { list-style-type: none; padding-left: 0; }
.side ul li {
    margin-bottom: 3px;
}

/* Main Container */
#box {
    max-width: 900px; 
    width: 100%;
    margin: 0 auto;
    text-align: left;
    background-color: #ffffff;
    border-left: 1px solid #dee2e6; 
    border-right: 1px solid #dee2e6;
    opacity: 0; 
    transition: opacity 0.3s ease-in;
    overflow-x: hidden; 
}

/* Header */
#banner {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa; 
}

#banner a {
    color: #212529; 
    font-size: 32px;
    font-weight: normal;
    text-decoration: none;
}

/* MODERN 3-COLUMN LAYOUT */
.layout-three-column {
    display: flex;
    width: 100%;
}

/* Left & Right Sidebars */
#left-sidebar, #right-sidebar {
    width: 185px;
    padding: 15px;
    flex-shrink: 0;
}

/* Main Content Column */
#content {
    flex-grow: 1;
    width: 478px;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    padding: 10px 15px;
}

/* Sidebar Widgets */
.sidetitle {
    margin-top: 3px;
    margin-bottom: 5px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    text-align: center;
    font-size: 10px;
    line-height: 2.0;
    font-weight: normal;
}

.side {
    margin: 3px 0 20px;
    font-size: 10px;
}

/* Profile Specifics */
.profile-img {
    width: 100px;
    height: auto;
    border: 4px solid white;
    outline: 1px solid #dee2e6;
    margin-bottom: 10px;
    display: block;
}

.profile-info p {
    margin: 2px 0;
    font-weight: normal; 
}

.fa-github {
    margin: 0 2px;
    vertical-align: middle;
}

/* Search Bar Formatting */
.side input[type="text"] {
    width: 100%;
    margin-bottom: 5px;
    padding: 3px;
    border: 1px solid #ced4da;
}

.side button {
    width: 100%;
    padding: 3px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    cursor: pointer;
}

.side button:hover {
    background-color: #e9ecef;
}

/* Blog Post Elements */
#content article {
    margin: 0 5px 15px;
    background: #ffffff;
}

.date-bar {
    background-color: #e9ecef; 
    color: #495057; 
    font-weight: bold;
    font-size: 12px;
    padding: 3px 8px;
    margin-bottom: 15px;
}

#content h2 {
    margin: 0 0 15px 0;
    padding-left: 0;
    border-left: none; 
    font-size: 20px; 
    line-height: 1.3;
}

.entry-content {
    margin-bottom: 15px;
    padding: 0 10px; 
    word-wrap: break-word;
}

.entry-footer {
    text-align: right;
    color: #6c757d;
    font-size: 11px;
}

/* Footer */
footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #6c757d; 
    text-align: center;
    padding: 15px 0;
    font-size: 12px;
}

/* Markdown Code Block Styling */
.entry-content pre {
    background-color: #f1f5f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    margin: 10px 0;
}

.entry-content code {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #0f172a;
}

/* --- MARKDOWN STYLING FIXES --- */
.entry-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.entry-content h2 {
    font-size: 18px !important; 
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #e2e8f0; 
    padding-bottom: 5px;
    font-weight: bold;
}

.entry-content hr {
    border: 0;
    border-top: 2px dashed #cbd5e1;
    margin: 30px 0; 
}

.entry-content ul, 
.entry-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.entry-content li {
    margin-bottom: 5px;
}

#calendar-container table td {
    white-space: nowrap;
}


/* mobile ui crash fix */

@media screen and (max-width: 768px) {
    .layout-three-column {
        flex-direction: row; 
        flex-wrap: wrap;     
    }

    #left-sidebar { 
        order: 1; 
        width: 50%; 
        border: none; 
        border-right: 1px solid #dee2e6; 
        padding: 10px;
    }  

    #right-sidebar { 
        order: 2; 
        width: 50%; 
        border: none; 
        padding: 10px;
    } 

    #content { 
        order: 3; 
        width: 100%; 
        border: none; 
        border-top: 2px solid #dee2e6; /* Divider line above the blog posts */
        padding: 20px 10px;
    }

    .profile-img {
        margin: 0 auto 10px auto; 
    }
    .profile-info {
        text-align: center;
    }

    #banner a {
        font-size: 26px; 
    }
}