@font-face {
  font-family: Yekan;
  src: url("/fonts/iranyekanwebregular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Yekan;
  src: url("/fonts/iranyekanwebbold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #100f0e;
  --surface: #191714;
  --ink: #f7f3ed;
  --muted: #c0b9b1;
  --line: #38312a;
  --accent: #ff9a61;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    1rem/1.85 Yekan,
    Tahoma,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
img,
video,
iframe {
  display: block;
  max-width: 100%;
}
h1,
h2,
p {
  margin-block: 0;
}
.frame {
  width: min(1120px, calc(100% - clamp(32px, 8vw, 112px)));
  margin-inline: auto;
}
.skip {
  position: absolute;
  z-index: 1;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  padding: 8px;
  background: var(--paper);
  transform: translateY(-180%);
}
.skip:focus {
  transform: none;
}

.site-header {
  border-block-end: 1px solid var(--line);
}
.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}
.site-header nav {
  padding-block: 12px;
  min-height: 68px;
}
.brand {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 3px;
  background: #faf9f6;
}
.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.journal {
  font-size: 0.94rem;
  font-weight: 700;
}
.account {
  margin-inline-start: auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
}
.account:hover,
.entry h2 a:hover,
.site-footer a:hover {
  color: var(--accent);
}
.site-footer {
  margin-block-start: clamp(48px, 9vw, 100px);
  border-block-start: 1px solid var(--line);
}
.site-footer nav {
  padding-block: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.archive-header {
  display: grid;
  gap: 12px;
  padding-block: clamp(28px, 6vw, 64px) 25px;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.archive-header p,
.entry p,
.byline,
time {
  color: var(--muted);
}
.pills,
.byline,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pills a,
.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.875rem;
}
.pills a[aria-current],
.pills a:hover,
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
}
.entry {
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.entry-image {
  display: block;
  background: #29211b;
}
.entry-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.entry-text {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
}
.entry h2 {
  font-size: 1.13rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.entry p {
  font-size: 0.94rem;
}
.entry time,
.byline {
  font-size: 0.85rem;
}
.pagination {
  justify-content: center;
  margin-block-start: 22px;
  font-size: 0.875rem;
}

.article {
  max-width: 820px;
  margin-inline: auto;
}
.article-header {
  display: grid;
  gap: 14px;
  padding-block: clamp(26px, 7vw, 64px) 24px;
}
.byline {
  gap: 6px 16px;
}
.cover {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface);
}
.article-content {
  padding-block-start: 22px;
  line-height: 2;
  overflow-wrap: anywhere;
}
.article-content :is(h2, h3, h4) {
  margin-block: 1.65em 0.5em;
  line-height: 1.55;
}
.article-content :is(p, ul, ol, figure, pre, blockquote) {
  margin: 0 0 1.25em;
}
.article-content :is(ul, ol) {
  padding-inline-start: 1.6em;
}
.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.article-content :is(img, video) {
  height: auto;
  border-radius: 8px;
}
.article-content iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
.article-content figcaption {
  margin-block-start: 0.45em;
  color: var(--muted);
  font-size: 0.85rem;
}
.article-content blockquote {
  padding: 0.5em 1em;
  border-inline-start: 2px solid var(--accent);
  background: var(--surface);
}
.article-content :is(pre, table) {
  display: block;
  overflow: auto;
  max-width: 100%;
}
.article-content :is(td, th) {
  min-width: 5rem;
  padding: 0.45em 0.7em;
  border: 1px solid var(--line);
}
.article-content pre {
  padding: 1em;
  direction: ltr;
  border-radius: 8px;
  background: var(--surface);
}
.tags {
  margin-block-start: 18px;
}

@media (max-width: 420px) {
  .site-header nav {
    gap: 9px;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .journal,
  .account {
    font-size: 0.8rem;
  }
  .account {
    padding-inline: 8px;
  }
}
