@import url('https://fonts.googleapis.com/css2?family=Exo+2&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Yanone+Kaffeesatz:wght@300&display=swap');

:root {
    --dark-description-text-color: #bababa;
    --purple-link-text-color: #876fd6;
    --normal-text-color: #dadadb;
    --page-background-color: #1d1e20;
    --lighter-card-background-color: #2e2e33;
    --quote-border-color: #818181;
    --card-hover-background-color: #3e3e43;
    --code-block-background-color: #181818;
}

html {
    position: relative;
    height: 100vh;
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    background: #232323;
    color: #cdcdcd;
    font-family: "Avenir Next", "Avenir", sans-serif;
    display: flex;
    flex-direction: row;
}

#article-container {
    flex-grow: 1;
    flex-shrink: 1;
}

#article-container article {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#menuToggle {
    display: block;
    position: fixed;
    z-index: 100;
    top: 0px;
    left: 0px;
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
    height: 100%;
}

#menu-container {
    overflow-y: scroll;
    position: absolute;
    width: 300px;
    margin: -100px 0 0 -50px;
    padding: 50px;
    height: 100%;
    background: #ededed;
    transform-origin: 0% 0%;
    transform: translate(-100%, 0);
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

#menuToggle a {
    text-decoration: none;
    color: #232323;
    transition: color 0.3s ease;
}

.sub-menu {
    display: none;
}

.sub-menu a:hover {
    color: tomato;
}

#menuToggle input {
    display: block;
    width: 40px;
    height: 32px;
    position: absolute;
    top: -7px;
    left: -5px;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
    -webkit-touch-callout: none;
}

#menuToggle span {
    display: block;
    width: 33px;
    height: 4px;
    margin-bottom: 5px;
    position: relative;
    background: #cdcdcd;
    border-radius: 3px;
    z-index: 1;
    transform-origin: 4px 0px;
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        opacity 0.55s ease;
}

#menuToggle span:first-child {
    transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
    transform-origin: 0% 100%;
}

#menuToggle input:checked~span {
    opacity: 1;
    transform: rotate(45deg) translate(-2px, -1px);
    background: #232323;
}

#menuToggle input:checked~span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
}

#menuToggle input:checked~span:nth-last-child(2) {
    transform: rotate(-45deg) translate(0, -1px);
}

#menu {
    padding: 50px;
    padding-top: 125px;
    list-style-type: none;
    -webkit-font-smoothing: antialiased;

    /* min-height: 100%;*/
}

#menu li {
    padding: 10px 0;
    font-size: 22px;
}

#menuToggle input:checked~div {
    transform: none;
}

article {
    text-wrap: wrap;
    /*text-wrap: balance;*/
    word-break: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    font-variation-settings:
        "wdth" 100;
    max-width: 100%;
    position: relative;
    text-align: justify;
    text-justify: inter-word;
    padding: 1.2rem;
}

article h1 {
    font-size: 2.5em;
    line-height: calc(1ex / 0.42);
    margin: calc(1ex / 0.42) 0;
}

article h2 {
    font-size: 2em;
    line-height: calc(1ex / 0.42);
    margin: calc(1ex / 0.42) 0;
}

article h3 {
    font-size: 1.75em;
    line-height: calc(1ex / 0.38);
    margin: calc(1ex / 0.38) 0;
}

article h4 {
    font-size: 1.5em;
    line-height: calc(1ex / 0.37);
    margin: calc(1ex / 0.37) 0;
}

article p {
    font-size: 1em;
    line-height: calc(1ex / 0.32);
    margin: calc(1ex / 0.32) 0;
    max-width: 100%;
    position: relative;
}

article pre {
    max-width: 100%;
    position: relative;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

article a {
    text-decoration: none;
    color: var(--purple-link-text-color);
}

blockquote {
    background: var(--lighter-card-background-color);
    border-left: 10px solid var(--quote-border-color);
    margin: 1.5em 10px;
    padding: 0.5em 10px;
    quotes: "\201C" "\201D" "\2018" "\2019";
}

blockquote:before {
    color: var(--normal-text-color);
    content: open-quote;
    font-size: 4em;
    line-height: 0.1em;
    margin-right: 0.25em;
    vertical-align: -0.4em;
}

blockquote p {
    display: inline;
}

code {
    background-color: var(--code-block-background-color);
    border-radius: 4px;
    padding: 2px;
    color: #2fcd7f;
}

.code-block {
    border-radius: 8px;
    overflow: hidden;
    padding-left: 2px !important;
}

.img-container {
    max-width: 100%;
    text-align: center;
    font-style: italic;
}

.img-container img {
    object-fit: contain;
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
    border-width: 0px;
    cursor: pointer;
    transition: 0.3s;
}

.img-container img:hover {
    opacity: 0.7;
}

.img-source {
    vertical-align: super;
    font-size: 0.5em;
    margin-left: 2px;
    color: var(--purple-link-text-color);
    text-decoration: underline;
    cursor: pointer;
    font-style: normal;
}

/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    padding-top: 100px;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--normal-text-color);
    padding: 10px 0;
    height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content,
#caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--dark-description-text-color);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: var(--normal-text-color);
    text-decoration: none;
    cursor: pointer;
}

/* for block of numbers */
.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    text-align: right;
    color: #ccc;
    border-right: 1px solid #CCC;
    vertical-align: top;
    padding-right: 2px !important;
    width: 40px;

    /* your custom style here */
}

/* for block of code */
.hljs-ln-code {
    padding-left: 6px !important;
}

.code-fragments {
    background-color: #f7ca88;
    border-radius: 8px;
    padding-bottom: 6px;
}

.code-fragments-caption {
    color: #181818;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.code-fragments-caption a {
    text-decoration: none;
    color: #181818;
}

.code-fragments-separator {
    color: #181818;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.comment {
    background-color: var(--lighter-card-background-color);
    border-radius: 8px;
    display: block;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: var(--normal-text-color);
    font-size: 24px;
    margin: 8px;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    line-height: 32px;
    padding: 4px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.comment:hover {
    background-color: var(--card-hover-background-color);
}

.katex-display-counter {
    display: flex;
    flex-direction: row;
    align-items: center;
    max-width: calc(100% - 32px);
    overflow: hidden;
    line-height: 42px;
}

.katex-display-counter code {
    background-color: transparent !important;
    display: inline-block;
    flex-grow: 1;
}

.katex-display-counter::after {
    counter-increment: katexEqnNo;
    content: "(" counter(katexEqnNo) ")";
    float: right;
    vertical-align: middle;
}

.older_newer_link_section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas: "left right";
    padding: 4px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.older_newer_link {
    text-decoration: none;
    color: var(--normal-text-color);
    font-size: 24px;
    line-height: 24px;
    font-family: 'Yanone Kaffeesatz', sans-serif;
}

.older_newer_link_right {
    text-align: right;
    grid-area: right;
    border-right-style: solid;
    border-right-width: 2px;
    border-right-color: transparent;
    transition-duration: 0.3s;
    padding: 4px;
    padding-right: 16px;
}

.older_newer_link_right:hover {
    border-right-style: solid;
    border-right-width: 2px;
    border-right-color: var(--normal-text-color);
}

.older_newer_link_left {
    grid-area: left;
    border-left-style: solid;
    border-left-width: 2px;
    border-left-color: transparent;
    transition-duration: 0.3s;
    padding: 4px;
    padding-left: 16px;
}

.older_newer_link_left:hover {
    border-left-style: solid;
    border-left-width: 2px;
    border-left-color: var(--normal-text-color);
}

.video {
    /*margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: 100%;*/
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}