@import url("https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css");

:root {
    --paper: #fbfbf6;
    --paper-fade: rgba(251, 251, 246, 0);
    --ink: #0d0d12;
    --muted: #484a55;
    --rule: #3f4148;
    --overlay: #fbfbf6;
}

html {
    min-height: 100vh;
    background: #d8d8d2;
    overflow-x: hidden;
    scroll-behavior: auto;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    color: var(--ink);
    font-family:
        "KaTeX_Main",
        "Latin Modern Roman",
        "CMU Serif",
        "Computer Modern Serif",
        serif;
    line-height: 1.45;
}

*,
*::before,
*::after {
    animation: none !important;
    transition: none !important;
}

body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    pointer-events: none;
}

body::before {
    left: 0;
    width: min(40em, calc(100vw - 8em));
    background: var(--paper);
    z-index: 1;
}

body::after {
    left: min(40em, calc(100vw - 8em));
    width: 8em;
    background: linear-gradient(90deg, var(--paper), var(--paper-fade));
    z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.1em;
    font-style: normal;
}

ul {
    list-style-type: "→ ";
    margin-top: 0.5em;
    padding-left: 1.35em;
}

ul ul {
    list-style-type: "» ";
    margin-top: 0.25em;
}

li {
    margin-bottom: 0.75em;
}

ul ul li {
    margin-bottom: 0.5em;
}

a {
    color: inherit;
}

hr {
    border: 0;
    margin: 1em 0;
    border-top: 1px solid var(--rule);
}

.hero {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--overlay);
    opacity: 0.6;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.title {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 2em);
    max-width: 36em;
    margin: 0;
    padding: 3.5em 7em 4em 3em;
    box-sizing: border-box;
}

.title > h1 {
    font-size: 2.1rem;
}

.title > h2 {
    max-width: 27em;
    font-size: 1em;
    font-weight: normal;
    color: var(--muted);
}

.last-edited {
    margin-bottom: 0.35em;
    font-size: 0.8em;
    color: var(--muted);
}

.title h3[onclick] {
    cursor: pointer;
}

.title p,
.title li,
.lastfm-text,
.view-counter {
    line-height: 1.5;
}

.lastfm {
    display: flex;
    gap: 1em;
    margin-top: 0.5em;
    align-items: flex-start;
}

.lastfm img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.5);
}

.lastfm-text {
    min-width: 0;
}

#lastfm-title {
    margin: 0.125em 0;
    font-size: 1em;
    font-style: normal;
}

#lastfm-artist,
#lastfm-time,
#music,
#artist,
#album,
.view-counter {
    font-family: inherit;
}

#lastfm-artist,
#lastfm-time,
#music,
#artist,
#album {
    margin: 0.125em 0;
    font-size: 0.9em;
    color: var(--muted);
}

.is-hidden {
    display: none;
}

.view-counter {
    margin-top: 2em;
    color: var(--muted);
    font-size: 0.8em;
    font-style: normal;
}

.gif {
    position: relative;
    z-index: 2;
}

@media (max-width: 640px) {
    body::before {
        width: 100%;
    }

    body::after {
        top: auto;
        left: 0;
        right: 0;
        bottom: -8em;
        width: auto;
        height: 8em;
        background: linear-gradient(180deg, var(--paper), var(--paper-fade));
    }

    .title {
        width: calc(100% - 3em);
        min-height: initial;
        max-width: 100%;
        padding: 0.75em 1.5em 1.5em 0.75em;
    }
}
