/* =========================
   Custom Properties
   ========================= */
:root {
    --header-bg: url('https://sadhost.neocities.org/images/layouts/wp.jpeg');
    --body-bg: url('https://sadhost.neocities.org/images/tiles/purplesky.gif');
    --primary-color: #71a69e;
    --secondary-color: #78aba3;
    --content-bg: #43256E;
    --body-bg-color: #16162e;
    --footer-bg: #13092d;
    --box-bg: #16162e;
    --box-border: #71a69e;
    --font-main: 'SourGummy-Light', sans-serif;
    --font-bold: 'SourGummy-Medium', sans-serif;
    --font-mono: monospace;
    --max-width: 1000px;
    --sidebar-width: 200px;
    --footer-height: 40px;
    --border-radius: 6px;
    --spacing: 10px;
}

/* =========================
   Font Faces
   ========================= */
@font-face {
    font-family: 'SourGummy-Light';
    font-weight: 400;
    src: url(/fonts/SourGummy-Light.woff2) format("woff2"),
         url(/fonts/SourGummy-Light.ttf) format("truetype");
    font-display: swap;
}
@font-face {
    font-family: 'SourGummy-Medium';
    font-weight: 700;
    src: url(/fonts/SourGummy-Medium.woff2) format("woff2"),
         url(/fonts/SourGummy-Medium.ttf) format("truetype");
    font-display: swap;
}

/* =========================
   Base Styles
   ========================= */
* {
    box-sizing: border-box;
}
body {
    background: url(/img/clouds3.png) var(--body-bg-color);
    color: #fff;
    font-family: var(--font-main);
    font-size: 20px;
    line-height: 1.5;
    margin: 0;
    position: relative;
}
a {
    color: var(--primary-color);
    text-decoration: none;
}
a:visited {
    color: var(--primary-color);
}
:focus {
    outline: 4px dashed #fff;
}

/* =========================
   Typography
   ========================= */
h1, h2, h3 {
    color: var(--primary-color);
    margin-top: 0;
}
h1 {
    font-size: 2rem;
}
strong {
    color: var(--secondary-color);
}

/* =========================
   Layout Containers
   ========================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    width: 100%;
}
@media only screen and (max-width: 800px) {
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
        width: 100%;
    }
}

/* =========================
   Header
   ========================= */
.site-header {
    font-size: 4rem;
    line-height: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing);
    width: 100%;
}
@media only screen and (max-width: 800px) {
    .site-header {
        font-size: 2.5rem;
        margin-bottom: var(--spacing);
        width: 100%;
    }
}
.site-header__title {
    font-size: 1em;
    padding: 0;
    position: relative;
}
.site-header__title::after {
    content: "";
    display: block;
    width: 100%;
    height: 20px;
    margin-top: 0.2em;
    background: url(/img/star.svg) repeat-x;
    background-size: 20px 20px;
}
@media only screen and (max-width: 800px) {
    .site-header__title::after {
        height: 16px;
        background-size: 16px 16px;
        margin-top: 0.2em;
    }
}

/* =========================
   Main Flex Layout
   ========================= */
.layout-flex {
    display: flex;
    gap: var(--spacing);
}
@media only screen and (max-width: 800px) {
    .layout-flex {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        width: 100%;
        align-items: center;
    }
}

/* =========================
   Sidebar Styles
   ========================= */
.sidebar {
    background-color: rgba(67, 37, 110, 0.1);
    width: var(--sidebar-width);
    padding: var(--spacing);
    font-size: 0.95em;
}
.sidebar--left {
    order: 1;
    margin-right: var(--spacing);
}
.sidebar--right {
    order: 3;
    margin-left: var(--spacing);
}
@media only screen and (max-width: 800px) {
    .sidebar {
        width: 100%;
        margin: 0;
        padding: var(--spacing) var(--spacing);
    }
    .sidebar--left,
    .sidebar--right {
        order: unset;
        margin: 0;
    }
}

/* =========================
   Main Content
   ========================= */
.main-content {
    background-color: rgba(67, 37, 110, 0.1);
    flex: 1;
    padding: var(--spacing);
    order: 2;
    width: 100%;
}
@media only screen and (max-width: 800px) {
    .main-content {
        order: unset;
        width: 100%;
        padding: var(--spacing) var(--spacing);
    }
}

/* =========================
   Navigation
   ========================= */
.nav {
    min-width: 180px;
    align-self: normal;
    text-align: center;
}
@media only screen and (max-width: 800px) {
    .nav {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
}
.nav__categories {
    padding: 0;
    margin: 0;
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
@media only screen and (max-width: 800px) {
    .nav__categories {
        display: block;
        width: 100%;
    }
}
.nav__category {
    margin-bottom: 16px;
    min-width: 180px;
}
.nav__label {
    font-style: italic;
    padding-left: 16px;
}
@media screen and (max-width: 499px) {
    .nav__category:nth-child(even) {
        text-align: right;
    }
    .nav__category:nth-child(even) .nav__list {
        justify-content: right;
    }
    .nav__category:nth-child(even) .nav__label {
        padding: 0 16px 0 0;
    }
    .nav__label {
        padding-left: 16px;
    }
}
.nav__list {
    font-family: var(--font-mono);
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 1.1em;
    line-height: 1;
}
@media screen and (max-width: 499px) {
    .nav__list {
        display: flex;
        flex-wrap: wrap;
    }
}
.nav__item {
    margin: 4px 0;
}
    .nav__block {
    margin: 4px;
    border: 2px solid #232333;
    background-color: #1c1c30;
    border-radius: var(--border-radius);
    display: block;
    color: var(--primary-color);
}
@media screen and (min-width: 500px) {
    .nav__block {
        margin-bottom: 12px;
    }
}
.nav__link {
    color: var(--primary-color);
    padding: 6px;
    display: block;
}

/* Active / current menu item styles */
.nav__item--active .nav__block {
    border-color: var(--primary-color);
    background-color: rgba(113,166,158,0.08);
}
.nav__item--active .nav__link {
    color: var(--secondary-color);
    font-weight: 700;
}

/* =========================
   Mobile Accordion Navigation
   ========================= */
@media only screen and (max-width: 800px) {
    .nav__categories {
        display: block;
        width: 100%;
    }
    .nav__category {
        margin-bottom: 0;
        border-bottom: 1px solid var(--primary-color);
    }
    .nav__label {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 1.2em;
        font-weight: bold;
        padding: var(--spacing) 0;
        background: rgba(67,37,110,0.15);
        cursor: pointer;
        user-select: none;
        transition: background 0.2s;
    }
    .nav__label:hover,
    .nav__label:focus {
        background: rgba(67,37,110,0.25);
    }
    .nav__list {
        display: none;
        width: 100%;
        text-align: center;
        padding-bottom: var(--spacing);
        transition: max-height 0.3s;
    }
    .nav__category.active .nav__list {
        display: block;
    }
    .nav__item {
        margin: 8px 0;
    }
}

/* Remove alternating right alignment for mobile */
@media screen and (max-width: 499px) {
    .nav__category:nth-child(even),
    .nav__category:nth-child(even) .nav__list,
    .nav__category:nth-child(even) .nav__label {
        text-align: center;
        padding: 0;
    }
    .nav__label {
        padding-left: 0;
    }
}

/* =========================
   Boxed Content
   ========================= */
.box {
    background-color: var(--box-bg);
    border: 1px solid var(--box-border);
    border-radius: var(--border-radius);
    padding: var(--spacing);
    margin: var(--spacing) 0;
}

/* =========================
   Footer
   ========================= */
.site-footer {
    background-color: var(--footer-bg);
    width: 100%;
    height: var(--footer-height);
    padding: 5px;
    text-align: center;
    margin-top: var(--spacing);
}

/* =========================
   Utility
   ========================= */
.toptext {
    margin-top: 0;
}
