/* CSS Reset */

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

@media (prefers-reduced-motion: no-preference) {
  html {
    /* Enable animations to/from `auto` size */
    interpolate-size: allow-keywords;
  }
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  margin-inline: auto;
  padding: 1em;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  margin-top: 0.5em;
}

/* Typography */
:root {
    --color-text: #212529;
    --color-text-muted: #988f81;
    --color-text-muted2: #ccc;
    --color-text-link: #157bc4;
    --color-background: #eee;
    --color-background-selected: #ddd;
}

body {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    text-align: left;
    background-color: var(--color-background);
}

p {
    font-size: 1em;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
}

a:hover, a:focus, a:active {
    text-decoration: underline;
 }

hr  {
    border-top: 1px solid var(--color-text-muted2);
    margin-block: 0.5em;
}

hr:not(.wide) {
    width: 10em;
    margin-inline: auto;
}


/* Layout */
nav {
    display: flex;
    flex-flow: row wrap;
    padding-block: 0.5em;
    gap: 0.5em;
    margin-bottom: 1em;

    .spacer {
        flex-grow: 1;
    }
}

ul, ol {
    padding-inline-start: 1em;
}

main, header {
    width: 100%;
    padding-inline: 15px;
    margin-inline: auto;
}

@media (min-width: 960px) {
    main, header {
        max-width: 960px;
    }
}

/* The rest */
ul.posts-list {
    padding-inline-start: 0;
    font-size: 20px;

    li.post-link {
        list-style: none;

        a {
            display: block;
            text-decoration: none;
            padding-block: 0.5em;

            &:hover {
                background: var(--color-background-selected);
            }


            .post-date {
                color: var(--color-text-muted);
                margin-right: 1em;
            }
            .post-title {
                color: var(--color-text);
            }
        }
    }
}

@media (max-width: 600px) {
    ul.posts-list {
        li.post-link {
            a {
                /* text-decoration: underline; */

                .post-date {
                    display: none;
                }
            }
        }
    }
}
