/* General */

/* https://coolors.co/645aff-fffbfe-d0cfcf-565254-ffffff */
:root {
  --accent: #645aff;
  --bg: #fafafa;
  --text: #212121;
  --link-visited: #9a4eb5;
  --inline-code-bg: #e8ecec;
}

html {
  max-width: 72ch;
  padding: 1rem;
  margin: auto;

  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.75;

  text-align: left;
  background-color: var(--bg);
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text);
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  color: var(--text);
}

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

header h1 {
  font-size: 1.3rem;
}
/*
h2,
h3,
h4,
h5 {
  margin-top: 2rem;
  ottom: 1rem;
} */

nav a {
  margin-right: 10px;
}

hr {
  width: 100%;
  float: left;
}

table {
  width: 100%;
}

img {
  max-width: 100%;
  margin: 0;
}

/* Blog */
ul.blog-posts {
  list-style-type: none;
  padding: unset;
}

ul.blog-posts li {
  display: flex;
}

ul.blog-posts li span {
  flex: 0 0 17ch;
}

ul.blog-posts li a:visited {
  color: var(--link-visited);
}

/* Blog Page */
.blog-content {
  padding-bottom: 4rem;
}

/*  */
/*  */
/*  */

/* Styling code block, mostly taken from zola
  https://www.getzola.org/documentation/content/syntax-highlighting/
*/
pre {
  padding: 1rem;
  overflow: auto;
}

code:not(pre code) {
  font-size: 15px;
  padding: 2px 3px 4px;
  border-radius: 2px;
  background-color: var(--inline-code-bg);
  white-space: pre-wrap;
}

/* The line numbers already provide some kind of left/right padding */
pre[data-linenos] {
  padding: 1rem 0;
}
pre table td {
  padding: 0;
}
/* The line number cells */
pre table td:nth-of-type(1) {
  text-align: center;
  user-select: none;
}
pre mark {
  /* If you want your highlights to take the full width */
  display: block;
  /* The default background colour of a mark is bright yellow */
  background-color: rgba(254, 252, 232, 0.9);
}
pre table {
  width: 100%;
  border-collapse: collapse;
}

/* end of styling code block */

blockquote {
  border-left: 1px solid #999;
  color: #222;
  padding-left: 20px;
  font-style: italic;
}

/* footer {
  padding: 25px;
  text-align: center;
} */

@media (prefers-color-scheme: dark) {
  html {
    background-color: #333;
    color: #ddd;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  strong,
  b {
    color: #eee;
  }

  a {
    color: #8cc2dd;
  }

  code {
    background-color: #777;
  }

  pre code {
    color: #ddd;
  }

  blockquote {
    color: #ccc;
  }

  textarea,
  input {
    background-color: #252525;
    color: #ddd;
  }
}
