@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');

/* @font-face { */
  /* font-family: 'Liberation Serif'; */
  /* font-weight: normal; */
  /* src: url('/assets/fonts/LiberationSerif-Regular.ttf') format('truetype'); */
/* } */

/* @font-face { */
  /* font-family: 'Liberation Serif'; */
  /* font-weight: bold; */
  /* src: url('/assets/fonts/LiberationSerif-Bold.ttf') format('truetype'); */
/* } */

/* @font-face { */
  /* font-family: 'Liberation Serif'; */
  /* font-weight: normal; */
  /* font-style: italic; */
  /* src: url('/assets/fonts/LiberationSerif-Italic.ttf') format('truetype'); */
/* } */

/* @font-face { */
  /* font-family: 'Liberation Serif'; */
  /* font-weight: bold; */
  /* font-style: italic; */
  /* src: url('/assets/fonts/LiberationSerif-BoldItalic.ttf') format('truetype'); */
/* } */

@font-face {
  font-family: 'Sentient';
  font-style: normal;
  src: url('/assets/fonts/Sentient-Variable.ttf') format('truetype');
}

@font-face {
  font-family: 'Sentient';
  font-style: italic;
  src: url('/assets/fonts/Sentient-VariableItalic.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/InterVariable.ttf') format('truetype');
}

@font-face {
  font-family: 'Inconsolata';
  src: url('/assets/fonts/Inconsolata-Variable.ttf') format('truetype');
}

:root {
  --ft-sans: 'Inter', sans-serif;
  /* --ft-serif: 'Liberation Serif', serif; */
  --ft-serif: 'Noto Serif', serif;
  --ft-mono: 'Inconsolata', monospace;

  --full-width: 600px;

  --fg-mark: #f2cf8a;
  --fg-select: #aaaaaa;
  --fg-subtle: #313131;

  --bg-subtle: #eaeaea;
}

::selection {
  background-color: var(--fg-select);
}

* {
  box-sizing: border-box;
  /* line-height: 1.4em; */
  line-height: 1.5em;
}

body {
  font-family: var(--ft-serif);
  font-size: 14px;
  margin: 2rem;

  main {
    display: flex;
    gap: 0px 2rem;
    align-items: flex-start;
    margin: 10rem auto;
    max-width: calc(var(--full-width) + 2rem + 350px);

    aside#index {
      width: 100%;
      max-width: 350px;
      border-right: 1px solid var(--bg-subtle);
      padding: 0px 1rem;

      @media (max-width: 765px) {
        display: none;
      }

      ul {
        padding: 0px;

        li {
          /* list-style-type: none; */
          cursor: pointer;
          font-size: 0.9rem;

          &.index-H1 {
            margin-left: 0rem;
          }

          &.index-H2 {
            margin-left: 1rem;
          }

          &.index-H3 {
            margin-left: 2rem;
          }

          &.index-H4 {
            margin-left: 3rem;
          }

          &.index-H5 {
            margin-left: 4rem;
          }

          &.index-H6 {
            margin-left: 5rem;
          }
        }
      }
    }

    article {
      max-width: var(--full-width);
      width: var(--full-width);
    }
    
    h1 {
      /* font-family: var(--ft-sans); */
      font-size: 3rem;
      font-weight: 700;
      margin-top: 0rem;
      margin-bottom: 5rem;
      text-align: center;
    }

    h2 {
      /* font-family: var(--ft-sans); */
      font-weight: 700;
      margin-top: 2rem;
      padding-top: 2rem;
      padding-bottom: 1rem;
      margin-bottom: 0px;

      @media (max-width: 765px) {
        position: sticky;
        top: 0px;
        display: block;
        background-color: white;
      }
    }

    h3 {
      /* font-family: var(--ft-sans); */
    }

    h4 {
      /* font-family: var(--ft-sans); */

      @media (max-width: 765px) {
        position: sticky;
        top: calc(84px - 1rem);
        display: flex;
        align-items: center;
        background-color: white;
        padding-bottom: 1rem;
        margin-top: 0px;
        margin-bottom: -1rem;
        padding-top: 1rem;
        min-height: calc(4rem + 1rem + 1rem);
      }
    }

    h5 {
      /* font-family: var(--ft-sans); */
    }

    h6 {
      /* font-family: var(--ft-sans); */
    }

    .anchor {
      display: none;
    }

    .copy {
      display: none;
    }

    h1:hover,
    h2:hover,
    h3:hover,
    h4:hover,
    h5:hover,
    h6:hover {

      .anchor {
        display: inline-block;
        margin-left: 0.5rem;
        color: var(--fg-subtle);
        font-weight: normal;
        text-decoration: underline;
        cursor: pointer;
      }

      .copy {
        display: inline-block;
        margin-left: 0.5rem;
        color: var(--fg-subtle);
        font-weight: normal;
        text-decoration: underline;
        cursor: pointer;
      }
    
    }

    p {
      margin-top: 1.75rem;
      margin-bottom: 1.75rem;
    }

    ul {
      margin-top: 1.75rem;
      margin-bottom: 1.75rem;
    }

    sup {
      font-size: 0.7rem;
      background-color: var(--bg-subtle);
      display: inline-block;
      padding: 0rem 0.2rem;
    }

    blockquote {
      margin: 0px;
      margin-bottom: 2rem;
      font-size: 0.9rem;
      color: var(--fg-subtle);
      background-color: var(--bg-subtle);
      padding: 0.2rem 1rem;

      ol {
        padding-left: 1rem;

        li {
          font-size: 0.9rem;
          color: var(--fg-subtle);
          margin-top: 0.25rem;
        }
      }
    }

    figure {
      margin: 0px;
      margin-top: 0.75rem;
      margin-bottom: 0.75rem;

      img {
        margin: 0px !important;
      }

      figcaption {
        text-align: center;
        font-size: 0.9rem;
        color: var(--fg-subtle);
        margin-top: 0.5rem;
      }
    }

    img {
      margin-top: 0.75rem;
      margin-bottom: 0.75rem;
      max-width: 100%;
      border: 1px solid #999999;

      &.logo {
        user-select: none;
        pointer-events: none;
        border: none;
        margin: 0 auto;
        display: block;
        width: 200px;
        margin-top: -2.5rem;
      }
    }

    .info {
      text-align: center;
      text-transform: uppercase;
      text-decoration: underline;
    }

    .disclaimer {
      font-size: 14px;
    }

    .license {
      margin-top: 2rem;
      font-size: 14px;
      text-align: center;
    }
  }

  strong {
    font-weight: inherit;
    background-color: var(--fg-mark);
  }

  em > strong {
    background-color: initial;
    display: block;
    font-size: 1.2rem;
    text-align: center;
  }

  blockquote {
    /* font-family: var(--ft-sans); */
    font-size: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
}

/* BOOKS */

pre.txt {
  font-family: var(--ft-serif);
  white-space: pre-wrap;

  p {
    margin: 0px;
  }

  code {
    font-family: var(--ft-serif);
    white-space: pre-line;
  }
}
