:root {
  --size-m: 1rem;
  --size-l: 2rem;

  --font-title: "Rosarivo", serif;
  --font-body: "Rosarivo", serif;
  --font-mono: "Sevka Fixed", monospace;

  --content-width-prose: 30rem;

  --faded: #777777;
  --pale: #f7f7f7;
}

@font-face {
  font-family: "Rosarivo";
  /* TODO: local? */
  src: url("/assets/fonts/Rosarivo-Regular.ttf");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Rosarivo";
  src: url("/assets/fonts/Rosarivo-Italic.ttf");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "Sevka Fixed";
  src: url("/assets/fonts/SevkaFixed-Regular.woff2");
  font-weight: normal;
  font-style: normal;
}

html {
  line-height: 1.45;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-m);
  margin: auto;
  max-width: var(--content-width-prose);
  text-wrap: pretty;
  overflow-x: hidden;
  padding: 0 0.5em;
  /* TODO: colors? */
  
  h1 {
    font-family: var(--font-title);
    font-size: var(--size-l);
    font-weight: normal;
  }
}

a {
  color: inherit;
}

hr {
  background-image: url('/assets/images/Floral_heart.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: none;
  height: 2em;
  margin: 2em 0;
}

div.code-block {
  pre {
    margin: 0;
  }
  code {
    display: block;
    font-family: var(--font-mono);
    overflow-x: scroll;
  }

  margin-block-start: 1em;

  background-color: var(--pale);
  padding: 0.5em 0.75em;
  border-radius: 1em;
}
@media screen and (width < 30em) {
  div.code-block {
    padding: 0.5em 0;
  }
}

p code {
  background-color: var(--pale);
  padding: 0 0.25em;
  border-radius: 0.25em;
}

blockquote {
  margin-inline: 0;

  background-color: var(--pale);
  padding: 0.01em 1em 0.01em 1.25em;
  border-radius: 1em;
  border-left: 0.25em solid;

  div.attribution {
    margin-block-start: 1em;
    padding-bottom: 1em;
    text-align: right;
    font-weight: bold;
  }
}

details.footnote-details {
  summary {
    list-style: none;
  }
  summary::-webkit-details-marker {
    display: none;
  }
  div.footnote-definition {
    margin-block-start: 1em;

    font-size: 0.9em;
    background-color: var(--pale);
    padding: 1em 1em 0.01em 1em;
    border-radius: 1em;
  }
}

ul.frontmatter, ul.backmatter {
  list-style-type: none;
  padding-inline-start: 0;
  text-align: center;

  display: grid;
  grid-template-columns: repeat(auto-fit, 5rem);
  justify-content: center;
}


/* --- home --- */

h1.site-title {
  text-align: center;
}

ul.posts {
  list-style-type: none;
  padding-inline-start: 0;

  li {
    margin: 0.5em 0;

    /*
    display: grid;
    grid-template-columns: 1fr 6em;
    gap: 1rem;
    */

    div.date {
      /*display: inline;*/
      /*text-align: right;*/
      color: var(--faded);
      font-variant-numeric: tabular-nums;
    }
  }
}
