@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
  --bg: #ECE8DF;
  --surface: #F6F3EC;
  --text: #26241F;
  --text-soft: #5C5748;
  --line: #D8D2C3;
  --accent: #33513F;
  --accent-warm: #9C6B34;
  --max-w: 640px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  direction: rtl;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-warm);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

header.site-head {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}

header.site-head .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

nav.site-nav a {
  margin-inline-start: 20px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

nav.site-nav a:hover {
  color: var(--accent);
}

main {
  padding: 56px 0 80px;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 14px;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.intro {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 54ch;
  margin: 0 0 8px;
}

.posts {
  margin-top: 56px;
}

.post {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.post:first-child {
  border-top: none;
  padding-top: 0;
}

.post time {
  color: var(--text-soft);
  font-size: 0.88rem;
}

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

.post h2 a:hover {
  color: var(--accent);
}

.post p {
  color: var(--text-soft);
  margin: 10px 0 0;
}

.post .tags {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--accent-warm);
}

.post .tags span::after {
  content: "،";
  margin-inline-end: 4px;
}

.post .tags span:last-child::after {
  content: "";
}

article.page h1 {
  margin-bottom: 24px;
}

article.page p {
  color: var(--text-soft);
  max-width: 60ch;
}

article.page p + p {
  margin-top: 16px;
}

.error-code {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 1.6rem;
  }
}
