:root {
    --bg: #e1d9d9;
    --page-bg: var(--bg);
    --banner-height: 500px;
    --branding-color: #e1d9d9;
    --text: #3b2f2f;
    --ink: #2e0516;
    --link: #9c3030;
    --accent: #d1417c;
    --card: #1e1e1e;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    font-size: 20px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--link);
    text-decoration: none;
    font-weight: 700;
    transition: .3s;
}
a:hover {
    color: var(--accent);
    text-decoration: underline;
}
a:focus {
    outline: 2px solid var(--ink);
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3vw;
}

#main-content {
    padding: 20px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.primary-content {
    grid-column: 1;
    padding: 20px;
    border-radius: 8px;
}

.sidebar {
    grid-column: 2;
}
.sidebar * {
    max-width: 100%;
}
.sidebar img {
    height: auto;
}

h1 {
    font-size: 2.2rem;
    margin: 1em 0 0.5em;
    line-height: 1.2;
    font-weight: 700;
    color: var(--ink);
}
h2 {
    font-size: 1.8rem;
    margin: 1em 0 0.5em;
    line-height: 1.3;
    font-weight: 600;
    color: var(--ink);
}
h3 {
    font-size: 1.5rem;
    margin: 1em 0 0.5em;
    line-height: 1.3;
    font-weight: 600;
    color: var(--ink);
}
h4 {
    font-size: 1.3rem;
    margin: 1em 0 0.5em;
    font-weight: 600;
    color: var(--ink);
}
h5 {
    font-size: 1.1rem;
    margin: 1em 0 0.5em;
    font-weight: 500;
    color: var(--ink);
}
h6 {
    font-size: 1rem;
    margin: 1em 0 0.5em;
    font-weight: 500;
    color: var(--ink);
}

.primary-content h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}
article {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg);
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.pagination a,
.pagination span {
    padding: 5px 10px;
    background: var(--card);
    color: var(--text);
    border-radius: 3px;
    font-weight: 700;
    transition: .3s;
}
.pagination a:hover {
    background: var(--ink);
    color: var(--bg);
}
.pagination .current {
    background: #3e3d3d;
}

body.archive .archive-header {
    background: var(--bg);
    padding: 25px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    flex-direction: column;
    box-sizing: border-box;
}
body.archive .archive-header a {
    color: var(--text);
    text-decoration: underline;
}

.page-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 40px 20px;
}
.page-404-title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--accent);
    margin: 0 0 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    animation: pulse404 2.5s infinite;
}
@keyframes pulse404 {
    0%, 100% {
        text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 4px 4px 16px rgba(0,0,0,0.4);
        transform: scale(1.05);
    }
}
.page-404-message {
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 30px;
}
.page-404-button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}
.page-404-button:hover {
    background: var(--ink);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .content-wrapper {
        display: block;
        width: 100%;
        padding: 0 10px;
    }
    .primary-content {
        width: 100%;
        padding: 15px 0;
    }
    .sidebar {
        width: 100%;
        margin-top: 20px;
    }
    .primary-content h1 {
        display: block;
        text-align: center;
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
