:root {
    --header-h: 11vh;
    
    --brand-1: #530620;
    --brand-2: #a42134;
    --brand-3: #ec272d;
    --brand-4: #f06964;

    --ink: #111;
    --paper: #fff;

    --accent-1: #2c3e50;
    --accent-1-hover: #1a252f;
}

@font-face {
    font-family: "Roboto";
    src: url("../assets/fonts/Roboto-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("../assets/fonts/Roboto-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("../assets/fonts/Roboto-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

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

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
    color: var(--paper);
    height: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.4;
}

/* Main section */
.bg-gradient {
    color: var(--paper);
    background: linear-gradient(to right, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-4));
}

.page {
    width: 100%;
    min-height: calc(100svh - var(--header-h));
    /* Full height minus the header */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
}

.title {
    font-size: clamp(2rem, 4vw, 4rem);
    margin: 0.5em 0 0.5em;
    color: var(--paper);
}

.section {
    width: min(1600px, 95vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
    padding-bottom: 24px;
    flex: 1;
}

.section--narrow {
    width: min(1000px, 95vw);
}

.panel {
    background: var(--paper);
    color: var(--ink);
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border-radius: 10px;
    box-sizing: border-box;
    overflow: auto;
    min-height: 0;
}

/* Decorative divider */
.divider {
    border: none;
    height: 2px;
    background-color: var(--paper);
    margin: 25px 0px;
    width: 100%;
}

/* ====== Shared sidebar layout ====== */
.section.has-sidebar-left:not(.has-sidebar-right) {
    grid-template-columns: minmax(220px, 280px) 1fr; /* left | content */
}

.section.has-sidebar-right:not(.has-sidebar-left) {
    grid-template-columns: 1fr minmax(220px, 280px); /* content | right */
}

.section.has-sidebar-left.has-sidebar-right {
    grid-template-columns: minmax(220px, 280px) 1fr minmax(220px, 280px); /* left | content | right */
}

.section .sidebar,
.section .panel {
    width: auto !important;
    max-width: none;

    height: 100%;
    align-self: stretch;
}

/* Generic sidebar */
.sidebar {
    background-color: var(--accent-1);
    color: var(--paper);
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sidebar h3 {
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin-bottom: 15px;
}

.sidebar a {
    color: var(--paper);
    text-decoration: none;
}

.sidebar a:hover {
    text-decoration: underline;
}

/* Archive list styling */
.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-list li {
    margin-bottom: 12px;
}

.archive-list a {
    color: var(--paper);
    text-decoration: none;
}

.archive-list a:hover {
    text-decoration: underline;
}

.archive-empty {
    margin: 0;
    opacity: 0.85;
}

/* Form styling */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    padding: 10px;
    background-color: var(--accent-1);
    color: var(--paper);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: var(--accent-1-hover);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto;
    }
}

.is-hidden {
    display: none;
}