/* global */

body {
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  margin: 0 20px;
}

a {
  color: #333;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.markdown-body a {
  color: #333;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 0.06em;
}

.markdown-body a:hover {
  color: royalblue;
}

.post-ads {
  margin: 50px 0;
}

.markdown-body > h2,
h3 {
  margin-top: 1.5em !important;
}

/* overwrite github-markdown */

.markdown-body {
  font-family: "PT Serif", serif;
  line-height: 1.55;
  font-size: 19px;
}

.markdown-body li + li {
  margin-top: 0;
}

.markdown-body h2 {
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1.3em;
  font-weight: bold;
}

pre {
  background-color: #f6f8fa !important;
  font-size: 15px !important;
  border-radius: 6px !important;
}

/* i18n */

.Chinese .markdown-body {
  line-height: 200%;
}

/* header */

.header {
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

.header-parts {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-links {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
}

.header-link {
  font-weight: 600;
  font-size: 20px;
}

.post-header {
    margin-bottom: 30px;
}

.site-title {
  font-size: 1.8rem;
  margin-top: 32px;
}

.site-date-catalog {
  font-size: 2rem;
}

.signatures {
  font-family: "Permanent Marker", cursive;
}

.signatures a {
  text-decoration: none;
}

body {
  color: #333;
}

/* posts list */

#posts-list {
  min-height: 70%;
}

.posts-line {
  margin: 16px 0;
  padding-bottom: 15px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: left;
}

.posts-line-title {
  font-weight: bold;
  font-size: 1.3rem;
}

.posts-line-subtitle {
    padding-top: 5px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.posts-line-date {
  color: gray;
  font-size: 1rem;
  padding-top: 4px;
  font-family: "SFMono-Regular","Consolas","Liberation Mono","Menlo","Courier",monospace;
}

.posts-line-emoji {
    font-size: 1rem;
    padding-top: 3px;
  }

.post-date {
    font-family: "SFMono-Regular","Consolas","Liberation Mono","Menlo","Courier",monospace;
}

.posts-line-tag {
    color: gray;
    border: solid;
    border-color: #eaecef;
    border-width: 2px;
    border-radius: 8px;
    padding: 2px 5px;
    margin-top: 1px;
    font-size: 0.9rem;
    font-family: "SFMono-Regular","Consolas","Liberation Mono","Menlo","Courier",monospace;
}

.site-footer {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center !important;
  flex-wrap: wrap;
  padding: 12px 0;
  border-width: 1px;
  border-style: solid none;
  border-color: #eaecef;
  border-bottom: 0;
}

/* post */

.post-content img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.12);
  text-align: center;
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.4em;
}

.markdown-body h1 {
  font-family: "Helvetica Neue";
}

.post-desc-items {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.post-date {
  color: gray;
  margin-top: 4px;
}

.post-author {
  float: right;
  font-weight: 600;
}

.post-content {
  margin-bottom: 30px;
}

.post-content p {
  margin-bottom: 1em;
}

.related-content {
  border-width: 2px;
  border-style: dashed;
  border-color: #333;
  padding: 0 15px;
  margin-bottom: 30px;
  margin-top: 30px;
}

.related-content li {
  margin: 5px 0;
}

/* taxonomy */

.taxonomy-term {
  font-size: 3rem;
}

/* gallery */

.gallery-img {
  text-align: center;
}

.gallery-img span {
  text-align: center;
}
.gallery-img-desc {
  font-size: 0.8em;
  font-weight: 800;
}

/* details and summary (basically a collapsable div) */

details {
  margin-bottom: 16px;
  border-color: #eaecef;
  border-width: 3px;
  border-radius: 5px;
  border-style: solid;
  padding-top: 5px;
  padding-bottom: 5px;
}

details > summary {
  margin-left: 10px;
  font-weight: bold;
}

details > pre {
  margin-top: 6px;
}

summary:hover {
  cursor: pointer;
}

.inline-svg {
  display: inline-block;
  height: 1.4rem;
  width: 1.4rem;
  top: 0.4rem;
  position: relative;
}

.site-footer-item {
  margin-right: 12px;
}

.katex {
  font-size: 1.1em !important;
}

.markdown-body code {
  padding-bottom: 2px !important;
  padding-top: 5px !important;
}

table {
  font-size: 0.9em !important;
  margin-bottom: 1em !important;
}

table,
th,
td {
  border: 0 !important;
  overflow: auto !important;
}

.markdown-body table {
  border-collapse: separate !important;
}

.utterances {
  margin-bottom: 30px !important;
}

#player {
  margin-bottom: 1em !important;
}

code.has-jax {
  -webkit-font-smoothing: antialiased;
  background: inherit !important;
  border: none !important;
  font-size: 100%;
}

/* Mobile */

@media screen and (max-width: 600px) {
  .header {
    justify-content: center;
  }
  .signatures {
    text-align: center;
  }
  .post-desc {
    margin-bottom: 30px;
  }
  .site-title {
    margin-bottom: 10px;
  }
  .site-footer {
    margin-top: 20px;
  }
  .site-footer-item {
    margin-right: 8px;
  }
  .end-xs {
    justify-content: center !important;
  }
  .post-title {
    font-size: 1.5em !important;
  }
  .post-header {
    margin-bottom: 10px;
    justify-content: center;
  }
  pre {
    font-size: 14px !important;
  }
  .markdown-body {
    font-size: 17px;
  }
  figure {
    margin: 0 !important;
  }
  .post-content p {
    text-align: left !important;
  }
  .posts-line-tag {
    display: none;
  }
  .posts-line-emoji {
    display: none;
  }
}

.markdown-body hr {
    height: .05em;
}
