@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap");


/* ============================================================
   Base
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "Lato", sans-serif;
    font-size: 18px;
    line-height: 1.8;

    color: #292929;

    background:
        radial-gradient(
            circle at center,
            #666 0%,
            #515151 70%,
            #464646 100%
        );

    padding: 50px 20px;
}


/* ============================================================
   Notebook page
   ============================================================ */

.notebook-page {
    position: relative;

    width: 100%;
    max-width: 820px;

    min-height: calc(100vh - 100px);

    margin: 0 auto;

    padding: 65px 75px 55px 100px;

    background-color: #fffefb;

    /*
     * Notebook ruling.
     */
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 35px,
            rgba(90, 135, 165, 0.15) 36px,
            transparent 37px
        );

    /*
     * Very subtle paper variation.
     */
    background-blend-mode: multiply;

    border-radius: 2px;

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.28),
        0 4px 10px rgba(0, 0, 0, 0.16);
}


/* ============================================================
   Notebook red margin
   ============================================================ */

.notebook-page::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 68px;

    width: 1px;

    background: rgba(185, 80, 80, 0.35);

    pointer-events: none;
}


/* ============================================================
   Header
   ============================================================ */

.entry-header {
    position: relative;

    margin-bottom: 40px;
}

.entry-header h1 {
    margin: 0;

    font-size: 2rem;
    line-height: 1.25;

    font-weight: 700;

    color: #252525;
}

.entry-date {
    margin-bottom: 2px;

    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #777;
}


/* ============================================================
   Content
   ============================================================ */

.entry-content {
    position: relative;
}

.entry-content p {
    margin: 0 0 1.4em;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

.entry-content strong {
    font-weight: 700;
}

.entry-content em {
    font-style: italic;
}


/* ============================================================
   Links
   ============================================================ */

.entry-content a {
    color: #315f7d;

    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: #1d4058;
}


/* ============================================================
   Lists
   ============================================================ */

.entry-content ul,
.entry-content ol {
    margin-top: 0;
    margin-bottom: 1.5em;

    padding-left: 1.5em;
}


/* ============================================================
   Quotes
   ============================================================ */

.entry-content blockquote {
    margin: 1.5em 0;

    padding: 0.7em 1.25em;

    border-left: 3px solid rgba(185, 80, 80, 0.45);

    color: #555;

    font-style: italic;
}


/* ============================================================
   Code
   ============================================================ */

.entry-content code {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.88em;

    background: rgba(0, 0, 0, 0.05);

    padding: 0.15em 0.35em;

    border-radius: 3px;
}

.entry-content pre {
    overflow-x: auto;

    padding: 1em;

    background: rgba(0, 0, 0, 0.05);

    border-radius: 4px;
}


/* ============================================================
   Images
   ============================================================ */

.entry-content img {
    max-width: 100%;
    height: auto;

    display: block;

    margin: 2em auto;
}


/* ============================================================
   Navigation
   ============================================================ */

.entry-navigation {
    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 20px;

    margin-top: 70px;
    padding-top: 20px;

    border-top: 1px solid rgba(0, 0, 0, 0.10);

    font-size: 0.9rem;
}

.entry-navigation a {
    color: #666;

    text-decoration: none;
}

.entry-navigation a:hover {
    color: #315f7d;
}

.entry-navigation .previous {
    text-align: left;
}

.entry-navigation .index-link {
    text-align: center;

    letter-spacing: 0.04em;
}

.entry-navigation .next {
    text-align: right;
}


/* ============================================================
   Index page
   ============================================================ */

.entries {
    list-style: none;

    margin: 0;
    padding: 0;
}

.entries li {
    margin-bottom: 0.5em;
}

.entries a {
    color: #315f7d;

    text-decoration: none;
}

.entries a:hover {
    text-decoration: underline;
}


/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 700px) {

    body {
        padding: 0;
    }

    .notebook-page {
        min-height: 100vh;

        padding:
            50px
            28px
            45px
            55px;

        border-radius: 0;

        box-shadow: none;
    }

    .notebook-page::before {
        left: 35px;
    }

    body {
        font-size: 17px;
    }

    .entry-header h1 {
        font-size: 1.7rem;
    }

    .entry-navigation {
        gap: 10px;

        font-size: 0.82rem;
    }
}


/* ============================================================
   Very small phones
   ============================================================ */

@media (max-width: 400px) {

    .notebook-page {
        padding-left: 45px;
        padding-right: 20px;
    }

    .notebook-page::before {
        left: 28px;
    }

    .entry-navigation {
        grid-template-columns: 1fr 1fr;

        grid-template-areas:
            "previous next"
            "index index";

        row-gap: 15px;
    }

    .entry-navigation .previous {
        grid-area: previous;
    }

    .entry-navigation .next {
        grid-area: next;
    }

    .entry-navigation .index-link {
        grid-area: index;
    }
}
