:root {
    --text-main: #cfd9e8;
    --text-muted: #798ca8;
    --accent: #bb8855;
    --accent-hover: #eebb77;
    --interactive: #555555;
    --interactive-hover: #666666;

    --bg-body: #333333;
    --bg-card: #444444;
    --border-color: #111111;

    --shadow: black;
    --transition: 0.3s ease-in-out;
}

:root[data-theme="light"] {
    --text-main: #52331a;
    --text-muted: #c18b61;
    --accent: #648ec9;
    --accent-hover: #eebb77;
    --interactive: #cccccc;
    --interactive-hover: #bbbbbb;

    --bg-body: #ffffff;
    --bg-card: #eeeeee;
    --border-color: #dddddd;

    --shadow: grey;
}

@font-face {
    font-family: "Bitcount Prop Single";
    src: url('/static/fonts/BitcountPropSingle.ttf') format('truetype');
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "CRSV" 0.5,
        "ELSH" 0,
        "ELXP" 0;
    font-display: swap;
}

/*  _____ _                           _        */
/* | ____| | ___ _ __ ___   ___ _ __ | |_ ___  */
/* |  _| | |/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| */
/* | |___| |  __/ | | | | |  __/ | | | |_\__ \ */
/* |_____|_|\___|_| |_| |_|\___|_| |_|\__|___/ */
/* Elements */

* {
    transition: var(--transition);
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: "Bitcount Prop Single", system-ui;
    color: var(--accent);
    margin: 1rem 0 0 0;
}

h1 { font-size: clamp(1rem, 5vw + 0.4rem, 2.5rem); }
h2 { font-size: clamp(0.8rem, 4.7vw + 0rem, 2rem); }
h3 { font-size: clamp(1rem, 3vw + 0.4rem, 1.5rem); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/*   ____                                             _        */
/*  / ___|___  _ __ ___  _ __   ___  _ __   ___ _ __ | |_ ___  */
/* | |   / _ \| '_ ` _ \| '_ \ / _ \| '_ \ / _ \ '_ \| __/ __| */
/* | |__| (_) | | | | | | |_) | (_) | | | |  __/ | | | |_\__ \ */
/*  \____\___/|_| |_| |_| .__/ \___/|_| |_|\___|_| |_|\__|___/ */
/*                      |_|                                    */
/* Components */

.cls-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--interactive);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
}

.cls-button:hover {
    background: var(--interactive-hover);
}

.image-with-description {
    display: flex;
    flex-direction: column;
    margin: 1rem 0 2rem 0;
}

.image-with-description img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

.image-with-description p {
    text-align: right;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-style: italic;
}

.download-container {
    display: grid;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.download-header {
    grid-column: 1 / span 2;
    grid-row: 1;
    text-align: center;
    padding: 0 10px;
    margin: 0;
    background-color: var(--bg-card);
}

.download-container {
    color: var(--text-muted);
}

/*  _____  __  __           _        */
/* | ____|/ _|/ _| ___  ___| |_ ___  */
/* |  _| | |_| |_ / _ \/ __| __/ __| */
/* | |___|  _|  _|  __/ (__| |_\__ \ */
/* |_____|_| |_|  \___|\___|\__|___/ */
/* Effects */

.fade-in {
  animation: 
    fade-in 1s ease-in-out
}

@keyframes fade-in {
  from { opacity: 0 }
  to { opacity: 100% }
}

/*  ____                   _                            _     */
/* | __ )  __ _ ___  ___  | |    __ _ _   _  ___  _   _| |_   */
/* |  _ \ / _` / __|/ _ \ | |   / _` | | | |/ _ \| | | | __|  */
/* | |_) | (_| \__ \  __/ | |__| (_| | |_| | (_) | |_| | |_   */
/* |____/ \__,_|___/\___| |_____\__,_|\__, |\___/ \__,_|\__|  */
/*                                    |___/                   */
/* BaseLayout */

#sidebar {
    z-index: 50;
    position: fixed;
    display: flex;
    flex-direction: column;
    width: 260px;
    height: 100vh;
    border-right: 1px solid var(--border-color);
    background: rgb(from var(--bg-card) r g b / calc(alpha * .8));
    backdrop-filter: blur(5px);
    filter: drop-shadow(0 0 10px black);
    transform: translateX(-110%);
}

#sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close-btn:hover {
    background: var(--interactive-hover);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.nav-link {
    display: block;
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: var(--interactive-hover);
}

.nav-link.active {
    background-color: var(--interactive-hover);
    color: var(--accent);
}

.nav-divider {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer-text {
    margin: 0 0 0.5rem 0;
    text-align: center;
    color: var(--text-muted);
}

.sidebar-footer-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

/* HEADER */
header {
    position: sticky;
    top: 0px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-caption {
    margin: 0;
    padding: 7px 0 0 0;
}

.avatar {
    width: 2rem;
    height: 2rem;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .avatar {
    display: none;
    }
}

/* MAIN CONTENT */
main {
    flex: auto;
    padding: 2rem 2px;
}

article {
    max-width: 800px;
    margin: 0 auto;
}

/* FOOTER */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 0.075rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* MOON SUN ANIMATION */
.moon, .sun {
    opacity: 0;
}

.moon,
#theme-toggle .moon {
  opacity: 0;
}

.sun,
#theme-toggle .sun {
  opacity: 1;
  /* fill: #f1c40f; */
    fill: var(--accent);
}

[data-theme="dark"] .sun,
[data-theme="dark"] #theme-toggle .sun {
  opacity: 0;
}

[data-theme="dark"] .moon,
[data-theme="dark"] #theme-toggle .moon {
  opacity: 1;
  /* fill: #f1c40f; */
    fill: var(--accent);
}

