:root {
    --default-gap: clamp(1rem, 1rem + 2vw, 2rem);
    --large-font-size: var(--default-gap);
    --gap: var(--default-gap);
    --max-site-width: 750px;
}


/* ##################### CSS Reset ##################### */

/*
    1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

/*
    2. Remove default margin
*/
* {
    margin: 0;
}

/*
    Typographic tweaks!
    3. Add accessible line-height
    4. Improve text rendering
  */
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/*
    5. Improve media defaults
*/
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/*
    6. Remove built-in form typography styles
*/
input,
button,
textarea,
select {
    font: inherit;
}

/*
    7. Avoid text overflows
*/
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/*
    8. Create a root stacking context
*/
#root,
#__next {
    isolation: isolate;
}


/* ##################### Basics ##################### */

html {
    font-size: 1.155em;
    font-family: system-ui, sans-serif;
}

body {
    color: rgba(0, 0, 0, .84);
    background-color: #f2f2f2;
}

a {
    color: #1967d2;
    text-decoration: none;
}

a:focus,
a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1;
    color: #313131;
    text-rendering: optimizeLegibility;
}

h1 a,
h2 a {
    color: #313131;
}


/* ##################### Content ##################### */

body {
    overflow-y: scroll;
    background-color: rgb(222, 222, 222, .1);
}

.page-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
}

.header-wrap {
    background-color: #ffffff;
    box-shadow: 0 0 2em rgb(0, 0, 0, .1);
    padding: var(--gap) 0;
}

header.primary-header {
    width: min(var(--max-site-width), 100% - (2 * var(--gap)));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    flex-wrap: wrap;
}

header.primary-header h1,
header.primary-header h2 {
    font-size: var(--large-font-size);
    display: flex;
    align-items: center;
}

header.primary-header h1 a,
header.primary-header h2 a {
    display: flex;
    align-items: center;
    gap: calc(var(--gap) / 4);
    text-decoration: none;
}

header.primary-header h1 a img,
header.primary-header h2 a img {
    width: clamp(1rem, 1rem + 2vw, 1.5rem);
    height: auto;
}

nav.primary-nav {
    display: flex;
    align-items: center;
}

ul.nav-list {
    font-weight: 700;
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: calc(var(--gap) / 3);
    flex-wrap: wrap;
}

ul.nav-list a {
    font-size: 0.85rem;
    color: #313131;
    text-transform: uppercase;
    border: 1px solid #ccc;
    padding: calc(var(--gap) / 4) calc(var(--gap) / 3);
    border-radius: calc(var(--gap) / 4);
    text-decoration: none;
}

ul.nav-list a:hover {
    background-color: #ccc;
}

.content,
.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

main.main-content {
    width: min(var(--max-site-width), 100% - (2 * var(--gap)));
    margin: 0 auto;
}

.posts,
.post,
.post header {
    display: flex;
    flex-direction: column;
}

.posts {
    gap: var(--gap);
}

.post {
    gap: calc(var(--gap) / 2);
}

.post header {
    gap: calc(var(--gap) / 4);
}

h1.post-title {
    font-size: var(--large-font-size);
    font-weight: 900;
}

h2.post-title {
    font-size: clamp(1rem, 1rem + 2vw, 1.5rem);
    font-weight: 900;
}

.post-date {
    color: #999;
}

.post-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.article-content>* {
    margin-top: 0;
    margin-bottom: 1.25rem
}

.article-content>h2,
.article-content>h3 {
    margin-top: 2rem;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol li::marker {
    font-weight: bold;
}

.footer-wrap {
    background-color: #dedede;
    color: #4d4d4d;
    font-size: 1rem;
    padding: var(--gap) 0;
    text-align: center;
}

footer.primary-footer {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap) / 8);
    width: min(var(--max-site-width), 100% - (2 * var(--gap)));
    margin: 0 auto;
    font-size: 0.75rem;
}

nav.secondary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

ul.footer-list {
    display: flex;
    gap: calc(var(--gap) / 4);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    font-weight: 700;
    list-style-type: none;
    line-height: 1;
    padding: 0;
    margin: 0;
}

ul.footer-list a {
    font-size: 0.75rem;
    color: #313131;
    text-transform: uppercase;
}

#myBtn {
    display: none;
    font-size: .6rem;
    position: fixed;
    bottom: 1rem;
    right: .9rem;
    z-index: 99;
    border: none;
    outline: 0;
    background-color: #268bd2;
    color: #fff;
    cursor: pointer;
    padding: .4rem .6rem;
    border-radius: .4rem
}

#myBtn:hover {
    background-color: #555
}


/* ##################### CODE ##################### */

code,
pre {
    font-family: Menlo, Monaco, "Courier New", monospace, system-ui;
}

code {
    padding: .25em .5em;
    font-size: 85%;
    color: #444;
    background-color: #f0f0f0;
    border-radius: 3px
}

pre {
    display: block;
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 1rem;
    font-size: .8rem;
    line-height: 1.4;
    white-space: pre;
    border-radius: 4px;
    overflow-x: auto
}

pre code {
    padding: 0;
    font-size: 100%;
    color: inherit;
    background-color: transparent
}

.codehilite {
    margin-bottom: 1.5rem;
    border-radius: 4px;
    color: #f8f8f2;
    background-color: #272822;
}

.codehilite pre {
    margin-bottom: 0
}

.codehilite .err {
    color: #960050;
    background-color: #1e0010
}

.codehilite .lntd {
    vertical-align: top;
    padding: 0;
    margin: 0;
    border: 0
}

.codehilite .lntable {
    border-spacing: 0;
    padding: 0;
    margin: 0;
    border: 0;
    width: auto;
    overflow: auto;
    display: block
}

.codehilite .hl {
    display: block;
    width: 100%;
    background-color: #ffc
}

.codehilite .lnt {
    margin-right: .4em;
    padding: 0 .4em 0 .4em
}

.codehilite .ln {
    margin-right: .4em;
    padding: 0 .4em 0 .4em
}

.codehilite .k {
    color: #66d9ef
}

.codehilite .kc {
    color: #66d9ef
}

.codehilite .kd {
    color: #66d9ef
}

.codehilite .kn {
    color: #f92672
}

.codehilite .kp {
    color: #66d9ef
}

.codehilite .kr {
    color: #66d9ef
}

.codehilite .kt {
    color: #66d9ef
}

.codehilite .na {
    color: #a6e22e
}

.codehilite .nc {
    color: #a6e22e
}

.codehilite .no {
    color: #66d9ef
}

.codehilite .nd {
    color: #a6e22e
}

.codehilite .ne {
    color: #a6e22e
}

.codehilite .nf {
    color: #a6e22e
}

.codehilite .nx {
    color: #a6e22e
}

.codehilite .nt {
    color: #f92672
}

.codehilite .l {
    color: #ae81ff
}

.codehilite .ld {
    color: #e6db74
}

.codehilite .s {
    color: #e6db74
}

.codehilite .sa {
    color: #e6db74
}

.codehilite .sb {
    color: #e6db74
}

.codehilite .sc {
    color: #e6db74
}

.codehilite .dl {
    color: #e6db74
}

.codehilite .sd {
    color: #e6db74
}

.codehilite .s2 {
    color: #e6db74
}

.codehilite .se {
    color: #ae81ff
}

.codehilite .sh {
    color: #e6db74
}

.codehilite .si {
    color: #e6db74
}

.codehilite .sx {
    color: #e6db74
}

.codehilite .sr {
    color: #e6db74
}

.codehilite .s1 {
    color: #e6db74
}

.codehilite .ss {
    color: #e6db74
}

.codehilite .m {
    color: #ae81ff
}

.codehilite .mb {
    color: #ae81ff
}

.codehilite .mf {
    color: #ae81ff
}

.codehilite .mh {
    color: #ae81ff
}

.codehilite .mi {
    color: #ae81ff
}

.codehilite .il {
    color: #ae81ff
}

.codehilite .mo {
    color: #ae81ff
}

.codehilite .o {
    color: #f92672
}

.codehilite .ow {
    color: #f92672
}

.codehilite .c {
    color: #75715e
}

.codehilite .ch {
    color: #75715e
}

.codehilite .cm {
    color: #75715e
}

.codehilite .c1 {
    color: #75715e
}

.codehilite .cs {
    color: #75715e
}

.codehilite .cp {
    color: #75715e
}

.codehilite .cpf {
    color: #75715e
}

.codehilite .gd {
    color: #f92672
}

.codehilite .ge {
    font-style: italic
}

.codehilite .gi {
    color: #a6e22e
}

.codehilite .gs {
    font-weight: 700
}

.codehilite .gu {
    color: #75715e
}