/* Fonts */
@font-face {
    font-family: 'GlitchGoblin';
    src: url("../fonts/GlitchGoblin-2O87v.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: '9801';
    src: url("../fonts/9801-qMy5.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

/* Root defaults */
html {
    scroll-behavior: smooth;
    background-color: #000;
    color: #0f6;
    font-family: "9801", "Courier New", Courier, monospace;
    letter-spacing: 0.03em;
    line-height: 1.5;
    font-size: 20px;
}

/* Page container */
body {
    min-height: 100vh;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    max-width: 70ch;
    font-size: 1rem;
    overflow-x: hidden;
}

/* Footer */
footer {
    font-family: sans-serif;
}

/* Headings */
h1,
h2 {
    font-family: 'GlitchGoblin', sans-serif;
    line-height: 1.2;
    margin: 0 0 0.75rem 0;
    overflow-wrap: break-word;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

/* Links */
a {
    color: #0d0;
    text-decoration: none;
    display: inline-block;
    padding: 0.1em 0;
}

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

/* Paragraphs */
p {
    margin: 0 0 0.75rem 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Blog content images */
.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Image alignment (default desktop behavior) */
.blog-content .image-style-align-left {
    float: left;
    margin: 0 1rem 1rem 0;
}

.blog-content .image-style-align-right {
    float: right;
    margin: 0 0 1rem 1rem;
}

.blog-content .image-style-align-center {
    margin: 1rem auto;
}

/* ============================= */
/* Extra small devices (≤ 600px) */
/* ============================= */
@media only screen and (max-width: 600px) {
    body {
        padding: 0.75rem;
        font-size: 0.95rem;
        max-width: 100%;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    /* Disable floats on mobile */
    .blog-content .image-style-align-left,
    .blog-content .image-style-align-right {
        float: none;
        margin: 1rem auto;
        display: block;
    }

    .blog-content img {
        margin: 0.75rem auto;
    }

    footer {
        text-align: center;
        font-size: 0.85rem;
    }
}

/* =============================================== */
/* Small devices (portrait tablets, ≥ 600px) */
/* =============================================== */
@media only screen and (min-width: 600px) {
    body {
        font-size: 1rem;
        padding: 1rem;
        max-width: 60ch;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* ===================================== */
/* Medium devices (landscape tablets ≥768px) */
/* ===================================== */
@media only screen and (min-width: 768px) {
    body {
        max-width: 65ch;
        font-size: 1.05rem;
    }

    .blog-content .image-style-align-left {
        float: left;
        margin: 0 1.25rem 1rem 0;
    }

    .blog-content .image-style-align-right {
        float: right;
        margin: 0 0 1rem 1.25rem;
    }
}

/* ================================ */
/* Large devices (desktops ≥ 992px) */
/* ================================ */
@media only screen and (min-width: 992px) {
    body {
        max-width: 70ch;
        font-size: 1.1rem;
        padding: 1.25rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }
}

/* ===================================== */
/* Extra large devices (≥ 1200px) */
/* ===================================== */
@media only screen and (min-width: 1200px) {
    body {
        max-width: 72ch;
        font-size: 1.15rem;
    }
}
