:root {
  --accent-bg: #f5f5f5;
  --standard-border-radius: 5px;
  --border: #c1c1c1;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {

  :root,
  ::backdrop {
    --accent: #7088f6;
    --accent-bg: #302f2f;
    --border: #848484;
  }

  section.related-posts, section.subscribe {
    background-color: #212121;
  }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body > header {
  border: none;
  margin: 0;
  background-color: var(--accent-bg);

  @media (max-width: 720px) {
     margin: 0;
     border-radius: 0;
  }

  .brand {
    font-size: 2rem;
    font-family: "Nabla", system-ui;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "EDPT" 100, "EHLT" 12;

    a,
    a:visited {
      color: var(--marked);
    }
  }

  p {
    color: var(--text-light);
    font-size: 1rem;
  }
}

body.posts_show, body.entries_show {
  article {
    h1 { margin-bottom: 2px; }
    p.secondary { 
      margin-top: 3px;
      margin-bottom: 15px;
    }
  }

  section.related-posts {
    background-color: #f6f4fa;
    border-radius: 20px;
    margin: 30px 30px;

   @media (prefers-color-scheme: dark) {
     background-color: #212121;
    }
     
    @media (max-width: 720px) {
       margin: 30px 0;
       border-radius: 0;
    }
  }

  section.subscribe {
    background-color: #fbf6f3;
    border-radius: 20px;
    margin: 30px 30px;

   @media (prefers-color-scheme: dark) {
     background-color: #212121;
    }
     
    @media (max-width: 720px) {
       margin: 30px 0;
       border-radius: 0;
    }
  }
}

body > footer {
  border-top: 1px dotted #e9e9e9;
}

header > nav {
  padding: 0;
  margin-bottom: 0.3em;

  a {
    border: none !important;
    font-weight: bold;
    margin: 0 0.3em;
    padding: 0;
    border-radius: 0;
    line-height: 1.5;
    text-decoration: none;
  }

  .current {
    border-bottom: 2px dotted var(--accent) !important;
  }
}

aside {
  border: none;
  background: none;

  h5:not(:first-child) {
    margin-top: 20px;
  }

  .image-grid {
    margin-top: 5px;
  }
}

article {
  border: 0;
  padding: 0;
}

@media (prefers-color-scheme: dark) {
  body > header, section.related-posts, section.subscribe {
  }
}

.home_index,
.tags_show {
  main {
    h4 {
      font-size: 1.3em;

      a {
        text-decoration: none;
        border-bottom: 2px dotted var(--accent);
        padding-bottom: 2px;
      }
    }

    .published-at {
      color: var(--text-light);
    }
  }

  .excerpt {
    margin-bottom: 5px;
    margin-top: 1px;
  }

  .tags {
    a,
    a:visited {
      color: var(--text);
    }
  }

  section {
    margin: 0;
    padding: 0;
    border: 0;
    margin-bottom: 25px;
  }
}

.entry.stravaactivitiessummary {
  h4 a {
    border-color: var(--text-light);
    color: var(--text-light);
  }
}

.pagination {
  a {
    text-decoration: none;
  }
}

section.subscribe {
  h5 {
    border-bottom: 2px dotted var(--text-light);
    color: var(--text-light);
    width: fit-content;
  }

  h5::before {
    content: "📬 ";
    margin-right: 0.5em;
    display: inline-block;
  }
}

section.related-posts {
  h5 {
    border-bottom: 2px dotted var(--text-light);
    color: var(--text-light);
    width: fit-content;
  }

  h5::before {
    content: "📖 ";
    margin-right: 0.5em;
    display: inline-block;
  }

  ul {
    margin-top: 10px;
    padding-left: 25px;
  }
}

/* Safari-specific styles */

@supports (hanging-punctuation: first) and (font: -apple-system-body) and
  (-webkit-appearance: none) {
  body > header .brand {
    font-family: "Rubik Glitch", system-ui;
  }
}

/* Trix */
.trix-content .attachment--file {
  border: 0
}

section.comments {
  padding: 0;
  
  h5 {
    border-bottom: 2px dotted var(--text-light);
    padding-bottom: 2px;
    width: fit-content;
    color: var(--text-light);
    margin-bottom: 10px;
  }
}

/* Fonts */
@font-face {
  font-family: 'Nabla';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/nabla/v10/j8_D6-LI0Lvpe7Makz5UhJt9C3uqg_X_75gyGS4jAxsNIjrRBRdeFXZ6x96OvAFr.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Rubik Glitch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/rubikglitch/v2/qkBSXv8b_srFRYQVYrDKh9ZfnyTGGtuCFA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}