.gavide--nav-title {
    display: none;
}

/* root */
.gavide--root-main {
    margin: auto;
    padding: 0;
    height: 100%;
    width: 100%;
    margin-top: 3rem;
    min-height: 70vh;
    max-width: 95%;
}

@media (min-width: 991.98px) {
    .gavide--root-main {
        width: 70%;
    }
}

.gavide--root-section {
    min-height: 100vh;
}

.gavide--root-bg-1 {
    background: url("/images/circle_up_left.svg");
    background-repeat: no-repeat;
    -webkit-background-position: center;
    background-position: center;
    -webkit-background-size: cover;
    background-size: cover;
    position: fixed;
    z-index: -999;
    left: 0;
    top: 0;
    height: 100%;
    width: calc(100vw / 2);
}

.gavide--root-bg-2 {
    background: url("/images/circle_bottom_right.svg");
    background-repeat: no-repeat;
    -webkit-background-position: center;
    background-position: center;
    -webkit-background-size: cover;
    background-size: cover;
    position: fixed;
    z-index: -999;
    right: 0;
    bottom: 0;
    height: 100%;
    width: calc(100vw / 2);
}

:root {
    --latex-color: #000000;
    --accent-color: #454138;
    --logo-color: var(--accent-color);

    /* Nier Automata Palette (approximations) */
    --nier-bg-main: #d1cdb7; /* Main background */
    --nier-bg-secondary: #ccc8b1; /* Lighter background elements */
    --nier-bg-tertiary: #bab5a1; /* Darker background elements / shadows */
    --nier-text-main: #454138; /* Main text color */
    --nier-text-secondary: #5a564d; /* Secondary text / muted */
    --nier-accent-primary: #706b5e; /* A primary accent */
    --nier-accent-secondary: #8c8575; /* A secondary accent */

    /* RGB versions for alpha - these are placeholders, adjust to actual Nier colors */
    --nier-accent-primary-rgb: 112, 107, 94;
    --nier-accent-secondary-rgb: 140, 133, 117;
    --nier-text-secondary-rgb: 90, 86, 77;

    /* Generic Semantic Variables */
    --font-family-sans-serif: "PP Object Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --text-color: var(--nier-text-main);
    --text-color-secondary: var(--nier-text-secondary);
    --text-color-muted: var(--nier-text-secondary);
    --text-color-on-accent: var(--nier-bg-main);

    --background-primary: var(--nier-bg-main);
    --background-secondary: var(--nier-bg-secondary);
    --background-tertiary: var(--nier-bg-tertiary);

    --border-color: var(--nier-text-secondary);
    --border-color-soft: rgba(var(--nier-text-secondary-rgb), 0.3);
    --border-color-muted: var(--nier-text-secondary);
    --border-color-secondary: var(--nier-text-secondary);

    --shadow-color: rgba(0, 0, 0, 0.1); /* Generic shadow, can be themed */

    --heading-color: var(--nier-text-main);

    --button-background-primary: var(--nier-accent-primary);
    --button-text-primary: var(--nier-bg-main);
    --button-background-disabled: var(--nier-text-secondary);
    --button-text-disabled: var(--nier-bg-secondary);

    --input-background: var(--nier-bg-secondary);
    --input-text-color: var(--nier-text-main);
    --input-border-color: var(--nier-text-secondary);
    --input-background-disabled: var(--nier-bg-main);
    --input-text-color-disabled: var(--nier-text-secondary);

    --pre-background: var(--nier-bg-secondary);
    --pre-text-color: var(--nier-text-main);

    --accent-color-primary: var(--nier-accent-primary);
    --accent-color-primary-translucent: rgba(var(--nier-accent-primary-rgb), 0.5);
    --accent-color-primary-strong: var(--nier-accent-primary);

    --accent-color-secondary: var(--nier-accent-secondary);

    /* For demo graph - using Nier palette */
    --accent-color-success: #6a8759; /* Placeholder green-ish */
    --accent-color-success-translucent: rgba(106, 135, 89, 0.5);
    --accent-color-warning: #b08a51; /* Placeholder orange-ish */
    --accent-color-warning-translucent: rgba(176, 138, 81, 0.5);
    --accent-color-danger: #a35b5b; /* Placeholder red-ish */
    --accent-color-danger-translucent: rgba(163, 91, 91, 0.5);
    --accent-color-danger-strong: #a35b5b;
    --accent-color-info: var(--nier-accent-primary); 
    --accent-color-info-strong: var(--nier-accent-primary);

    --canvas-background: var(--nier-bg-secondary);

    letter-spacing: 0.03rem;
    background-color: var(--background-primary);
    color: var(--text-color);
    background-size: 0.3rem 0.3rem;
    background-image: linear-gradient(to right,
            var(--nier-bg-secondary) 1px,
            transparent 1px),
        linear-gradient(to bottom, var(--nier-bg-secondary) 1px, transparent 1px);
    transition: 1s ease-out;

}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    background-color: #d1cdb7;
}

::-webkit-scrollbar-track {
    background-color: #d1cdb7;
}

::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-corner {
    background-color: #d1cdb7;
}


/* ------------------ */
/*  page post (not blog) */

@media (min-width: 991.98px) {
    .gavide--pagepost {
        max-width: 70%;
    }
}

.gavide--pagepost {
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-wrap: wrap;
}

.gavide--pagepost h1 {
    font-size: 2rem;
    font-weight: normal;
    letter-spacing: 0.5rem;
    text-shadow: 0.3rem 0.3rem 0 #bab5a1;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.gavide--pagepost h2 {
    font-size: 1.5rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    letter-spacing: 0.25rem;
    padding: 0.1rem 1rem;
    margin: 1rem 0;
}

.gavide--pagepost h3 {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.15rem;
    padding-left: 0.5rem;
    margin: 1.25rem 0px;
}

.gavide--pagepost h4 {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.15rem;
    padding-left: 0.5rem;
    margin: 1.25rem 0px;
}

.gavide--pagepost h5 {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.15rem;
    padding-left: 0.5rem;
    margin: 1.25rem 0px;
}

.gavide--pagepost a, .gavide--blog-article ol li a {
    cursor: pointer;
    line-height: 1.2;
    transition: 0.25s ease-out;
}

.gavide--pagepost a {
    text-decoration: underline;
}

.gavide--pagepost p {
    font-size: 1.1rem;
    margin-top: 1rem;
    line-height: 1.2;
}

.gavide--pagepost hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border-top-width: 1px;
    margin: 0;
    clear: both;
    color: #454138;
    border-color: #454138;
}

.gavide--pagepost ul {
    list-style-type: disc;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.gavide--pagepost blockquote {
    position: relative;
    margin: 1rem 0px;
    padding: 0 1.5rem;
    box-sizing: border-box;
    font-style: italic;
}

.gavide--pagepost blockquote cite {
    display: block;
    margin-top: 0.5rem;
    text-align: right;
    font-style: normal;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

.gavide--pagepost blockquote cite::before {
    content: "— ";
}

.gavide--pagepost blockquote::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    height: 100%;
    width: 0.3rem;
    padding: 0.15rem;
    border-style: solid;
    border-color: rgb(186, 181, 161);
    border-image: none;
    border-width: 0px 0.2rem 0px 0.6rem;
}

.gavide--url-path {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.gavide--url-path li.bef::after {
    content: ">";
    margin: 0 0.5rem;
}

/* ------------------ */
/*  blog post */

.gavide--sidebar {
    display: none;
}

@media (min-width: 991.98px) {
    .gavide--sidebar {
        display: block;
    }

    .gavide--blog-article.sidebar-expanded {
        width: 75%;
    }
}

.gavide--blog-article {
    max-width: 100%;
}

.gavide--blog-article > ol {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.gavide--blog-article > ol li.bef::after {
    content: ">";
    margin: 0 0.5rem;
}

.gavide--blog-article h1 {
    font-size: 2rem;
    font-weight: normal;
    letter-spacing: 0.5rem;
    text-shadow: 0.3rem 0.3rem 0 #bab5a1;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.gavide--blog-article hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border-top-width: 1px;
    margin: 0;
    clear: both;
    color: #454138;
    border-color: #454138;
}

.gavide--blog-section {
    display: flex;
}

.gavide--sidebar {
    padding: 1rem 0 0 1rem;
    width: 25%;
}

.gavide--blog-article > figure {
    margin-top: 1rem !important;
}

.gavide--blog-article > figure, .gavide--sidebar > figure {
    display: flex;
    flex-direction: column;
    margin: 0px 0px 1rem;
    background-color: rgb(220, 216, 192);
    padding: 0.5rem;
    animation: 0.5s ease-in-out slidein;
}

.gavide--blog-article > figure > figcaption, .gavide--sidebar > figure > figcaption {
    order: -1;
    margin: -0.5rem -0.5rem 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    background-color: rgb(69, 65, 56);
    color: rgb(186, 181, 161);
}

.gavide--blog-article > figure > ul > li, .gavide--sidebar > figure > ul > li {
    color: rgb(69, 65, 56);
    position: relative;
    display: inline-block;
    margin: 0.25rem;
    padding: 0;
    line-height: 1;
    text-decoration: none;
    font-size: 1rem;
    background-color: rgb(186, 181, 161);
    border-left: 0.25rem solid rgb(69, 65, 56);
}

.gavide--blog-article > figure > ul > li > a, .gavide--sidebar > figure > ul > li > a {
    display: block;
    padding: 0.25rem 0.5rem;
    color: inherit;
    text-decoration: none;
}

.gavide--blog-tof {
    position: relative;
    flex-direction: column;
    margin: 1rem 0px;
    background-color: rgb(220, 216, 192);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: rgb(186, 181, 161) 0.2em 0.2em;
    animation: 0.5s ease-in-out slidein;
}


.gavide--blog-tof::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    width: 0.3rem;
    padding: 0.15rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0px 0.2rem 0px 0.6rem;
}

.gavide--blog-tof > ol {
    list-style-type: decimal;
    margin: 1rem 0px;
    padding-left: 1.5rem;
}

.gavide--blog-tof > ol > li > a {
    text-decoration: underline;
    cursor: pointer;
    line-height: 1.2;
    transition: 0.25s ease-out;
}

.gavide--blog-post h1, .gavide--tag-section h1 {
    font-size: 2rem;
    font-weight: normal;
    letter-spacing: 0.5rem;
    text-shadow: 0.3rem 0.3rem 0 #bab5a1;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.gavide--blog-post h2 {
    font-size: 1.5rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    letter-spacing: 0.25rem;
    padding: 0.1rem 1rem;
    margin: 1rem 0;
}

.gavide--blog-post h3 {
    font-size: 1.25rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    letter-spacing: 0.25rem;
    padding: 0.1rem 1rem;
    margin: 1rem 0;
}

.gavide--blog-post h4 {
    font-size: 1.1rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    letter-spacing: 0.25rem;
    padding: 0.1rem 1rem;
    margin: 1rem 0;
}

.gavide--blog-post h5 {
    font-size: 1rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    letter-spacing: 0.25rem;
    padding: 0.1rem 1rem;
    margin: 1rem 0;
}

.gavide--blog-post a {
    text-decoration: underline;
    cursor: pointer;
    line-height: 1.2;
    transition: 0.25s ease-out;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    text-wrap: wrap;
}

.gavide--blog-post p {
    font-size: 1.1rem;
    margin-top: 1rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    text-wrap: wrap;
}

.gavide--blog-post hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border-top-width: 1px;
    margin: 0;
    clear: both;
    color: #454138;
    border-color: #454138;
}

.gavide--blog-post ul {
    list-style-type: disc;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.gavide--blog-post blockquote {
    position: relative;
    margin: 1rem 0px;
    padding: 0 1.5rem;
    box-sizing: border-box;
    font-style: italic;
}

.gavide--blog-post blockquote cite {
    display: block;
    margin-top: 0.5rem;
    text-align: right;
    font-style: normal;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

.gavide--blog-post blockquote cite::before {
    content: "— ";
}

.gavide--blog-post blockquote::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    height: 100%;
    width: 0.3rem;
    padding: 0.15rem;
    border-style: solid;
    border-color: rgb(186, 181, 161);
    border-image: none;
    border-width: 0px 0.2rem 0px 0.6rem;
}

/* ------------------ */
/* post preview */

.gavide--post-preview {
    text-decoration: none;
}

.gavide--post-preview h2 {
    margin: 0 0;
}

.gavide--post-preview p {
    font-size: 1.1rem;
    margin-top: 1rem;
    line-height: 1.2;
}

.gavide--post-preview ul {
    padding: 0;
    margin: 0;
}

.gavide--post-preview {
    display: block;
    position: relative;
    flex-direction: column;
    margin: 1rem 0px;
    background-color: rgb(220, 216, 192);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: rgb(186, 181, 161) 0.2em 0.2em;
    animation: 0.5s ease-in-out slidein;
}

.gavide--post-preview:hover::before {
    top: -0.2rem;
    bottom: -0.2rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    width: 100%;
}

.gavide--post-preview::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    width: 0.3rem;
    padding: 0.15rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0px 0.2rem 0px 0.6rem;
    transition: 0.25s ease-out;
}

.gavide--post-preview::after {
    content: "";
    transition: 0.5s ease-out;
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    width: 0px;
    background-color: rgb(69, 65, 56);
    z-index: -1;
}

.gavide--post-preview:hover {
    color: rgb(220, 216, 192) !important;
    background-color: transparent;
}

.gavide--post-preview:hover::after {
    width: 100%;
}

.gavide--post-preview h2 {
    font-size: 1.5rem;
    border-style: solid;
    border-color: rgb(69, 65, 56);
    border-image: none;
    border-width: 0.1rem 0px;
    letter-spacing: 0.25rem;
    padding: 0.1rem 0;
    text-decoration: none;
}

.gavide--post-preview p time {
    font-size: 1.1rem;
    margin-top: 1rem;
    line-height: 1.2;
}

.gavide--post-preview ul li {
    color: rgb(69, 65, 56);
    position: relative;
    display: inline-block;
    margin: 0.25rem;
    padding: 0;
    line-height: 1;
    text-decoration: none;
    font-size: 1rem;
    background-color: rgb(186, 181, 161);
    border-left: 0.25rem solid rgb(69, 65, 56);
}

.gavide--post-preview ul li a {
    display: block;
    padding: 0.25rem 0.5rem;
    color: inherit;
    text-decoration: none;
}

/* ------------------ */
/* nav */

.gavide--header {
    border-bottom: 1px solid #454138;
}

.gavide--header menu nav {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 95%;
    padding: 0.15rem 0;
}

@media (min-width: 991.98px) {
    .gavide--header menu nav {
        max-width: 70%;
    }
}

.gavide--header menu {
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
}

.gavide--header menu::after {
    content: "";
    position: absolute;
    width: 100%;
    bottom: -20px;
    height: 20px;
    background-repeat: repeat-x;
    background-image: url("/images/dotsline.svg");
}

/* ------------------ */
/* nav links */

.gavide--navigation-button {
    display: none;
}

.gavide--nav-ul {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 95%;
    padding: 0.15rem 0;
}

.gavide--nav-link-li {
    width: 100%;
    position: relative;
}

.gavide--nav-link span {
    margin: 0.4rem;
    display: flex;
    justify-content: center;
    transition-duration: 0.25s;
    transition-property: color, background-color, box-shadow;
    letter-spacing: 0.03rem;
}

.gavide--nav-link[aria-current="page"]::before {
    width: 100%;
}

.gavide--nav-link[aria-current="page"]::after {
    top: -0.5rem;
    bottom: -0.5rem;
    border-color: #454138;
}

.gavide--nav-link[aria-current="page"] > span {
    color: #dcd8c0;
}

.gavide--nav-link {
    width: 100%;
}
.gavide--nav-link::before {
    content: "";
    position: absolute;
    background-color: #454138;
    width: 0%;
    height: 100%;
    z-index: -1;
    transition: all 0.25s;
}
.gavide--nav-link:hover::before {
    width: 100%;
}

.gavide--nav-link:hover > span {
    color: #dcd8c0;
}

.gavide--nav-link:active::before {
    opacity: 0;
}

.gavide--nav-link:active > span {
    color: #454138;
}

.gavide--nav-link:hover::after {
    top: -0.2rem;
    bottom: -0.2rem;
    border-color: #454138;
}

.gavide--nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;

    top: 0px;
    bottom: 0px;
    border: solid transparent;
    border-top-width: medium;
    border-right-width: medium;
    border-bottom-width: medium;
    border-left-width: medium;
    border-width: 0.1rem 0;
    transition: all 0.25s;
}

/* ------------------ */
/* footer */

.gavide--footer {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid #454138;
}

.gavide--footer section div {
    margin: 0 auto;
    padding: 2rem 1rem 0.85rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.gavide--footer section {
    position: relative;
    box-shadow: none;
}

.gavide--footer-copyright-text, .gavide--footer-links {
    margin: 0;
    text-align: center;
}

.gavide--footer-links a {
    color: var(--nier-text-main);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition:
        background-color 0.16s ease,
        color 0.16s ease;
}

.gavide--footer-links a:hover,
.gavide--footer-links a:focus-visible {
    color: var(--nier-bg-main);
    background-color: var(--nier-text-main);
    outline: none;
}

.gavide--footer section::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 20px;
    background-repeat: repeat-x;
    background-image: url("/images/dotsline.svg");
}

/* ------------------ */
/* Tags */

.gavide--tags li {
    color: rgb(69, 65, 56);
    position: relative;
    display: inline-block;
    margin: 0.25rem;
    padding: 0;
    line-height: 1;
    text-decoration: none;
    font-size: 1rem;
    background-color: rgb(186, 181, 161);
    border-left: 0.25rem solid rgb(69, 65, 56);
}

.gavide--tags li a {
    display: block;
    padding: 0.25rem 0.5rem;
    text-decoration: none !important;
    color: inherit;
}

.gavide--tags {
    padding: 0;
    margin: 0;
}

/* ------------------ */
/* Selector (for language and search) */

.gavide--search-input {
    padding: 0.5rem;
    font-size: 1em;
    border: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    appearance: none;
    border-radius: 0;
    background-color: #dcd8c0;
    color: inherit;
    font-family: inherit;
    letter-spacing: inherit;
    font-weight: inherit;
}

#lang-show {
    display: none;
}

.gavide--selector ul {
    display: none;
}

#lang-show:checked + ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 2rem;
    background-color: #dcd8c0;
    z-index: 999;
    list-style-type: none;
    margin: 0;
    padding: 1rem;
    gap: 0.5rem;
    border: 1px solid #454138;
}

.gavide--selector {
    display: flex;
    margin-top: 1rem;
    position: relative;
}

label[for="lang-show"] {
    display: inline-block;
    padding: 0.5rem;
    font-size: 1em;
    border: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    appearance: none;
    border-radius: 0;
    background-color: #dcd8c0;
    color: inherit;
    font-family: inherit;
    letter-spacing: inherit;
    font-weight: inherit;
    cursor: pointer;
}

/* KaTeX styling */
.latex-container .katex,
.katex-math .katex,
.katex {
    color: var(--latex-color) !important;
    font-size: 1.1em;
}

.logo-skeleton {
    width: 8em;
    height: 8em;
    transition: transform .5s ease-in-out;
    /* clip-path: circle(50%); */
    will-change: transform;
}
.logo-skeleton:hover {
    transform: rotate3d(0, 1, 0, 180deg) rotate(1turn);
}

.social-icon {
    fill: var(--logo-color, white);
    display: inline-block;
    width: 2rem;
    height: 2rem;
    transition: filter 0.25s ease-out, transform 0.25s ease-out;
}
.social-icon:hover {
    filter: brightness(0.5);
    transform: scale(1.2);
}
