body {
    margin: 0;
    padding: 0 0 10px 0;
    background: #030508 url(bg.jpg) no-repeat top left scroll;
    color: #E6D7B3;
    font-family: Georgia, serif;
    font-size: 95%;
}

a,
a:visited {
    color: #CC9966;
    text-decoration: none;
}

a:hover,
a:active {
    color: #C7A759;
    text-decoration: underline;
}

#container {
    background: transparent;
    margin: 0 auto;
    padding: 0 0 10px 0 !important;
    width: 980px;
}

#banner {
    margin: 10px auto;
    width: 497px;
    height: 50px;
}

#banner img {
    display: none;
}

/* Hide default netwin banner */
#title {
    text-align: center;
    width: 497px;
    height: 50px;
    color: #C7A759;
    background: transparent url(divider1.jpg) center bottom no-repeat;
    font-size: 1.9em !important;
    font-weight: bold;
}

#description {
    text-align: center;
    font-style: italic;
    margin-bottom: 20px;
}

#content {
    background: transparent;
    margin: 0 auto;
    padding: 0 0 10px 0 !important;
    width: 980px;
}

#posts {
    background: transparent url('divider1.jpg') center bottom no-repeat;
    float: left;
    margin: 0 0 10px 121px;
    padding: 0 8px 10px 7px;
    width: 497px;
}

.date-header {
    font-size: 1.3em;
    color: #C7A759;
    border-bottom: 1px solid #334;
    margin-top: 20px;
    padding-bottom: 5px;
}

.post {
    padding-bottom: 10px;
    margin: 0 0 20px 0;
}

.post-title {
    font-size: 1.4em;
    color: #C7A759;
    margin-bottom: 5px;
}

.post-body p {
    padding-bottom: 10px;
    margin: 0 0 10px 0;
    color: #E6D7B3;
    line-height: 1.5;
}

.post-footer {
    font-size: 0.85em;
    color: #9A844B;
    margin-top: 10px;
    font-style: italic;
}

.post img {
    margin: 0 0 5px 0;
    padding: 4px;
    border: 1px solid #C7A759;
}

img.centered {
    display: block;
    margin: 0 auto 5px auto;
    border: 1px solid #C7A759;
    padding: 2px;
}

img.alignright {
    float: right;
    display: inline;
    border: 1px solid #C7A759;
    margin: 5px 0 0 7px;
    padding: 4px;
}

img.alignleft {
    float: left;
    display: inline;
    border: 1px solid #C7A759;
    margin: 5px 7px 0 0;
    padding: 4px;
}

.comments {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #554;
}

.comment-body {
    margin-bottom: 10px;
    background-color: #0c1016;
    padding: 8px;
    border-left: 3px solid #C7A759;
}

.comment-body p {
    margin: 0;
    font-size: 0.9em;
}

#sidebar {
    float: right;
    width: 192px;
    color: #E6D7B3;
    background: transparent url(divider2.jpg) center bottom no-repeat;
    margin: 0;
    padding: 0 0 9px 0;
    height: auto;
    margin-right: 120px;
}

#sidebar p {
    padding: 10px;
    margin: 0;
    font-size: 0.85em !important;
}

.sidebar-title {
    background: transparent url(divider2.jpg) center top no-repeat;
    font-size: 1.2em;
    padding: 18px 0 0 0;
    margin: 10px 0 0 0;
    text-align: center;
    color: #C7A759;
}

#archives-container {
    width: 192px;
    padding: 0;
    margin: 0 auto;
    font-family: Georgia, serif;
    background: transparent;
    position: absolute;
    top: 500px;
    left: 10px;
    font-size: 0.7em !important;
}

#archives-container div#archive {
    border-bottom: 1px solid #C7A759;
    margin: 0;
}

#archives-container div#archive a {
    display: block;
    padding: 5px 5px 5px 0.5em;
    border-left: 10px solid #C7A759;
    border-right: 10px solid #D6BF85;
    background-color: #030508;
    color: #E6D7B3;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

#archives-container div#archive a:hover {
    border-left: 10px solid #D6BF85;
    border-right: 10px solid #C7A759;
    background-color: #E6D7B3;
    color: #030508;
}


.recent-posts ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85em !important;
}

.recent-posts li {
    border-bottom: 1px dotted #C7A759;
    margin: 0;
    padding: 5px 0;
}

.recent-posts li a {
    color: #CC9966;
}

.recent-posts li a:hover {
    color: #E6D7B3;
}

#profile-container dl {
    margin: 10px 0;
    padding: 0;
}

#profile-container dt {
    text-align: center;
    margin-bottom: 10px;
}

#profile-container img {
    border: 2px solid #C7A759;
}

#profile-container dd {
    margin: 0 0 5px 0;
    padding: 0 10px;
    font-size: 0.9em;
}

#footer {
    clear: both;
    text-align: center;
    font-size: 0.8em;
    padding: 20px 0;
    border-top: 1px solid #334;
    margin-top: 20px;
}

#footer hr {
    display: none;
}

/* ── 88×31 badge wall ─────────────────────────────── */
.badges-section {
    margin-top: 0;
    padding-bottom: 9px;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 6px 8px 4px 8px;
    background: transparent;
    justify-content: flex-start;
}

.badges-grid a {
    display: inline-block;
    line-height: 0;
    border: none;
    text-decoration: none;
    /* subtle golden glow on hover, very 2006 */
    filter: brightness(0.92);
    transition: filter 0.1s, box-shadow 0.1s;
}

.badges-grid a:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 4px #C7A759;
    text-decoration: none;
}

.badges-grid img {
    display: block;
    width: 88px;
    height: 31px;
    border: 1px solid #554433;
    image-rendering: pixelated;
    /* keep that crispy pixel-art look */
    padding: 0;
    margin: 0;
}

/* ── Mobile Responsive Layout ─────────────────────────────── */
@media screen and (max-width: 768px) {

    #container,
    #content {
        width: 100%;
        padding: 0 !important;
    }

    #banner,
    #title {
        width: 100%;
        background-size: contain;
    }

    #content {
        display: flex;
        flex-direction: column;
    }

    #banner {
        order: 1;
    }

    #description {
        order: 2;
    }

    #sidebar {
        display: contents;
        /* Allows sidebar children to participate in #content flexbox */
    }

    #related-container {
        order: 3;
        margin: 0 15px;
    }

    #profile-container {
        order: 4;
        margin: 0 15px;
    }

    .badges-section {
        order: 5;
        margin: 0 15px;
    }

    #posts {
        order: 6;
        float: none;
        width: auto;
        margin: 20px 15px;
        padding: 0 0 15px 0;
        background-position: center bottom;
    }

    .recent-posts {
        order: 7;
        margin: 10px 15px;
    }

    /* Post images responsive */
    .post img {
        max-width: calc(100% - 10px);
        height: auto;
    }

    /* Make archives flow normally instead of absolute positioning overlapping content */
    #archives-container {
        position: static;
        width: auto;
        margin: 20px 15px;
        font-size: 0.85em !important;
    }

    .badges-section {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .badges-section h2.sidebar-title {
        width: 100%;
        margin-bottom: 5px;
    }
}
