@font-face {
    font-family: "MapleMono";
    src: url("fonts/MapleMono-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "MapleMono";
    src: url("fonts/MapleMono-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "MapleMono";
    src: url("fonts/MapleMono-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: "MapleMono";
    src: url("fonts/MapleMono-BoldItalic.ttf") format("truetype");
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: "GochiHand";
    src: url("fonts/GochiHand-Regular.ttf") format("truetype");
    font-weight: 400;
}

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

:root {
    --bg: #faf8f4;
    --ink: #1a1a18;
    --muted: #6b6860;
    --accent: #e85d26;
    --accent-light: #fff0e8;
    --rule: #d8d4cc;
    --max: 720px;
}

html {
    background: var(--bg);
    color: var(--ink);
    font-family: "MapleMono", "Comic Sans MS", cursive;
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: 0.02em;
    word-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

body {
    max-width: var(--max);
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* ---- Headings ---- */
h1,
h2,
h3 {
    font-family: "GochiHand", cursive;
    font-weight: 400;
    line-height: 1.15;
    color: var(--ink);
}

h1 {
    font-size: 3.2rem;
    margin-bottom: 0.2em;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    display: block;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 6px;
}

h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    color: var(--ink);
}

/* ---- Paragraphs ---- */
p {
    margin-bottom: 1rem;
    color: var(--ink);
}

/* ---- Lists ---- */
ul,
ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

ul li::marker {
    color: var(--accent);
}

ol li::marker {
    color: var(--accent);
    font-weight: 700;
}

/* nested lists */
li ul,
li ol {
    margin-top: 0.3rem;
    margin-bottom: 0;
}

/* ---- Blockquote ---- */
blockquote {
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--muted);
}

blockquote p {
    margin: 0;
    color: inherit;
}

/* ---- Horizontal rule ---- */
hr {
    border: none;
    border-top: 2px dashed var(--rule);
    margin: 3rem 0;
}

/* ---- Code ---- */
code {
    font-family: "Courier New", monospace;
    background: #efede8;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--accent);
}

pre {
    background-color: #24292e;
    color: #e1e4e8;
    padding: 0.5rem 1rem;
    line-height: 1.2;
    border-radius: 4px;
    margin-bottom: 1rem;
}

pre code {
    background: none;
}

/* ---- Emphasis ---- */
em {
    color: var(--muted);
}

strong {
    color: var(--ink);
    font-weight: 700;
}

/* ---- Images ---- */
img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--rule);
    display: block;
}

/* ---- Subtle page intro flair ---- */
body > h1:first-child {
    margin-top: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 540px) {
    body {
        padding: 2rem 1.25rem 4rem;
    }
    h1 {
        font-size: 2.4rem;
    }
    h2 {
        font-size: 1.6rem;
    }
}
