:root {
  --width: 850px;
  --footer-margin: 5rem;

  --color-dim:     #6d6466;
  --color-tag:     #5d5456;
  --color-fg:      #181818;
  --color-bg:      #f2efe4;

  --post-margin: 2rem;
  --meta-and-post-space: 1.5rem;
}

img {
  display: block;
  max-width: 100%;
  margin: 2rem 0;
}

body {
  color: var(--color-fg);
  background-color: var(--color-bg);
  font-family: "Vazirmatn", sans-serif;
  max-width: var(--width);
  margin: 0 auto;
  direction: rtl;
}

header {
  text-align: center;
  margin: 4rem 0;
}

header .title,
header .desc {
  font-weight: 500;
  display: block;
}

header .title a img {
  padding: 0 2rem;
  margin: 2rem auto;
  max-width: 300px;
}

header nav .menu {
  list-style: none;
  display: flex;
  padding: 0;
  justify-content: center;
}

header nav .menu .menu-item {
}

header nav .menu .menu-item:not(:last-child)::after {
  margin: 0 10px;
  content: "/";
  font-weight: bold;
}

/* header nav .menu .menu-item .menu-link:hover { text-decoration: underline; } */
/* header nav .menu .menu-item .menu-link { */
/*     color: var(--color-fg); */
/*     text-decoration: none; */
/* } */

main {
  word-break: keep-all;
  text-align: justify;
  padding: 0 1.5rem;
}

main .post-list {
  list-style: none;
  padding: 0;
}

main .post-list .post-item:not(:last-child) {
  margin-bottom: var(--post-margin);
}

.archive-list {
  list-style-position: inside;
}
@media only screen and (max-width: 450px) {
  .archive-list {
    padding: 0;
  }
}

.archive-item {
  text-align: initial;
}

.post-content *:first-child {
  margin-top: 0;
}

.post-meta {
  font-weight: 500;
  margin-bottom: var(--meta-and-post-space);
}

.post-title {
  text-align: initial !important;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0;
}
@media only screen and (max-width: 420px) {
  .post-title {
    font-size: 1.55rem;
  }
}

.post-title a {
  text-decoration: none;
  color: var(--color-fg);
}

.post-meta-tag {
  /* font-style: italic; */
  /* color: var(--color-dim); */
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

footer {
  font-size: 0.85rem;
  color: var(--color-dim);
  margin: var(--footer-margin) auto;
  text-align: center;
}

h2 { font-size: 1.4rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.1rem; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
}

pre {
  padding: 1rem;
  font-size: 0.8rem;
  background-color: var(--color-fg);
  color: var(--color-bg);
  direction: ltr;
  overflow-x: auto !important;
}

.footnotes { margin-top: calc(var(--meta-and-post-space) * 2); }
.footnotes > hr {
  margin: var(--meta-and-post-space) auto;
  width: 20%;
}
.footnotes > ol > li > p { margin-bottom: 0; }
.footnote-back { margin: 0 1rem; }

em {
  display:           inline-block;
  font-style:        normal;
  -moz-transform:    scale(1) rotate(0deg) translate(0px, 0px) skew(10deg, 0deg);
  -webkit-transform: scale(1) rotate(0deg) translate(0px, 0px) skew(10deg, 0deg);
  -o-transform:      scale(1) rotate(0deg) translate(0px, 0px) skew(10deg, 0deg);
  -ms-transform:     scale(1) rotate(0deg) translate(0px, 0px) skew(10deg, 0deg);
  transform:         scale(1) rotate(0deg) translate(0px, 0px) skew(10deg, 0deg);
}

div.box *:last-child { margin-bottom: 0; }
div.box {
  padding: 0.6rem;
  border: 2px dashed var(--color-fg);
}
