/* ==========================================================================
   02 — BASE
   ریست، html/body، پس‌زمینه‌ی متحرک، کارت شیشه‌ای، عنوان‌ها، انیمیشن ورود
   ========================================================================== */

/*-------*\
   RESET
\*-------*/
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a { text-decoration: none; color: inherit; }
li { list-style: none; }
img { display: block; max-width: 100%; }
img, a, button, time { display: block; }

/* آیکون‌های SVG محلی (mask — رنگ از currentColor والد گرفته می‌شود) */
.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: middle;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  text-align: start;
  cursor: pointer;
}
input, textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--purple-blue);
  color: var(--ink-0);
}
:focus-visible {
  outline: 2px solid var(--cyan-blue);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

html {
  font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body {
  position: relative;
  min-height: 100vh;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-body);
  text-align: start;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ---------- Animated aurora background (glass needs color behind it) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: -10vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 18% 22%, hsla(210, 100%, 62%, 0.42) 0%, transparent 70%),
    radial-gradient(34% 34% at 82% 26%, hsla(255, 100%, 70%, 0.34) 0%, transparent 70%),
    radial-gradient(40% 40% at 60% 92%, hsla(32, 100%, 66%, 0.2) 0%, transparent 70%),
    radial-gradient(30% 30% at 88% 88%, hsla(340, 90%, 66%, 0.16) 0%, transparent 70%);
  animation: aurora-drift 60s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.02); }
}

/*-----------*\
 REUSED STYLE
\*-----------*/
/* کارت شیشه‌ای اصلی (سایدبار و آرتیکل‌ها) */
.sidebar,
article {
  position: relative;
  isolation: isolate;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow), var(--glass-edge);
  padding: 20px;
  width: 100%;
  max-width: 100%;
}
/* لبه نوری (rim light) مخصوص شیشه iOS */
.sidebar::before,
article::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg,
    var(--rim-1) 0%,
    var(--rim-2) 28%,
    var(--rim-3) 70%,
    var(--rim-4) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}
.sidebar > *, article > * { position: relative; z-index: 1; }

.separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sep), transparent);
  margin: 18px 0;
}

/* آیکون‌های کوچک داخل جعبه‌های شیشه‌ای */
.icon-box {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-xs);
  color: var(--cyan-blue);
  background: var(--glass-fill-soft);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-edge), var(--glass-shadow-sm);
  font-size: 18px;
}
.icon-box .icon-svg { width: 20px; height: 20px; }

article { display: none; }
article.active {
  display: block;
  animation: article-in var(--t-med) both;
}
@keyframes article-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.h2,
.h3,
.h4,
.h5 {
  color: var(--ink-0);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.h2 { font-size: var(--fs-h2); font-weight: var(--fw-700); }
.h3 { font-size: var(--fs-h3); font-weight: var(--fw-600); }
.h4 { font-size: var(--fs-h4); font-weight: var(--fw-600); }
.h5 { font-size: var(--fs-body); font-weight: var(--fw-500); color: var(--ink-1); }

.article-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 44px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--accent-grad);
  box-shadow: 0 0 14px hsla(210, 100%, 65%, 0.6);
}
article.active .article-title::after { animation: underline-in 0.9s var(--ease-out) both 0.15s; }
@keyframes underline-in {
  from { width: 0; }
  to   { width: 44px; }
}

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal {
  opacity: 0;
  translate: 0 22px;
  scale: 0.98;
  transition:
    opacity 0.6s var(--ease-out),
    translate 0.6s var(--ease-out),
    scale 0.6s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
/* individual transform properties (translate/scale) so they never clash with hover transforms */
.js .reveal.is-visible {
  opacity: 1;
  translate: none;
  scale: none;
}

/* کارت کوچک شیشه‌ای (برای مهارت‌ها، نظرات، خدمات) */
.content-card {
  position: relative;
  background: var(--glass-fill-soft);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--glass-shadow-sm), var(--glass-edge);
  padding: 20px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

/*------*\
   MAIN
\*------*/
main {
  position: relative;
  margin: 16px 12px 110px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
