/* ===========================================================
   Aryan Moghaddasi — Contact Card
   پالت رنگی از روی لوگوی قرمز برند چیده شده
   =========================================================== */

:root {
  --bg:        #07070b;
  --bg-2:      #0e0d14;
  --surface:   rgba(255, 255, 255, 0.04);
  --border:    rgba(255, 255, 255, 0.09);
  --text:      #f4f4f7;
  --muted:     #9a9aa8;
  --brand:     #6f6e70;
  --brand-2:   #6f6e70;
  --brand-deep:#453235;
  --ring: conic-gradient(from 0deg,
            var(--brand) 0deg, var(--brand-2) 120deg,
            #ffffff 200deg, var(--brand) 360deg);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  direction: rtl;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  background: var(--bg);
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- پس‌زمینه: شفق قطبی نرم پشت ذرات ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(45% 40% at 50% 0%,   rgba(255, 46, 77, 0.22), transparent 70%),
    radial-gradient(40% 45% at 85% 90%,  rgba(120, 60, 220, 0.18), transparent 70%),
    radial-gradient(40% 45% at 12% 85%,  rgba(255, 100, 126, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  from { filter: hue-rotate(0deg) saturate(1); }
  to   { filter: hue-rotate(-12deg) saturate(1.15); }
}

#particles-js {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ---------- کارت شیشه‌ای ---------- */
.content {
  position: relative;
  z-index: 2;
  width: min(440px, 92vw);
  padding: 3rem 2.2rem 2.6rem;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 60px -30px var(--brand);
  animation: cardIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* خط نوری بالای کارت */
.content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  opacity: 0.7;
}

/* ---------- آواتار با حلقه‌ی چرخان ---------- */
.logo-wrapper {
  --size: 116px;
  width: var(--size);
  height: var(--size);
  margin: 0 auto 1.4rem;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  animation: floatIn 1s ease 0.1s both;
}
.logo-wrapper::before {           /* حلقه‌ی گرادینت چرخان */
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--ring);
  animation: spin 6s linear infinite;
  filter: blur(0.4px);
}
.logo-wrapper::after {            /* پر کردن وسط حلقه */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0b0a10;
}
.logo-wrapper img {
  position: relative;
  z-index: 1;
  width: 62%;
  height: 62%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 0 14px rgba(255, 46, 77, 0.55));
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- اسم با افکت تایپ ---------- */
.typewriter {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
  min-height: 1.2em;
  background: linear-gradient(180deg, #ffffff 30%, var(--brand-2) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s ease 0.25s both;
}
.typewriter::after {              /* مکان‌نمای چشمک‌زن */
  content: "|";
  -webkit-text-fill-color: var(--brand);
  font-weight: 400;
  margin-inline-start: 2px;
  animation: blink 0.9s step-end infinite;
}
.typewriter.done::after { animation: none; opacity: 0; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- توضیحات ---------- */
.description {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 340px;
  margin: 0 auto 2rem;
  line-height: 2.1;
  animation: fadeUp 0.8s ease 0.4s both;
}

/* ---------- آیکون‌های شبکه‌های اجتماعی ---------- */
.icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  animation: fadeUp 0.8s ease 0.55s both;
}
.icons a {
  --brand: #ffffff;             /* مقدار پیش‌فرض؛ هر لینک خودش override می‌کنه */
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--muted);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease;
}
.icons a:hover,
.icons a:focus-visible {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  box-shadow: 0 8px 24px -8px var(--brand),
              0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent) inset;
  transform: translateY(-4px);
  outline: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 480px) {
  .content { padding: 2.4rem 1.5rem 2rem; }
  .typewriter { font-size: 2.1rem; }
  .description { font-size: 0.95rem; line-height: 2; }
  .logo-wrapper { --size: 100px; }
  .icons a { width: 48px; height: 48px; font-size: 1.25rem; }
}

/* ---------- احترام به کاهش انیمیشن ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
