:root {
    --bg: #282828;
    --bg1: #3c3836;
    --fg: #d7cfc6;
    --fg3: #c6a38f;
    --cyan: #96675e;
    --blue: #bc6963;
}

* {
    color: var(--fg);
    line-height: 1.4;
    text-shadow: 0 0 0 var(--fg);

    /* Hide scrollbars */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

*::-webkit-scrollbar {
    display: none;
}

::selection {
    background: var(--cyan);
    color: #000;
}

@media screen and (min-width: 992px) {
    html {
        height: 100%;
    }
}

body {
    padding: 16px;
    background: var(--bg);
    font: normal 300 13px monospace;
}

@media screen and (min-width: 992px) {
    body {
        padding: 48px;
        height: 100%;
    }
}

header {
    padding-bottom: 24px;
}

#content {
    display: flex;
    gap: 48px;
    justify-items: flex-start;
    flex-direction: column;
}

@media screen and (min-width: 992px) {
    #content {
        gap: 48px;
        flex-direction: row;
        height: calc(100% - 48px);
    }
}

.box-green {
    box-shadow:
        0 0 0 1px var(--fg3),
        0 0 0 3px var(--bg1),
        0 0 0 4px var(--fg3),
        4px 4px 0 3px var(--cyan);
    padding: 16px;
    background: var(--bg1);
    position: relative;
}

.box-green:before {
    content: " ";
    display: block;
    height: 10px;
    width: 10px;
    position: absolute;
    top: -5px;
    left: -5px;
    background: #282828;
    box-shadow:
        1px 1px 0 0px var(--fg3),
        3px 3px 0 0px var(--bg1),
        4px 4px 0 0px var(--fg3);
}

.to-pdf {
    display: block;
    text-align: right;
    margin-bottom: 8px;
}

@media screen and (min-width: 992px) {
    .box-green.wide {
        width: 840px;
    }
}

nav {
    display: inline-block;
    height: fit-content;
    width: 100%;
}

@media screen and (min-width: 992px) {
    nav {
        width: initial;
        position: sticky !important;
        top: 48px;
    }
}

nav ul {
    margin-bottom: 16px;
    padding: 0;
    list-style-type: none;
}

nav ul li {
    padding-left: 0;
}

nav ul:last-child {
    margin-bottom: 0;
}

nav a {
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

main {
    display: flex;
    gap: 48px;
    flex-direction: column-reverse;
}

@media screen and (min-width: 992px) {
    main {
        flex-direction: row;
        height: 100%;
    }

    main section {
        width: 420px;
    }

    main section>div {
        overflow-x: scroll;
        height: 100%;
    }
}

main section img {
    display: block;
    margin: 0 auto;
}

p,
pre,
ol {
    margin-bottom: 16px;
}

p:last-child {
    margin-bottom: 0;
}

pre {
    padding: 4px 8px;
    background: var(--bg);
    overflow-x: auto;
}

pre code {
    display: block;
    padding: 0 !important;
}

code {
    padding: 2px 4px;
    background: var(--bg);
    border-radius: 2px;
    border: 0 solid transparent;
    margin: 1px 0;
    display: inline-block;
}

/* article p:first-child::first-letter { */
/*     font-size: 330%; */
/*     float: left; */
/*     padding-right: 4px; */
/*     padding-top: 4px; */
/* } */

h1 {
    color: var(--cyan);
    text-shadow: none;
}

h2 {
    color: var(--blue);
    text-shadow: none;
}

ul,
dl,
h1,
h2,
.gallery>a {
    margin-bottom: 8px;
}

ul {
    list-style-type: circle;
    padding-left: 12px;
    /* 12px is the minimun value for circle to be visible */
}

ol {
    padding-left: 20px;
}

ul li {
    padding-left: 4px;
}

dl {
    display: flex;
    flex-wrap: wrap;
}

dl:not(.snippets) dt {
    width: 33.33%;
}

dd {
    width: 66.66%;
}

dl.snippets dt {
    margin-top: 8px;
    margin-bottom: 8px;
    width: 100%;
}

dl.snippets dt code {
    display: block;
    padding: 4px 8px;
    overflow-x: auto;
}

figcaption {
    text-align: center;
}

/* TODO: place to separate file and then import */
.gallery {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    height: auto;
}

.gallery a {
    width: 50%;
}

.gallery a figure {
    text-align: center;
}
