@font-face {
    font-family: 'Iosevka Etoile';
    font-display: swap;
    font-weight: normal;
    font-stretch: normal;
    font-style: normal;
    src: url('/fonts/iosevka-etoile-regular.subset.woff2') format('woff2');
}

@font-face {
    font-family: 'Iosevka Etoile';
    font-display: swap;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    src: url('/fonts/iosevka-etoile-bold.subset.woff2') format('woff2');
}

@font-face {
    font-family: 'Iosevka Etoile';
    font-display: swap;
    font-weight: bold;
    font-stretch: normal;
    font-style: italic;
    src: url('/fonts/iosevka-etoile-bolditalic.subset.woff2') format('woff2');
}

@font-face {
    font-family: 'Iosevka Etoile';
    font-display: swap;
    font-weight: normal;
    font-stretch: normal;
    font-style: italic;
    src: url('/fonts/iosevka-etoile-italic.subset.woff2') format('woff2');
}

#jumbo-nav {
    display: none;
    width: 100%;
}

.jumbo-nav__open #jumbo-nav{
    display: block;
    padding-bottom: var(--spacing);
}

#jumbo-nav nav {
    display: grid;
    -moz-column-gap: 1rem;
         column-gap: 1rem;
    row-gap: var(--spacing);
    grid-template-columns: repeat(2, 1fr);

    color: var(--jumbo-nav-text-color);
    font-size: .9rem;

    padding: 0 var(--gutter);
    width: 100%;
}

#jumbo-nav dl:not(.community) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

#jumbo-nav dl:not(.community) dt {
    border-bottom: 1px solid;
    margin-bottom: 0.5rem;
    height: 20px;
}

#jumbo-nav dl.community {
    margin-top: 0.5rem;
}

#jumbo-nav dl.community dd:first-of-type{
    margin-bottom: 1rem;
}

#jumbo-nav dl.community dd:nth-of-type(2) a {
    text-decoration: none;
    display: inline-block;
    height: 31px;
    width: 88px;
}

#jumbo-nav dl.community:last-child dd:first-of-type {
    margin-bottom: 0;
}

#jumbo-nav dl.community dd:nth-of-type(2) a:hover{
    box-shadow: 0 0 10rem var(--jumbo-nav-anchor-color);
}

#jumbo-nav dt {
    text-transform: uppercase;
    font-size: 80%;
}

#jumbo-nav dt,
#jumbo-nav .footer {
    grid-column: span 2;
}

#jumbo-nav .footer {
    margin-top: .5rem;
}

#jumbo-nav dd {
    margin: 0;
}

#jumbo-nav dd a {
    text-decoration: none;
    color: var(--jumbo-nav-text-color);
}

#jumbo-nav dd span:first-child {
    color: var(--jumbo-nav-anchor-color);
    margin-right: 0.3rem;
    font-size: smaller;
}

#jumbo-nav dd span:nth-child(2) {
    border-bottom: 1px solid var(--jumbo-nav-anchor-color);
}

#jumbo-nav dd a:hover span:first-child {
    color: var(--jumbo-nav-anchor-hover-color);
}

#jumbo-nav dd a:hover span:nth-child(2) {
    border-bottom-color: var(--jumbo-nav-anchor-hover-color);
}

#jumbo-nav div {
    grid-column-end: span 2;
    border-top: 1px solid;
}

#jumbo-nav div a {
    color: var(--jumbo-nav-anchor-color);
    text-decoration: underline;
}

@media (max-width: 425px) {
    #jumbo-nav nav {
        display: flex;
        flex-direction: column;
    }
}

table {
    font-family: var(--monospaced-font-stack);
    border-collapse: collapse;
    width: 100%;
    font-size: 1rem;
}

table tbody th {
    margin-right: 1rem;
}

table tfoot {
    border-top: 4px double;
}

th, td {
    text-align: left;
}

.stats__post-graphs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

.stats__post-graphs header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1em;
    grid-column: span 2;
    margin-bottom: 0;
}

.stats__post-graphs header h2 {
    flex-grow: 1;
}

.epg{
    font-family: var(--monospaced-font-stack);
}

.epg__year{
    font-size: 1rem;
}

.epg__months{
    font-size: 0.8rem;
}

@media (min-width: 864px){
    .stats__header > header {
        flex-direction: row;
    }

    .stats__header > header div:first-child {
        flex-grow: 1;
    }

    .stats__header > header img {
        align-self: end;
    }
}

@media (max-width: 864px) {
    .stats__post-graphs {
        grid-template-columns: 1fr;
    }

    .stats__post-graphs header {
        grid-column: 1;
    }

    .stats__header > header img {
        margin-top: 1em;
    }
}

html:root, html[data-theme="classic"], [data-theme="classic"] {
    --spacing: 1.5rem;
    --gutter: 40px;
    --left-margin: 330px;

    --page-background: #1b1a1d;
    --page-background-offset: #7e6a51;
    --page-text-colour: #fff1e0;
    --page-border-colour: #fff1e0;

    /* Block elements such as <pre> or any tag that needs a colour blocking. */
    --page-block-colour: #230520;

    --page-key-colour: #ff353f;
    --page-key-colour-contrast: #990054;
    --category-background: #4a3677;
    --category-text-colour: #fff1e0;

    --stats-box: #ecdbc6;
    --stats-box-highlight: #33439b;

    --jumbo-nav-background-color: #001d21;
    --jumbo-nav-text-color: #fff1e0;
    --jumbo-nav-accent-color: rgb(205 203 255);
    --jumbo-nav-anchor-color: rgb(205 203 255);
    --jumbo-nav-anchor-hover-color: #ff353f;

    /* #ff353f14 */

    /* Markdown Alert Colours */
    --highlight-color-note: #0969da;
    --background-color-note: rgba(9, 105, 218, 0.1);
    --highlight-color-tip: #1a7f37;
    --background-color-tip: rgba(26, 127, 55, 0.1);
    --highlight-color-warning: #9a6700;
    --background-color-warning: rgba(154, 103, 0, 0.1);
    --highlight-color-severe: #bc4c00;
    --background-color-severe: rgba(188, 76, 0, 0.1);
    --highlight-color-caution: #ff353f;
    --background-color-caution: rgba(255, 53, 63, 0.1);
    --highlight-color-important: #8250df;
    --background-color-important: rgba(130, 80, 223, 0.1);
}

html[data-theme="chocolate-thunda"], [data-theme="chocolate-thunda"] {
    --page-background: #34252F;
    --page-background-offset: #3B5249;
    --page-text-colour: #BEC5AD;
    --page-key-colour: #519872;
    --page-border-colour: #3B5249;

    --category-background: #519872;
    --category-text-colour: #34252F;
}

html[data-theme="blue"], [data-theme="blue"] {
    --page-background: #234E70;
    --page-background-offset: #426682;
    --page-text-colour: #FBF8BE;
    --page-border-colour: #bdc5ad;
    --page-key-colour: #fbbc55;

    --category-background: #bdc5ad;
    --category-text-colour: #234E70;
}

html[data-theme="blush"], [data-theme="blush"] {
    --page-background: #eddad1;
    --page-background-offset: #edc8b7;
    --page-text-colour: #113d6a;
    --page-border-colour: #795548;
    --page-key-colour: #ab3c61;

    --category-background: #795548;
    --category-text-colour: #eddad1;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--page-text-colour) var(--page-background);
    min-height: 100vh;
    overflow-y: scroll;
}

/*
  Josh's Custom CSS Reset (with modifications)
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

body {
    font-family: "Iosevka Etoile", monospace;
    letter-spacing: -0.02em;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
    font-variant-ligatures: contextual;
    font-size: clamp(1rem, .9583rem + .1667vw, 1.125rem);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background: var(--page-background);
    color: var(--page-text-colour);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
    color: var(--page-text-colour);
    inline-size: clamp(80vw, 100vw, 80rem);
    padding-inline: var(--gutter);
    padding-block: var(--gutter);
    margin-inline: auto;
    border-image-slice: 0 fill;
    border-image-outset: 0 0 0 100vw;
    border-image-source: conic-gradient(#34252f 0 0);
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

a {
    color: var(--page-key-colour);
}

a:hover {
    text-decoration: none;
}

a.nav__on {
    color: var(--page-key-colour-contrast);
}

hr {
    height: 1px;
    border: none;
    background: var(--page-border-colour);
}

figcaption {
    font-size: 1rem;
    margin-top: 0.5rem;
}

figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/*
 * Main Header
 */

.header-main {
    background: transparent;
    inline-size: clamp(80vw, 100vw, 80rem);
    margin-inline: auto;

    > div {
        padding: calc(var(--gutter) / 2) var(--gutter);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    hr {
        margin-top: 1ch;
    }

    svg {
        width: 1rem;
        height: 1rem;
    }
}

.header-main__logo a:not(.nav__on) {
    color: inherit;

    &:hover {
        color: var(--page-key-colour);
    }
}

.header-main__logo > div {
    display: flex;
    gap: 1ch;
}

.header-main__menu {
    display: flex;
    align-items: flex-start;
    gap: 1ch;

    button, input {
        height: 30px;
    }
}

.jumbo-nav__open .header-main {
    background: var(--jumbo-nav-background-color);
    color: var(--jumbo-nav-text-color);

    /* fill in the left side with colour */
    border-image-slice: 0 fill;
    border-image-outset: 0 0 0 100vw;
    border-image-source: conic-gradient(var(--jumbo-nav-background-color) 0 0);
}

/*
 * Theme Picker
 */

.theme-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: var(--page-background-offset);
    box-shadow: 0 1px 0 0 rgb(0 0 0 / 10%);
    height: 0;
    overflow: hidden;
    position: relative;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    ul {
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow-y: hidden;
        overflow-x: auto;
        text-align: center;
        overflow-scrolling: touch;
        padding: 1rem 1.5rem 2rem;

        li {
            display: inline-block;
            position: relative;
            border-radius: .5em;
        }

        li + li {
            margin-left: 1rem;
        }

        button {
            display: block;
            padding: 1em;
            border-radius: .5em;
            border: 1px solid rgba(0, 0, 0, .1);
            width: 100%;
            text-align: center;
            background-color: var(--page-background);
            color: var(--page-text-colour);
            cursor: pointer;
            font-size: 0.75rem;
            transform: scale(1);
            transition: transform .2s cubic-bezier(.4, 0, .2, 1);
            position: relative;

            &:hover {
                transform: scale(1.05);
            }
        }
    }
}

.theme-picker__title {
    padding-top: 1rem;
    font-size: 1.4rem;
    color: var(--page-background);
}

.theme-selector-btn__current::after {
    position: absolute;
    content: '';
    display: block;
    background: var(--page-text-colour);
    width: 10px;
    height: 10px;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 100%;
}

.theme-picker__swatches {
    display: block;
    padding: .125em 0;

    span {
        display: inline-block;
        width: 22px;
        height: 22px;
        border-radius: 100%;
        background-color: black;
        border: 2px solid white;
    }

    span + span {
        margin-left: -0.995em;
    }

    .background-offset {
        background-color: var(--page-background-offset);
    }

    .text {
        background-color: var(--page-text-colour);
    }

    .border {
        background-color: var(--page-border-colour);
    }

    .key {
        background-color: var(--page-key-colour);
    }

    .category {
        background-color: var(--category-background);
    }

}

body.theme-picker__visible .theme-picker {
    height: 11rem;
}

/*
 * Styles shared between Page Types
 */

/* TODO: remove .filled-boxes ?? */

.filled-boxes {
    display: flex;
    font-size: .875rem;
    letter-spacing: .0725rem;

    span, button {
        width: -moz-fit-content;
        width: fit-content;
        height: 30px;
        display: flex;
        align-items: center;
        border: 1px solid var(--category-background);
        background: var(--category-background);
        color: var(--category-text-colour);
        line-height: 1.29;
        padding: 6px 12px;
        font-weight: lighter;
    }

    span + span, button + span {
        background: var(--category-text-colour);
        color: var(--category-background);
    }

    a {
        color: inherit;
    }

    a:hover {
        text-decoration: none;
        color: #ff8af2;
    }

    button {
        cursor: pointer;
    }

    button:hover {
        background: var(--page-border-colour);
    }
}

ol.list__alphabet,
ul.list__alphabet {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1ch;
    flex-wrap: wrap;
}

.article-section__content-content {
    h2, h3, h4, h5, h6 {
        margin-top: calc(var(--spacing) * 2);
    }

    > * {
        margin-bottom: var(--spacing);
    }

    > :first-child {
        margin-top: 0;
    }

    > ul, > ol {
        padding-left: var(--spacing);
    }

    hr {
        width: 1.5ch;
        padding: 0;
        height: 1.5px;
        background: var(--page-text-colour);
    }

    picture > img {
        height: auto;
    }

    :not(pre) > code {
        font-size: 0.9em;
        background: var(--page-text-colour);
        color: var(--page-background);
        padding: 0 0.3em;
    }

    pre {
        font-size: 1rem;
    }

    /* Overwrite padding set by Prism */

    pre[class*="language-"] {
        padding-block: 1rem;
        padding-left: 0;
        margin: var(--spacing) 0;

        border-image-slice: 0 fill;
        border-image-outset: 0 0 0 100vw;
        border-image-source: conic-gradient(#0f091b 0 0);
        scrollbar-color: #faf1e0 #0d091a;
    }

    pre:not([class*="language-"]) {
        background: var(--page-block-colour);
        color: var(--page-text-colour);
        padding: 1rem;
    }

    small {
        font-size: 60%;
    }

    li {
        margin-bottom: calc(var(--spacing) / 4);
    }
}

.article-section__content-footer {
    h3 {
        margin-bottom: var(--spacing);
    }

    ol, ul {
        font-size: 1rem;
        padding-left: 0;
    }

    li {
        margin-bottom: calc(var(--spacing) / 4);
    }
}

#backlinks ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    font-size: 0.9rem;
    list-style-position: inside;
}

/*
 * Page Type: Default
 */

.page__default, .page__homepage {
    article {
        display: flex;
        flex-direction: column;
        gap: calc(var(--gutter) * 2);
        padding-block: var(--gutter);

        h1 {
            font-size: clamp(2rem, 6vw, 5rem);
            line-height: 1;
        }
        section {
            font-size: clamp(1rem, 6vw, 1.2rem);

            > :first-child{
                font-size: clamp(1.2rem, 6vw, 1.4rem);
            }

            > * {
                margin-bottom: var(--spacing);
                max-width: 1000px;
                width: 100%;
            }

            ul {
                margin-left: var(--spacing);
            }
        }
    }
}

/*
 * Page Type: Homepage
 * Only difference to page__default is this has two columns
 */

.page__homepage {
    /* https://www.gradientmagic.com/collection/subtlegrid/gradient/1577121168721 */
    background-image: repeating-linear-gradient(0deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(67.5deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(157.5deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(112.5deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(22.5deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(0deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(112.5deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),repeating-linear-gradient(22.5deg, hsla(83,0%,53%,0.03) 0px, hsla(83,0%,53%,0.03) 1px,transparent 1px, transparent 12px),linear-gradient(90deg, rgb(27,26,29),rgb(52,37,47));

    main {
        box-shadow: 0 5px 50px #1b1a1d82;
    }

    article {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: calc(var(--gutter) * 2);
        padding-block: var(--gutter);

        h1 {
            font-size: clamp(2rem, 6vw, 5rem);
            line-height: 1;

            strong {
                color: #35ff88;
            }
        }

        section {
            font-size: clamp(1.2rem, 6vw, 1.6rem);
            line-height: 1.25;

            > :first-child {
                font-size: clamp(1.2rem, 6vw, 2rem);
            }
        }
    }
}

/*
 *  Page Type: Article, List
 */

.page__list,
.page__article {
    main > article > header {
        display: grid;
        grid-template-areas:
                "category category"
                "meta date"
                "title title"
                "seperator seperator"
                ". reading-time";
        grid-template-columns: minmax(0, 1fr) max-content;

        h1 {
            font-size: clamp(2rem, 6vw, 5rem);
            line-height: 1;
        }

        h2 {
            margin-top: var(--spacing);
            font-size: clamp(1rem, 6vw, 2rem);
            line-height: 1.25;
        }

        hr {
            grid-area: seperator;
            margin-top: 2rem;
            margin-bottom: calc(var(--gutter) / 2);
        }
    }

    .article-header__title {
        grid-area: title;
        grid-column: 1;
    }

    .article-header__category {
        grid-area: category;
        margin-bottom: var(--spacing);
    }

    .article-header__date {
        grid-area: date;
        align-self: end;
        justify-self: end;
        margin-bottom: var(--spacing);
        padding-bottom: calc(var(--spacing) / 2);
    }

    .article-header__stats {
        font-size: 0.9rem;
        grid-area: reading-time;
        align-self: end;
        justify-self: end;
    }

    .article-header__meta {
        grid-area: meta;
        display: grid;
        gap: 10px;
        grid-template-columns: max-content auto;
        margin-bottom: var(--spacing);

        span:first-child {
            border-bottom: 1px solid var(--page-border-colour);
            padding-bottom: calc(var(--spacing) / 2);
        }
    }

    article > section {
        padding-block: var(--gutter);
    }

    article > hr {
        margin-block: calc(var(--gutter) / 2);
    }

    .article-section__content {
        display: flex;
        flex-wrap: wrap;
        gap: calc(var(--gutter) / 2);
        padding-top: calc(var(--gutter) / 2);
    }

    .article-section__content-abstract {
        width: 100%;
        padding-right: var(--left-margin);
        margin-bottom: var(--gutter);
        font-size: clamp(1rem, 6vw, 2rem);
        line-height: 1.25;
    }

    .article-section__content-content {
        flex: 1 1 0;
        min-width: 0; /* Allows flex item to shrink below content size */
        max-width: 100%;

        figure:not(.citation) {
            margin-right: 0;
            max-width: 100%;
        }

        /* Allow certain elements to expand into reference column */
        .full-width {
            margin-right: calc(-250px - var(--gutter) / 2);
            max-width: calc(100% + 250px + var(--gutter) / 2);
        }
    }

    .article-section__content-ref {
        flex: 0 0 250px;
        font-size: 0.8rem;
        padding-top: 1rem;
        border-top: 1px solid var(--page-border-colour);
        order: 2;
    }

    .article-section__content-toc {
        flex: 0 0 var(--left-margin);
        font-size: 0.8rem;
        padding-top: 1rem;
        border-top: 1px solid var(--page-border-colour);
        display: flex;
        flex-direction: column;
        gap: 1rem;
        order: 3;
    }

    .article-section__content-toc > nav {
        position: sticky;
        top: var(--gutter);
    }

    .article-section__content-footer {
        flex: 1 1 0;
        min-width: 0;
        border-top: 1px solid var(--page-border-colour);
        padding-top: var(--spacing);
    }
}

/* Mobile responsive breakpoints */

@media (max-width: 1200px) {
    .page__list,
    .page__article {
        .article-section__content-abstract {
            padding-right: 0;
        }

        .article-section__content-content {
            figure:not(.citation),
            pre[class*="language-"],
            .full-width {
                margin-right: 0;
                max-width: 100%;
            }
        }

        .article-section__content-toc {
            display: none; /* Hide TOC on medium screens */
        }
    }
}

@media (max-width: 768px) {
    .page__list,
    .page__article {
        .article-section__content {
            flex-direction: column;
        }

        .article-section__content-ref {
            order: 4;
            flex: 1 1 auto;
        }
    }
}

/**
 * Quotes
 */

figure.citation blockquote {
    font-size: 2rem;
    line-height: 1.2;

    border-left: 6px solid;
    padding-left: 1rem;
}

figure.citation figcaption {
    padding-left: calc(1rem + 6px);

    &::before {
        content: '↑';
        font-weight: bold;
        margin-right: 1ch;
        background: var(--page-border-colour);
        color: var(--page-background);
        aspect-ratio: 1;
        display: inline-block;
        width: 2ch;
        text-align: center;
    }
}

/*
 *  Page Type: Article, List
 */

.markdown-alert {
    font-size: 1.2rem;
    margin: var(--spacing) 0;
    padding: var(--spacing) !important;
    border: 1px solid var(--page-key-colour);
    border-left-width: .25em;

    p {
        font-size: 1em;
        font-family: sans-serif;
    }

    > :first-child {
        margin-top: 0;
    }

    > :last-child {
        margin-bottom: 0;
    }

    .markdown-alert-title {
        display: inline-flex;
        color: var(--page-background);
        align-items: center;
        line-height: 1;
        padding: 1px 4px;
        margin-bottom: calc(var(--spacing) / 2);

        .octicon {
            margin-right: 0.5rem;
            display: inline-block;
            overflow: visible !important;
            vertical-align: text-bottom;
            fill: currentColor;
        }
    }

    &.markdown-alert-note {
        border-color: var(--highlight-color-note);
        background: var(--background-color-note);

        .markdown-alert-title {
            background: var(--highlight-color-note);
        }

        a {
            color: var(--highlight-color-note);
        }
    }

    &.markdown-alert-important {
        border-color: var(--highlight-color-important);
        background: var(--background-color-important);

        .markdown-alert-title {
            background: var(--highlight-color-important);
        }

        a {
            color: var(--highlight-color-important);
        }
    }

    &.markdown-alert-warning {
        border-color: var(--highlight-color-warning);
        background: var(--background-color-warning);

        .markdown-alert-title {
            background: var(--highlight-color-warning);
        }

        a {
            color: var(--highlight-color-warning);
        }
    }

    &.markdown-alert-tip {
        border-color: var(--highlight-color-tip);
        background: var(--background-color-tip);

        .markdown-alert-title {
            background: var(--highlight-color-tip);
        }

        a {
            color: var(--highlight-color-tip);
        }
    }

    &.markdown-alert-caution {
        border-color: var(--highlight-color-caution);
        background: var(--background-color-caution);

        .markdown-alert-title {
            background: var(--highlight-color-caution);
        }

        a {
            color: var(--highlight-color-caution);
        }
    }
}

/*
 * Page Type: List
 */

.page__list .article-section__content {
    padding-block: calc(var(--gutter) / 2);
}

.page__list .article-section__content-content {
    font-size: clamp(1rem, 6vw, 1.5rem);
}

.page__list .article-section__content-content > * {
    padding-right: var(--left-margin);
}

.page__list .article-section__content-content p:first-child {
    font-size: clamp(1.2rem, 6vw, 2rem);
    line-height: 1.25;
    padding-right: 0;
}

.page__list .article-section__content-content :last-child {
    margin-bottom: 0;
}

.page__list .article-section__content-footer {
    margin-left: 0;
}

/*
 * Component: Book Listing
 *
 * The source code for this component was taken from Robin Spielmann's media page. It has been modified slightly to fit
 * the style of this website. The original source code is MIT licensed and can be found on GitHub below:
 *
 * @see https://www.iamrob.in/media
 * @see https://github.com/iam-robin/personal-website/blob/main/src/components/books/book-item.css
 */

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--gutter);

    a {
        text-decoration: none;
    }

    a:hover h3 {
        text-decoration: underline;
    }

    p {
        color: var(--page-text-colour);
    }

    .book-wrap {
        padding: 5rem 1rem;
        background: #d7673c14;
        border-radius: 0.5rem;
        display: flex;
        justify-content: center;
    }

    .book {
        width: 140px;
        height: 200px;
        position: relative;
        text-align: center;
    }

    .book .cover {
        position: absolute;
        z-index: 1;
        width: 100%;
        height: 100%;
        transform-origin: 0 50%;
        -webkit-transform-origin: 0 50%;
        background: #cbd5e1;
        background-size: cover;
        background-position: center;
        border-radius: 3px;
        box-shadow: inset 4px 1px 3px #ffffff60,
        inset 0 -1px 2px #00000080;
        transition: all 0.5s ease-in-out;
        -webkit-transition: all 0.5s ease-in-out;
    }

    .book .cover.cover__placeholder > div {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        padding: 10px;
        font-size: 0.65rem;
    }

    .effect {
        width: 20px;
        height: 100%;
        margin-left: 10px;
        border-left: 2px solid #00000010;
        background-image: linear-gradient(
                90deg,
                rgba(255, 255, 255, 0.2) 0%,
                rgba(255, 255, 255, 0) 100%
        );
        transition: all 0.5s ease;
        -webkit-transition: all 0.5s ease;
    }

    .light {
        width: 90%;
        height: 100%;
        position: absolute;
        border-radius: 3px;
        background-image: linear-gradient(
                90deg,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.2) 100%
        );
        top: 0;
        right: 0;
        opacity: 0.1;
        transition: all 0.5s ease;
        -webkit-transition: all 0.5s ease;
    }

    .book-item:hover {
        .cover {
            transform: perspective(2000px) rotateY(-30deg);
            -webkit-transform: perspective(2000px) rotateY(-30deg);
            transform-style: preserve-3d;
            -webkit-transform-style: preserve-3d;
            box-shadow: inset 4px 1px 3px #ffffff60,
            inset 0 -1px 2px #00000080,
            10px 0 10px -5px #00000030;
        }

        .effect {
            width: 40px;
        }

        .light {
            opacity: 1;
            width: 70%;
        }
    }

    .book-inside {
        width: calc(100% - 2px);
        height: 96%;
        position: relative;
        top: 2%;
        border: 1px solid grey;
        border-radius: 3px;
        background: white;
        box-shadow: 10px 40px 40px -10px #00000030,
        inset -2px 0 0 grey,
        inset -3px 0 0 #dbdbdb,
        inset -4px 0 0 white,
        inset -5px 0 0 #dbdbdb,
        inset -6px 0 0 white,
        inset -7px 0 0 #dbdbdb,
        inset -8px 0 0 white,
        inset -9px 0 0 #dbdbdb;
    }
}

/*
 * Component: Post Listing
 * Displays a table listing of posts.
 */

.post-list__inline-header {
    display: flex;
    align-items: center;

    h3 {
        font-size: 2.5rem;
        flex-grow: 1;
    }

    span {
        font-family: monospace;
        font-weight: bold;
    }
}

.post-list__chronological {
    list-style: none;
    padding: 0;

    h2 {
        text-decoration-line: underline;
        color: var(--page-key-colour);
        font-size: 1.2rem;
    }

    li a {
        position: relative;
        /*padding: 8px;*/
        gap: 0.5rem;
        min-height: calc(var(--spacing) * 2);
        isolation: isolate;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        font-size: clamp(1rem, 6vw, 1.5rem);
        text-decoration: none;
        color: inherit;
    }

    li a:hover h2 {
        text-decoration-color: var(--category-background);
    }

    .title {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        flex-shrink: 0;
        gap: 0.5rem;
    }

    .summary {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-shrink: 0;
        width: 100%;
        gap: 0.5rem;
        font-size: 1rem;

        .extra {
            display: flex;
        }

        .summary__content {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .summary__content > * {
            height: 18px;
            font-size: 0.7rem;
            padding: 0 0.25rem;
            width: -moz-fit-content;
            width: fit-content;
            border: 1px solid var(--category-background);
            background: var(--category-background);
            color: var(--category-text-colour);
        }

        .summary__content::after {
            content: '|';
            line-height: 1;
            margin-top: -2px;
        }
    }

    hr, .title .extra {
        display: none;
    }
}

@media (min-width: 1024px) {
    .post-list__chronological {
        li a {
            flex-direction: row;
            align-items: center;
        }

        .title {
            align-items: center;
        }

        .title .extra {
            display: flex;
            align-items: center;
            font-size: 1rem;
            gap: 0.5rem;
        }

        .title .extra::before {
            content: '|';
            display: inline-block;
        }

        .title .extra .subtitle {
            text-transform: uppercase;
        }

        .summary {
            width: -moz-fit-content;
            width: fit-content;

            .extra {
                display: none;
            }
        }

        hr {
            display: flex;
            width: 100%;
        }
    }
}

/*
 * Misc
 */

.rabbit-hole-img {
    float: right;
    margin: -380px 0 0 !important;
}
