/****************************************
*
* Reset
* https://www.bram.us/2019/10/04/a-modern-css-reset/
*
****************************************/

*,
*::before,
*::after {
    box-sizing: border-box;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

body,
h1,
h2,
h3,
h4,
p,
li,
figure,
figcaption,
blockquote,
dl,
dd {
    margin: 0;
}

a:not([class]) {
    text-decoration-skip-ink: auto;
}

img {
    max-width: 100%;
    display: block;
}

input,
button,
textarea,
select {
    font: inherit;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/****************************************
* Utilities
****************************************/

.flex {
    display: flex;
}

/****************************************
* All sizes
****************************************/

/* color palette
**************
primary: #23374d
secondary: 6a6a6a
accent: 1d6fc0 */

html {
    font-size: calc(13.5px + (18 - 13.5) * (100vw - 320px) / (850 - 320));
}

body {
    font-family: 'Fira Sans', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #24252a;
    color: #f8f8f2;
    scroll-behavior: smooth;
    text-rendering: optimizeSpeed;
    line-height: 1.7;
}

@media (min-width: 850px) {
    html {
        font-size: 18px;
    }
}

h1 {
    font-size: 3em;
    line-height: 1.1em;
    margin-bottom: 2rem;
    font-weight: 900;
    color: #bd93f9;
    max-width: 100%;
    width: max-content;
}

h1+div {
    margin-top: 2rem;
}

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

h2 {
    font-size: 1.75em;
    line-height: 1.2em;
    margin-top: 4rem;
    margin-bottom: .5rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

h1 a,
h2 a {
    text-decoration: none;
    color: #bd93f9;
    max-width: 100%;
    width: max-content;
}

h3 {
    font-size: 1.45em;
    line-height: 1.2em;
    margin-bottom: .5rem;
}

h4 {
    margin-top: 1rem;
}

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

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

footer a {
    color: #94c6f9;
}

footer a:hover {
    color: #a6e22e;
    text-decoration: underline;
}

p+p,
h1+p {
    margin-top: 1rem;
}

p + h3,
button + p {
    margin-top: 2rem;
}

pre+p {
    margin-top: 1rem;
}

blockquote {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #3e3f86;
    padding: 1rem;
    background-color: rgba(0, 0, 0, .06);
}

video {
    max-width: 100%;
    margin-top: 1.5rem;
}

button {
    border: none;
    background-color: #8be9fd;
    border-radius: 10px;
    padding: .5rem 1rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 2rem;
    color: #000;
    cursor: pointer;
    transition: .3s all;
}

button:hover {
    background-color: #bd93f9;
}

/****************************************
* Header
****************************************/

header {
    width: 100%;
    z-index: 10;
    border-bottom: 1px solid #8be9fd;
}

header ul {
    display: flex;
    justify-content: space-between;
    margin: auto;
    padding: .75rem 2rem;
}

header li a {
    font-size: 1.25rem;
    line-height: 1.2rem;
    position: relative;
    top: 2px;
    color: #f8f8f2;
    border: 2px solid transparent;
    transition: border-color .3s ease;
    text-decoration: none;
    letter-spacing: .02em;
}

header li a:hover,
header li a:focus {
    text-decoration: underline;
    color: #fff;
}

header li:first-child {
    flex: 1 1 auto;
}

header li:first-child a {
    font-size: 1.5rem;
    line-height: 1.5rem;
    font-weight: 900;
    text-transform: none;
}

/****************************************
* Main
****************************************/

main {
    margin: 0 auto auto;
    padding: 4rem 1rem;
    max-width: 850px;
}

.articles {
    display: grid;
    grid-gap: 2rem;
}

@media (max-width: 450px) {
    .articles {
        grid-template-columns: 100%;
    }
}

.articles article.content {
    padding: 2rem 1rem 1rem 1rem;
}

.articles article.content::after {
    padding-top: 2rem;
    border-bottom: 4px solid rgba(35, 55, 77, .3);
}

.articles article:last-child::after {
    display: none;
}

.articles article h2 {
    margin-top: 0;
    font-size: 1.75em;
    line-height: 1em;
    margin-bottom: .25rem;
    font-weight: 900;
}

h3.date-and-read-time {
    font-size: .8em;
    font-weight: 400;
    margin-bottom: .5rem;
}

article.content {
    margin-left: auto;
    margin-right: auto;
}

article.content ul {
    list-style: none;
    margin-left: 2rem;
    margin-top: 1rem;
}

article.content ul li::before {
    content: '';
    background-color: #8be9fd;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    display: inline-block;
    line-height: 1rem;
    color: white;
    text-align: center;
    margin-right: 0.5rem;
    top: -.08rem;
    position: relative;
}

article.content ul+p {
    margin-top: 2rem;
}

article.content ol {
    list-style: none;
    counter-reset: my-awesome-counter;
    margin: 1rem;
}

article.content ol li {
    counter-increment: my-awesome-counter;
    margin: 0.25rem;
}

article.content ol li::before {
    content: counter(my-awesome-counter);
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    background-color: #23374d;
    color: #f8f8f2;
    display: inline-block;
    line-height: 1.8em;
    text-align: center;
    margin-right: .5rem;
}

/****************************************
* Footer
****************************************/

footer {
    padding: 1em;
    border-top: 1px solid #8be9fd;
}

footer p {
    text-align: center;
    font-size: .8rem;
    color: #8be9fd;
}

/****************************************
* Homepage
****************************************/

.article-links h2 {
    margin-bottom: 1rem;
    color: #bd93f9;
    max-width: 100%;
    width: max-content;
}

.article-links a {
    display: flex;
    justify-content: space-between;
    color: #f8f8f2;
    border: 1px solid transparent;
    padding: .25rem 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    text-decoration: none;
}

.article-links a:hover {
    border: 1px solid #bd93f9;
    background-color: rgba(189, 147, 249, .03);
}

.article-links a .date {
    font-family: 'Fira Mono';
    margin-left: 2rem;
}

/****************************************
* About
****************************************/

.about {
    display: grid;
    grid-gap: 2rem;
}

.about img {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 5px solid #8be9fd;
    transition: opacity .3s;
    margin: auto;
}

@media (min-width: 928px) {
    .about {
        grid-template-columns: 5fr 2fr;
    }

    .about img {
        margin-top: -57px;
    }
}

/****************************************
* Me
****************************************/

.me {
    display: grid;
    grid-gap: 2rem;
}

.me img {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 5px solid #8be9fd;
    transition: opacity .3s;
    margin: auto;
}

@media (min-width: 928px) {
    .me {
        grid-template-columns: 5fr 2fr;
    }
}

/****************************************
* Code
****************************************/

/**
 * Dracula Theme originally by Zeno Rocha [@zenorocha]
 * https://draculatheme.com/
 *
 * Ported for PrismJS by Albert Vallverdu [@byverdu]
 */

code,
code[class*="language-"],
pre[class*="language-"] {
    color: #f8f8f2;
    background: none;
    text-shadow: 0 1px rgba(0, 0, 0, 0.3);
    font-family: 'Fira Code', monospace;
    font-size: .83em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

/* Code blocks */
code,
pre[class*="language-"] {
    padding: 1rem;
    margin: 1rem 0 2rem;
    max-width: calc(100vw - 2rem);
    overflow: auto;
}

code {
    padding: 1em 1em 1em 0;
}

:not(pre)>code[class*="language-"],
pre[class*="language-"] {
    background: #21222c;
    border: 1px solid #8be9fd;
    border-radius: 10px;
}

/* Inline code */
:not(pre)>code {
    text-shadow: none;
    padding: .1rem .5rem .14rem;
    white-space: nowrap;
    background-color: #21222c;
    border: 1px solid #8be9fd;
    margin: 0 .25rem;
    border-radius: 5px;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #949FC2;
}

.token.punctuation {
    color: #f8f8f2;
}

.namespace {
    opacity: .7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: #ff79c6;
}

.token.boolean,
.token.number {
    color: #bd93f9;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #50fa7b;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
    color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
    color: #f1fa8c;
}

.token.keyword {
    color: #8be9fd;
}

.token.regex,
.token.important {
    color: #ffb86c;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}