html, body { min-height: 100%; background: #050813; color: var(--color-text-primary); font-family: var(--font-body); }
body { overflow-x: hidden; }
.blog-shell { width: min(1480px, calc(100% - 96px)); margin: 0 auto; }
.lang-en { display: none; }
html[data-lang="en"] .lang-fa { display: none !important; }
html[data-lang="en"] .lang-en { display: inline; }
p.lang-en { display: none; }
html[data-lang="en"] p.lang-en { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.blog-archive {
  min-height: calc(100vh - 94px);
  padding: clamp(108px, 9vw, 128px) 0 124px;
  background:
    radial-gradient(circle at 88% 4%, rgba(42, 84, 202, .11), transparent 27%),
    linear-gradient(rgba(108, 150, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 150, 255, .025) 1px, transparent 1px),
    #050813;
  background-size: auto, 72px 72px, 72px 72px, auto;
}
.archive-header { display: grid; grid-template-columns: 1fr minmax(320px, 520px); gap: 64px; align-items: end; padding-bottom: 42px; border-bottom: 1px solid rgba(117, 156, 235, .16); }
.archive-kicker { color: rgba(132, 174, 255, .72); font-size: 11px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; }
.archive-header h1 { margin-top: 16px; font-size: clamp(44px, 5.5vw, 76px); line-height: 1.08; letter-spacing: -.045em; }
html[dir="rtl"] .archive-header h1 { letter-spacing: -.03em; }
.archive-intro { max-width: 520px; color: rgba(171, 194, 235, .72); font-size: 16px; font-weight: 300; line-height: 1.95; }

.archive-tools { padding: 16px 0 28px; }
.article-search { position: relative; display: flex; align-items: center; width: min(100%, 480px); height: 46px; border: 1px solid rgba(120, 159, 236, .22); background: rgba(10, 16, 35, .74); transition: border-color .25s, background .25s, box-shadow .25s; }
.article-search:focus-within { border-color: rgba(132, 177, 255, .62); background: rgba(12, 20, 44, .94); box-shadow: 0 0 0 4px rgba(79, 126, 230, .08); }
.article-search svg { flex: 0 0 auto; width: 17px; margin: 0 15px; fill: none; stroke: #7ea9fb; stroke-width: 1.5; stroke-linecap: round; }
.article-search input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: #eef4ff; font: inherit; font-size: 13px; }
.article-search input::placeholder { color: rgba(151, 174, 217, .56); }
.search-shortcut { margin: 0 12px; padding: 3px 7px; border: 1px solid rgba(128, 161, 225, .19); border-radius: 4px; background: rgba(111, 148, 220, .06); color: rgba(153, 181, 232, .5); font: 11px 'Outfit', sans-serif; }
.filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.filter-btn { min-height: 39px; padding: 8px 17px; border: 1px solid rgba(112, 148, 218, .18); border-radius: 999px; background: rgba(10, 16, 34, .46); color: rgba(169, 191, 231, .7); font: inherit; font-size: 12px; cursor: pointer; transition: .22s ease; }
.filter-btn:hover { border-color: rgba(127, 170, 251, .42); color: #d9e7ff; }
.filter-btn.active { border-color: rgba(123, 171, 255, .62); background: rgba(61, 104, 202, .19); color: #dce9ff; box-shadow: inset 0 0 20px rgba(79, 130, 237, .08); }
.results-bar { display: flex; align-items: center; gap: 16px; min-height: 44px; margin-bottom: 22px; color: rgba(139, 166, 217, .58); font-size: 11px; letter-spacing: .05em; }
.results-line { width: 34px; height: 1px; background: rgba(119, 155, 225, .18); }
#clear-filters { padding: 0; border: 0; background: none; color: #8eaff0; font: inherit; font-size: 11px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
#clear-filters.visible { opacity: 1; pointer-events: auto; }

.articles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.article-card { min-width: 0; overflow: hidden; border: 1px solid rgba(107, 145, 220, .16); background: linear-gradient(155deg, rgba(12, 20, 43, .94), rgba(6, 11, 25, .96)); box-shadow: 0 22px 55px rgba(0, 0, 0, .18); transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .35s; }
.article-card:hover { transform: translateY(-7px); border-color: rgba(126, 170, 255, .37); box-shadow: 0 30px 70px rgba(0, 0, 0, .34); }
.article-card[hidden] { display: none; }
.card-image-link { position: relative; display: block; overflow: hidden; aspect-ratio: 1.34 / 1; background: #09112b; }
.card-image-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(3, 7, 19, .48)); pointer-events: none; }
.card-image-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .7s; }
.article-card:hover .card-image-link img { transform: scale(1.045); filter: saturate(1.07); }
.card-index { position: absolute; z-index: 1; right: 14px; bottom: 13px; padding: 6px 8px; border: 1px solid rgba(154, 188, 255, .25); background: rgba(4, 9, 24, .66); backdrop-filter: blur(12px); color: rgba(221, 234, 255, .85); font: 9px 'Outfit', sans-serif; letter-spacing: .18em; }
html[dir="ltr"] .card-index { right: auto; left: 14px; }
.card-body { display: flex; flex-direction: column; min-height: 305px; padding: 22px 21px 18px; }
.card-meta { display: flex; align-items: center; gap: 9px; color: rgba(126, 155, 210, .63); font-size: 10px; }
.card-category { color: #88adf4; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(129, 165, 232, .38); }
.card-body h2 { margin-top: 16px; font-size: clamp(19px, 1.55vw, 24px); font-weight: 620; line-height: 1.52; letter-spacing: -.025em; }
.card-body h2 a { transition: color .22s; }
.card-body h2 a:hover { color: #bed5ff; }
.card-body > p { margin-top: 13px; color: rgba(159, 183, 225, .68); font-size: 13px; font-weight: 300; line-height: 1.85; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(106, 142, 210, .12); color: rgba(117, 145, 198, .5); font-size: 10px; }
.card-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(123, 160, 231, .2); color: #92b6fb; transition: .22s; }
.card-arrow:hover { border-color: rgba(139, 180, 255, .6); background: rgba(77, 121, 215, .15); color: #fff; }
.card-arrow svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .card-arrow svg { transform: scaleX(-1); }

.empty-state { padding: 80px 24px; border: 1px dashed rgba(117, 155, 228, .2); text-align: center; color: rgba(153, 179, 227, .68); }
.empty-state svg { width: 31px; fill: none; stroke: #769eea; stroke-width: 1.3; stroke-linecap: round; }
.empty-state h2 { margin-top: 17px; color: #d8e6ff; font-size: 22px; }
.empty-state p { margin-top: 8px; font-size: 13px; }
.blog-footer { border-top: 1px solid rgba(100, 148, 245, .13); background: #02040d; }
.blog-footer .blog-shell { min-height: 94px; display: flex; align-items: center; justify-content: space-between; color: rgba(105, 138, 198, .5); font: 10px 'Outfit', sans-serif; letter-spacing: .19em; }

@media (max-width: 1240px) { .articles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .blog-shell { width: min(100% - 48px, 1480px); }
  .archive-header { grid-template-columns: 1fr; gap: 20px; }
  .archive-intro { max-width: 680px; }
  .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .blog-shell { width: calc(100% - 36px); }
  .blog-archive { padding: 88px 0 80px; background-size: auto, 52px 52px, 52px 52px, auto; }
  .archive-header { padding-bottom: 28px; }
  .archive-header h1 { margin-top: 11px; font-size: 39px; }
  .archive-intro { font-size: 14px; line-height: 1.85; }
  .archive-tools { padding: 12px 0 22px; }
  .article-search { height: 44px; }
  .article-search svg { margin: 0 13px; }
  .search-shortcut { display: none; }
  .filter-row { flex-wrap: nowrap; margin-left: -18px; margin-right: -18px; padding: 0 18px 4px; overflow-x: auto; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-btn { flex: 0 0 auto; }
  .articles-grid { grid-template-columns: 1fr; gap: 18px; }
  .card-image-link { aspect-ratio: 16 / 10; }
  .card-body { min-height: 275px; }
  .card-body h2 { font-size: 23px; }
  .blog-footer .blog-shell { min-height: 110px; flex-direction: column; justify-content: center; gap: 8px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .article-card, .card-image-link img { transition: none; } }
