:root {
  --darchin-amber: 217 119 6;
  --darchin-deep: 67 20 7;
  --darchin-mint: 13 148 136;
}

html {
  font-family: "Vazirmatn", system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* پس‌زمینه بافت ظریف */
.bg-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}
.animate-float {
  animation: float-soft 7s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}
.text-shimmer {
  background: linear-gradient(
    90deg,
    rgb(254 243 199),
    rgb(251 191 36),
    rgb(254 243 199)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
}
.reveal.is-visible {
  animation: fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.custom-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: rgb(120 113 108 / 0.35);
  border-radius: 9999px;
}

.focus-ring:focus-visible {
  outline: 2px solid rgb(245 158 11);
  outline-offset: 3px;
}

/* نوار ادمین وردپرس */
.admin-bar #site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar #site-header {
    top: 46px;
  }
}

/* کارت‌های بلاگ */
a.blog-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
a.blog-card:hover {
  border-color: rgb(245 158 11 / 0.25);
  box-shadow: 0 24px 48px -12px rgb(28 25 23 / 0.35);
}
a.blog-card:focus-visible {
  border-color: rgb(245 158 11 / 0.35);
}

/* بدنهٔ نوشتهٔ تکی */
.post-body {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: rgb(214 211 209);
}

.post-body > * + * {
  margin-top: 1.25rem;
}

.post-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgb(255 255 255);
  line-height: 1.35;
}

.post-body h2:first-child {
  margin-top: 0;
}

.post-body h3 {
  margin-top: 1.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: rgb(250 250 249);
}

.post-body p {
  margin-top: 0;
}

.post-body ul,
.post-body ol {
  margin-top: 1rem;
  padding-inline-start: 1.35rem;
}

.post-body li {
  margin-top: 0.5rem;
}

.post-body li::marker {
  color: rgb(245 158 11 / 0.7);
}

.post-body strong {
  color: rgb(250 250 249);
  font-weight: 600;
}

.post-body a {
  color: rgb(251 191 36);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: rgb(253 224 71);
}

.post-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-inline-end: 3px solid rgb(245 158 11 / 0.55);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.04);
  font-size: 1rem;
  color: rgb(214 211 209);
}

.post-body pre,
.post-code {
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(12 10 9 / 0.85);
  padding: 1rem 1.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  direction: ltr;
  text-align: left;
  color: rgb(214 211 209);
}

.post-body img {
  border-radius: 1rem;
  max-width: 100%;
  height: auto;
}

.post-body .wp-caption,
.post-body figure {
  margin: 1.75rem 0;
}

.post-body .wp-caption-text,
.post-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: rgb(168 162 158);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-float,
  .text-shimmer,
  .reveal.is-visible {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
