:root {
    --theme-primary: aquamarine;
    --theme-darker: rgb(46, 144, 111);
}

[data-theme="mist"] {
    --theme-primary: rgb(215, 233, 246);
    --theme-darker: rgb(106, 129, 145);
}

[data-theme="purp"] {
    --theme-primary: #bc8eff;
    --theme-darker: #7953af;
}

body {
    background-color: #19191b;
    padding: 0;
    margin: 0;
    color: #e0e0e0;
    font-size: 12pt;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    height: 100vh;
    min-height: 100vh;
    min-height: 100dvh;
}

a {
    color: #e0e0e0;
    text-decoration: none;
}

h2 {
    margin: 1rem 0;
}

code {
    font-family: "Cascadia Code", "Fira Code", Consolas, "Courier New", monospace;
    font-size: 0.95em;
}

p code, li code {
    background-color: rgb(38, 38, 42);
    border: 1px solid rgb(66, 75, 75);
    border-radius: 0.3rem;
    color: var(--theme-primary);
    padding: 0.1rem 0.3rem;
    white-space: nowrap;
}

pre {
    background-color: rgb(24, 26, 27);
    border: 1px solid darkslategray;
    border-radius: 0.5rem;
    line-height: 1.55;
    margin: 1.2rem 0;
    overflow-x: auto;
    padding: 1rem;
}

pre code {
    background: none;
    border: none;
    color: #e0e0e0;
    display: block;
    padding: 0;
}

.highlight {
    margin: 1.2rem 0;
}

.highlight pre {
    margin: 0;
}

.code-block {
    margin: 1.2rem 0;
    background-color: rgb(24, 26, 27);
    border: 1px solid darkslategray;
    border-radius: 0.5rem;
    overflow: hidden;
}

.code-block .highlight,
.code-block pre {
    margin: 0;
}

.code-block pre {
    background: none;
    border: none;
    border-radius: 0;
}

.code-block-title {
    display: block;
    padding: 0.3rem 0.8rem;
    background-color: rgb(38, 38, 42);
    border-bottom: 1px solid darkslategray;
    color: rgb(190, 190, 190);
    font-size: 7pt;
    line-height: 1.4;
    text-transform: uppercase;
    font-weight: bold;
}

main {
    height: 100%;
    display: flex;
}

.left-sidebar {
    width: 20vw;
    min-width: 20vw;
    border-right: 2px solid var(--theme-darker);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100%;
    flex: 0 1 auto;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.sidebar-profile {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--theme-primary);
    margin-bottom: 2rem;
}

.sidebar-banner {
    position: absolute;
    width: 100%;
    height: 7.2rem;
    background: var(--theme-darker);
}

.sidebar-header-img {
    width: 7.2rem;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 3px solid #19191b;
    position: relative;
    margin-top: 3.6rem;
}

.sidebar-displayname {
    margin-top: 1rem;
    font-size: 14pt;
}

.sidebar-username {
    color: gray;
    font-size: 11pt;
    margin-top: 0.4rem;
}

.sidebar-content {
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    /* font-family: 'Courier New', Courier, monospace; */
    font-size: 14pt;
}

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

.sidebar-footer, .sidebar-footer a {
    color: gray;
    font-size: 8pt;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.sidebar-theme-toggle {
    appearance: none;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.main-content-area {
    width: 100%;
    padding: 4rem;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow-y: auto;
}

.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    max-width: 40rem;
}
/*
.main-header {
    font-family: 'Courier New', Courier, monospace;
}
*/
.blog-header {
    font-family: Garamond;
}

.main-text p a {
    color: rgb(160, 160, 160);
}

.main-text {
    max-width: 58rem;
}

.back-link {
    color: gray;
    font-size: 10pt;
}

.back-link:hover {
    color: #e0e0e0;
}

.main-text p {
    line-height: 1.65;
}

.main-text img {
    display: block;
    height: auto;
    max-width: 100%;
}

.main-content img {
    border-radius: 0.5rem;
}

.blog-list-header p,
.blog-post-header p {
    color: rgb(160, 160, 160);
    line-height: 1.5;
    margin-top: 0;
}

.blog-list-items {
    margin-top: 1rem;
}

.blog-post {
    max-width: 58rem;
}

.blog-post-header h1 {
    margin-bottom: 0.5rem;
}

.blog-post-header time {
    color: gray;
    display: block;
    font-size: 10pt;
    margin-bottom: 1rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.post-tag {
    background-color: rgb(38, 38, 42);
    border: 1px solid darkslategray;
    border-radius: 0.35rem;
    color: var(--theme-primary);
    font-size: 9pt;
    padding: 0.18rem 0.45rem;
}

a.post-tag:hover {
    filter: brightness(120%);
}

.post-toc {
    border-radius: 0rem;
    margin: 1rem 0 2rem;
    padding: 0.2rem 0.8rem;
    border-left: 3px solid darkslategray;
}

.post-toc ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 11pt;
}

.post-toc li {
    margin: 0.4rem 0;
}

.post-toc a {
    color: rgb(190, 190, 190);
}

.post-toc a:hover {
    color: #e0e0e0;
}

.button-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.button-grid a {
    color: #e0e0e0;
}

.grid-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    border-radius: 0.5rem;
    padding: 1.5rem 4rem;
    background-color: var(--theme-darker);
    border: none;
    outline: none;
    cursor: pointer;
    color: #e0e0e0;
    box-sizing: border-box;
    width: 11rem;
    position: relative;
    overflow: visible;
}

.grid-button-icon {
    height: 1.5rem !important;
    object-fit: contain;
}

.grid-button-label {
    font-size: 11pt;
}

.copy-feedback {
    position: absolute;
    bottom: calc(100% + 0.45rem);
    left: 50%;
    transform: translate(-50%, 0.35rem);
    background-color: rgb(46, 46, 46);
    border: 1px solid darkslategray;
    border-radius: 0.4rem;
    padding: 0.3rem 0.5rem;
    font-size: 10pt;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.15s ease-in-out;
    z-index: 10;
}

.copy-feedback-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.copy-feedback-error {
    color: #ff9a9a;
    border-color: rgba(255, 154, 154, 0.45);
}

.grid-button:hover, .card-display:hover {
    filter: brightness(85%);
    transition: ease-in 0.1s;
}

.card-display {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    background-color: rgb(46, 46, 46);
    border-radius: 0.5rem;
    gap: 1.4rem;
    color: #e0e0e0;
    border: 2px solid darkslategray;
    width: 42rem;
    align-items: center;
    margin-bottom: 1rem;
}

.card-display-icon {
    width: 4rem;
}

.card-display-text {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.card-display-date {
    font-size: 10pt;
    color: gray;
}

.card-display-title {
    font-size: 14pt;
    font-weight: bold;
}

.card-display-description {
    color: gray;
    font-size: 11pt;
}


@media screen and (min-width: 1998px) {
    .sidebar-banner {
        height: 10rem;
    }

    .sidebar-header-img {
        margin-top: 5rem;
        width: 10rem;
    }

    .sidebar-displayname {
        margin-top: 1.2rem;
        font-size: 16pt;
    }

    .sidebar-username {
        font-size: 13pt;
    }

    .left-sidebar {
        width: 16vw;
        min-width: 12rem;
    }

    .sidebar-nav {
        font-size: 18pt;
    }
}

@media screen and (max-width: 700px) {
    main {
        flex-direction: column;
        width: 100%;
    }

    .sidebar-content {
        flex-direction: row;
    }

    .left-sidebar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100vw;
        height: min-content;
        border-right: none;
        border-bottom: 2px solid var(--theme-primary);
        vertical-align: middle;
        gap: 2rem;
        padding: 1.2rem;
    }

    .sidebar-top-group {
        display: contents;
    }

    .sidebar-content {
        flex-direction: row;
        padding: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 1rem;
        font-size: 14pt;
    }

    .sidebar-header-img {
        width: 3rem;
        margin: 0;
        border: none;
    }

    .sidebar-profile {
        display: contents;
    }

    .sidebar-banner {
        display: none;
    }

    .sidebar-profile span {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content-area {
        padding: 1.2rem;
    }

    .button-grid {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .button-grid a, .grid-button {
        width: 100%;
    }

    .card-display {
        align-items: flex-start;
        gap: 0rem;
        width: unset;
    }

    .card-display-icon {
        width: 3rem;
    }
}
