@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

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

*:not(dialog) {
    margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

:root {
    --color-token-black: #333;
    --color-token-dark: #0d0f12;
    --color-token-white: #fff;
    --color-token-midblue: #007bff;
    --color-token-darkblue: #121d2b;
    --color-token-yellow: #ffc439;
    --color-token-gray: #454c54;
    --color-token-midgray: #939aa2;
    --color-token-lightgray: #d9e0e8;
    --color-text: var(--color-token-white);
    --primary-color: var(--color-token-yellow);
    --color-background: var(--color-token-dark);
    --color-footer: var(--color-token-darkblue);
    --color-border: var(--color-token-gray);
    --font-size-default: 16px;
    --spacing-base-unit: 4px;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    background-color: var(--color-background);
}

html,
body {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: var(--font-size-default);
    color: var(--color-text);
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;

}

p {
    text-wrap: pretty;
    font-weight: 300;
    line-height: 1.6;
    margin: 1rem 0;
}

/* Global heading defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
    font-weight: 400;
    line-height: 1.25;
    scroll-margin-top: 80px;
}



/* Major headings */
h1 {
    font-size: 2.4rem;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Mid-level headings */
h3 {
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

h4 {
    font-size: 1.3rem;
    margin-top: 1.6rem;
    margin-bottom: 0.6rem;
}

/* Minor headings */
h5 {
    font-size: 1.1rem;
    margin-top: 1.4rem;
    margin-bottom: 0.4rem;
}

h6 {
    font-size: 1rem;
    margin-top: 1.2rem;
    margin-bottom: 0.3rem;
    color: #666;
}


a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

label {
    font-weight: 500;
}




/*---- HEADER -----*/
.page-header {
    display: flex;
    box-sizing: border-box;
    margin: 20px 40px;
    height: 60px;

}

.page-header h1 {

    display: inline-block;
    vertical-align: middle;
    margin: 0;
    line-height: normal;
    height: 100px;
    vertical-align: middle;
    height: auto;
    font-weight: 300;
    font-size: 1.5em;
    text-align: left;

}

.page-header h1 a {
    color: var(--color-text);
}

.page-header .logo {
    height: 60px;
    display: block;
    margin: 0;
    float: left;
    margin-right: 10px;

}

.page-header h1 span {
    font-weight: 400;
    display: inline-block;
}

/*---- HEADER -----*/

/*---- FILTER SECTION -----*/
.filter-section {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin: 20px 40px;
}

.filter-section input[type="search"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    outline: none;
}

.filter-section input[type="search"]:focus {
    border-color: var(--color-text);
}

/*---- FILTER SECTION -----*/


/*---- PAGE CONTENT -----*/
.page-content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
    margin: 20px 40px;
}

.page-content {
    flex: 1;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
    padding-top: 20px;
}


.page-content h1 {
    margin-top: 0;
}

/* BLOG POSTS */
.blog-post-item {
    padding: 20px 32px;
    display: block;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.blog-post-item:hover {
    border-color: var(--color-text);
}

.blog-post-item header {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 16px;
    text-align: left
}

.blog-post-item header .published-date {
    margin: 0;
}

.blog-post-item header .categories-section {
    display: flex;
    flex-wrap: wrap;
}

.blog-post-item h2 {
    margin-top: 0;
}

/* BLOG POSTS */

/*---- SIDEBAR -----*/
.sidebar {
    box-sizing: border-box;
    margin: 20px auto;
    padding-top: 20px;
    width: 250px;
}

.sidebar ul,
.sidebar li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar.toc {
    width: 250px;
}

.sidebar.toc ul,
.sidebar.toc li {
    list-style: none;
    font-size: 14px;
    color: var(--color-token-midgray);
}

.sidebar.toc li a {
    color: var(--color-token-midgray);
    transition: opacity .5s;
}

.sidebar.toc li a:hover {
    color: var(--color-token-lightgray);
}

.sidebar ul li ul {
    padding-left: 10px;
}

.sidebar h2, .sidebar h3 {
    margin-top: 0;
}

/*---- PAGE CONTENT -----*/

/*---- FOOTER -----*/
.page-footer {
    background: var(--color-footer);
    padding: 20px 40px;
    text-align: center;
    width: 100%;
    margin-top: 20px;
}

.page-footer-content {
    margin: 0 auto;
    width: 100%;
}

/* HELPER CLASSES */
.strong {
    font-weight: 600;
}
.primary-color {
    color: var(--primary-color);
}
.muted-color {
    color: var(--color-token-midgray);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--color-border);
    color: var(--color-text);
    font-size: 0.8em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
    border: 1px solid transparent;
}

.badge:hover {
    border: 1px solid var(--color-token-lightgray);
}

.category-badge.active {
    background-color: var(--primary-color);
    color: white;
}

pre[class*=language-] {
    display: table;
    width: 100%;
}

/* HELPER CLASSES */

/* MEDIA QUERIES */


/* Desktop styles (1200px and up) */
@media (min-width: 1200px) {

    .page-content,
    .page-header,
    .filter-section,
    .page-footer-content,
    .page-content-section {
        max-width: 1140px;
        /* Caps width for large screens */
        margin: 20px auto;
        width: 100%;
    }

    .page-content-section {
        gap: 40px;
        flex-direction: row;
    }

    .sidebar.toc {
        position: sticky;
        height: fit-content;
        top: 0;
    }
}

/* Tablet styles (768px and up) */
@media (max-width: 1200px) {

    .page-content,
    .page-header,
    .filter-section,
    .page-footer-content,
    .page-content-section {
        width: 90%;
        margin: 20px auto;
        /* Centers the section */
    }

    .page-content-section {
        gap: 40px;
        flex-direction: row;
    }

    .sidebar.toc {
        position: sticky;
        height: fit-content;
        top: 0;
    }
}

/* Tablet and phone styles (768px and bellow) */
@media (max-width: 768px) {

    .page-header,
    .filter-section,
    .page-content-section {
        margin: 20px 40px;
    }

    .page-content-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0;
        width: auto;
    }

    .page-content {
        flex: 1;
        width: 100%;
        order: 2;
    }

    .sidebar {
        order: 1;
        justify-content: flex-start;
        margin-top: 0;
        width: 100%;
        flex-direction: row;
        display: flex;
    }

    .sidebar ul,
    .sidebar li {
        display: inline-flex;
    }

    .sidebar h2 {
        display: none;
    }

    .sidebar.toc {
        order: 1;
        justify-content: flex-start;
        margin-top: 0;
        width: 100%;
        flex-direction: column;
        display: flex;
        position: relative;
    }

    .sidebar.toc ul,
    .sidebar.toc li {
        display: list-item;
    }

    .sidebar.toc h2 {
        display: block;
    }
}

/* MEDIA QUERIES */