/* FONTS AND COLORS */

:root {
    /* this has to be set to switch between light or dark */
    color-scheme: light dark;

    /* CSS HEX
    https://coolors.co/233d4d-fe7f2d-fcca46-a1c181-619b8a */
    --black: #131313;
    --gray-d: #444;
    --gray-m: #777;
    --gray-l: #aaa;
    --accent: tomato;
    /*--fern: #5FAD41;*/
    /*--olive: #a1c181;*/
     /*--color-e: #619b8aff; */
    --white: ghostwhite;

    --lt-bg-main: var(--white);
    --lt-bg-header: var(--gray-d);
    --lt-color: var(--black);
    --lt-book-1: var(--gray-l);
    --lt-book-2: var(--gray-m);

    --dk-bg-main: var(--black);
    --dk-bg-header: var(--gray-d); /*gray-l is too light I think*/
    --dk-color: var(--white);
    --dk-book-1: var(--gray-d);
    --dk-book-2: var(--gray-m);
}

@font-face {
    font-family: 'SpecialElite';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/SpecialElite-Regular.ttf');
}

/***** Layout *****/
body {
    display: block;
    margin: 0 auto;
    max-width: 800px;
    font-family: Helvetica, sans-serif;
    background: light-dark(var(--lt-bg-main), var(--dk-bg-main));
}
h1, h2, h3 {
    font-weight: normal;
    font-family: 'SpecialElite', monospace;
    /*font-size: 2em;*/
}
img {
    width: 100%;
}
hgroup {
    padding: .5em 1.5em .5em 1.5em;
    margin: 0 0 0 0;
    background: light-dark(var(--lt-bg-header), var(--dk-bg-header));
    /*border-radius: 1em;*/
    border-end-end-radius: 1em 1em;
    border-end-start-radius: 1em 1em;
}
hgroup h1 {
    line-height: 1em;
}
hgroup a {
    color: var(--accent);
}
/* note: tabs and stuff are also in a <footer>, but it's under article */
body > footer {
    padding: 1em 1em 1em 1.5em;
    margin: 1em 0 0 0;
    background: light-dark(var(--lt-bg-header), var(--dk-bg-header));
    border-radius: 1em;
    color: light-dark(var(--lt-color), var(--dk-color));
}

/* HTML5 tags */
header,
section,
footer,
aside,
figure {
    display: block;
    max-width: 800px;
}


/*** LINKS ***/
a {
    /*background: var(--accent);*/
    color: light-dark(var(--lt-color), var(--dk-color));
    text-decoration-style: dashed; /*wavy also fun*/
}
a:visited {
    /*color: var(--white);*/
    text-decoration-line: line-through;
}
a:focus, a:hover, a:active {
    /*color: var(--white);*/
    text-decoration-style: wavy; /*wavy also fun*/
}

/* NAVIGATION */
nav > ul {
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    list-style-type: none;
    padding: 0;
}
nav > ul > li {
    padding: .75em;
    background: var(--accent);
    border-radius: 1em;
}

/* TAGS */
a.shelftag {
    border-radius: 1em;
    padding: .25em;
    /*margin: .5em;*/
    background: var(--accent);
    line-height: 2em;
}
a.shelftag::before, a.taglist::before {
    content: "#";
}

/* TAGS PAGEs */
ul.taglist {
    list-style-type: none;
}

/* POSTS */
article {
    margin: 0;
    padding: 1.5em;
    max-width: 800px;
    display: flex;
}
article > header h2 { /*the title*/
    line-height: 1.25em;
    margin: 0;
}

/* POST OR PAGE ALONE */

article.full {
    flex-direction: column;
    align-items: flex-start; /* how the header and etc are aligned in the article - this right-aligns */
    border-end-end-radius: .75em;
    border-start-end-radius: .75em;
    border-end-start-radius: .75em;
    border-start-start-radius: .75em;
    background: light-dark(var(--lt-book-1), var(--dk-book-1));
}
article.full footer {
    padding: 0; /*top right bottom left*/
}
article.full footer dl {
    display: flex;
    flex-flow: row wrap;
}
article.full footer dt {
    flex-basis: 20%;
    padding: 2px 5px;
    /* background: var(--black); */
    text-align: right;
    color: var(--accent);
    font-weight: bold;
}
article.full footer dd {
    flex-basis: 70%;
    flex-grow: 1;
    margin: 0;
    padding: 2px 5px;
    border-bottom: 1px dotted var(--accent);
    /* when it contains tags...?
    display: flex;
    flex-flow: row wrap; */
}

/* BOOK PILE: */
article.summary {
    flex-direction: row;
    align-items: center; /*center align*/
    justify-content: space-between; /*start/end*/
    border-end-end-radius: 1em 50%;
    border-start-end-radius: 1em 50%;
    border-end-start-radius: 1em 50%;
    border-start-start-radius: 1em 50%;
}
article.summary:nth-child(odd) {
    background: light-dark(var(--lt-book-2), var(--dk-book-2));
}
article.summary:nth-child(even) {
    background: light-dark(var(--lt-book-1), var(--dk-book-1));
}
article.summary:nth-child(5n) {
    margin-right: 0;
    margin-left: 100px;
}
article.summary:nth-child(5n+1) {
    margin-right: 125px;
    margin-left: 25px
}
article.summary:nth-child(5n+2) {
    margin-right: 50px;
    margin-left: 50px
}
article.summary:nth-child(5n+3) {
    margin-right: 75px;
    margin-left: 0px
}
article.summary:nth-child(5n+4) {
    margin-right: 25px;
    margin-left: 75px
}
article.summary > footer > p {
    line-height: 1em;
    text-align: right;
    margin: .5em 0;
}

/**** TEXT FORMATTING IN POSTS ****/
spoiler:first-of-type::before {
    content: "(highlight to read spoiler) ";
    background: light-dark(var(--lt-book-1), var(--dk-book-1));
    font-style: italic;
}
spoiler {
    color: light-dark(var(--lt-color), var(--dk-color));
    background: light-dark(var(--lt-color), var(--dk-color));
}
/*try to fix selection colors - doesn't work in safari, idk
note that you can also change highlight color wverywhere w/ ::selection plain -- accessible?*/
spoiler::selection {
    color: light-dark(var(--lt-color), var(--dk-color));
    background: light-dark(var(--dk-color), var(--lt-color));
}

