@import url("normalize.css");

/* ELEMENTS */

body {
    line-height: 1.35;
    font-feature-settings: "kern";
    text-rendering: optimizeLegibility;
    max-width: 35.5rem;
    display: flex;
    flex-direction: column;
    align-content: center;
    margin-block: 2rem;
    margin-inline: auto;
}

@media screen and (max-width: 37.5rem) {
    body {
        margin-inline: 1rem;
    }
}

/* BLOCK */

main > header,
article > header {
    display: flex;
    flex-direction: column;
}

:is(main > header, article > header) h1 {
    margin-block-end: 0;
}

:is(main > header, article > header) h1:not(:only-child) {
    margin-block-start: 0;
}

body > footer {
    padding: 0.5rem;
    border-block-start: 1px solid black;
}

article > footer {
    margin-block: 1rem;
}

pre {
    overflow: auto;
}

/* INLINE */

a:where(:any-link:not(:hover)) {
    text-decoration: none;
}

/* SKIP TO MAIN CONTENT ANCHOR */

body > a[href="#main-content"]:first-child {
    position: absolute;
}

body > a[href="#main-content"]:first-child:not(:focus-visible) {
    width: 0;
    height: 0;
    opacity: 0;
    z-index: -1;
}

/* CLASSES */

.posts-list li {
    list-style-type: disc;
}

li > .posts-list li {
    list-style-type: circle;
}

.crumbs ol {
    display: flex;
    flex-flow: row nowrap;
    list-style-type: none;
    padding-left: 0;
    gap: 0.25em;
}

.crumb:where(:not(:last-child))::after {
    color: black;
    content: "/";
    padding-left: 0.25em;
}

.nav-header {
    border-bottom: 1px solid black;
}

p.page-header__datetime {
    order: -1;
    margin-block-end: 0;
}

.post-footer-nav {
    margin-bottom: 0.5em;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: stretch;
    align-content: center;
}

.post-footer-nav-previous {
    display: inline-flex;
    text-align: left;
    flex: 1;
    padding-right: 0.55em;
}

.post-footer-nav-previous:where([href])::before {
    display: block;
    content: "←";
    font-weight: bold;
    padding-right: 0.55em;
}

.post-footer-nav-next {
    display: inline-flex;
    justify-content: flex-end;
    text-align: right;
    flex: 1;
    padding-left: 0.55em;
}

.post-footer-nav-next:where([href])::after {
    display: block;
    content: "→";
    font-weight: bold;
    padding-left: 0.55em;
}

.post-footer-nav-contents {
    padding: 0 1em;
    border-inline: 1px solid black;
}

dl.article-metadata {
    display: grid;
    font-size: small;
    grid-template-columns: max-content auto;
    column-gap: 1em;
}

dl.article-metadata dd {
    margin: 0;
}

.footer-tag-list {
    display: flex;
    flex-flow: row wrap;
    list-style-type: none;
    padding: 0;
    gap: 0.25em;
}

.footer-tag-list li {
    padding: 0;
}

.footer-tag-list li:where(:not(:last-child))::after  {
    content: ",";
}

.taxonomy-term-page-count::before {
    content: "(";
}

.taxonomy-term-page-count::after {
    content: ")";
}
