@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

:root {
    --gray: #606060;
    --red: #db6262;
}

* {
    font-family: 'Fira Code', monospace;
    color: #0a0a0a;
}

body {
    max-width: 800px;
    padding: 0.5rem;
    margin: auto;
}

/* HEADER */

header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed #0a0a0a;

    margin-top: 0.5rrem;
    margin-bottom: 0.5rrem;
    
    text-transform: uppercase;
}

header div {
    display: flex;
    gap: 10px;
}

header a {
    color: #0a0a0a;
    text-decoration: none;
}

/* Insert a '/' after the header a */
header a:after {
    content: '/';
    color: #db6262;
}

.header-title {
    font-size: 18pt;
    font-weight: bold;
}

/* MAIN CONTENT */

a {
    white-space: nowrap;
    /* Underline color should be --red, and 2px */
    text-decoration: underline #db6262;
    text-decoration-thickness: 2px;
}

/* =============================================================================
NOTE
============================================================================= */

div.note { 
    padding: 0.1em 1em;
    background-color: #d3d3d3;
}

div.note.warning {
    background-color: #db6262;
}

div.note.tip {
    background-color: #8ae48a;
}
 
/* =============================================================================
TYPOGRAPHY 
============================================================================= */

pre {
    padding: 0.5rem;
    border: 1px solid var(--gray);
    overflow: auto;
}

pre > code {
    overflow: scroll;
}

/* Match code, which is NOT inside a pre tag */
:not(pre) > code::before {
    content: '`';
    color: var(--red);
}

:not(pre) > code::after {
    content: '`';
    color: var(--red);
}

/* Warning note boxes are red, therefore we use white in there */
.note.warning code::before {
    color: white;
}

.note.warning code::after {
    color: white;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1rem;
}

h4 {
    color: var(--gray);
}

/* =============================================================================
 IMAGES
============================================================================= */

figure {
    margin: 2em 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 1em;
}

figure img {
    max-width: 75%;
    height: auto;
}

figure figcaption {
    text-align: center;
}
