/*
 * creating a local custom font
 * this is much more reliable than using a CDN
 */
@font-face {
    font-family: "GFS Didot";
    src: url("./gfs_didot.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "GFS Didot";
    src: url("./gfs_didot_italic.otf") format("opentype");
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: "GFS Didot";
    src: url("./gfs_didot_bold.otf") format("opentype");
    font-weight: bold;
    font-style: normal;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  font-family: "GFS Didot", sans-serif;
}

/* landing page styling */
main > h1 {
  text-align: center;
  border-bottom: 1px solid black;
  border-top: 1px solid black;
  display: block;
  margin-top: 1em;
  margin-bottom: 2em;
}

#landing-layout blockquote {
  font-style: normal;
}

#landing-layout {
  padding: 1em;
  display: flex;
  flex-direction: row;
  gap: 2em;
  margin: 0 auto;
  max-width: 1100px;
  margin-bottom: 3em;
}

#articles {
  flex: 3;
}

#contact {
  flex: 2;
  padding-left: 1em;
  border-left: 1px dotted;
}

#main li {
  margin-bottom: 0.1em;
}

#posts-list li {
  margin: 0;
}

body {
}

a {
  color: #00e;
}

a:hover {
  background-color: #dbe8f7;
  color: black;
  border: 1px solid black;
  text-decoration: none;
}

.post__render {
  max-width: 720px;
  margin: 4em auto;
  padding: 0 1em;
}

main {
  /* I could use CSS variables but that's not
   * supported by all browsers out there, especially
   * the minimalist ones. So I will keep it simple */
  line-height: 1.3;
  margin: 0 auto;
}

.artcle h1, .article h2, .article h3,
.article h4, .article h5, .article h6 {
}

/* text styling and spacing, hard to get right */
.post__content h1, .post__content h2, .post__content h3,
.post__content h4, .post__content h5, .post__content h6 {
  margin-bottom: 0.5em;
  margin-top: 1.5em;
  font-style: italic;
  font-weight: bold;
}

.post__content p code {
  padding: 0.13em 0.3em;
  border-radius: 6px;
  background-color: #e1e1e1;
  font-family: monospace;
}

.post__content > p {
  margin-top: 1.4rem;
  margin-bottom: 1.4rem;
}

.post__content ul {
  margin-top: 1em;
  margin-left: 2em;
}

.post__content li {
  margin-bottom: 0.8em;
}

.post__content blockquote {
  font-style: italic;
  padding: 1em;
  border-left: 7px solid #e1e1e1;
  background-color: #f7f7f7;
  text-indent: 1em;
  margin: 1.0em 0 1.5em 0;
}

.post__content blockquote p + p {
  margin-top: 1em;
}

#books {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em;
}

#books span {
  background-color: #f7f7f7;
  border: 1px solid black;
  padding: 0.13em 0.5em;
  white-space: nowrap;
  font-size: 0.75rem;
}

.post__content pre {
  padding: 1em;
  border: 1px solid black;
  overflow-x: scroll;
  background: #f7f7f7;
  color: #040404;
  font-size: 0.8rem;
}

.post__content figure {
  text-align: center;
  margin: 2rem auto;
}

.post__content img {
  max-width: min(100%, 500px);
  border-radius: 8px;
}

.post__content figcaption {
  margin-top: 0.8rem;
  font-style: italic;
}

/* might be an issue for suckless browsers, but whatever */
.post__content tr:nth-child(odd) {
  background-color: #f4f4f4;
}

.post__content table {
  border: 1px solid #aaa;
}

.post__content pre code { display: block; }
.post__content code span { font-family: monospace; }

/* syntax highlighting color scheme */
/* stolen from the Internet, this is so ugly! */
.dv, .bn, .fl { color: #d3869b }
.co { color: #928374; font-style: italic }
.kw, .cf { color: #fb4934 } 
.dt { color: #fb4934 }
.st { color: #b8bb26 }

@media (max-width: 750px) {
  #landing-layout {
    flex-direction: column;
  }

  #contact {
    border-left: none;
    padding: 0;
  }
}

