/* ==========================================================================
   Ali Nasirlou — Portfolio Stylesheet
   Organized by: base / background fx / nav / buttons / hero / sections /
   skill cards / project cards / resume panel / contact / utilities
   ========================================================================== */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth; /* fallback; JS also handles smooth scroll with offset */
}

body {
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #08070D; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8B5CF6, #00D4FF);
  border-radius: 6px;
}

/* ---------- Decorative background layer ---------- */
.hex-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

.glow-blob {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
}
.glow-blob--violet { top: -120px; left: -120px; background: #8B5CF6; }
.glow-blob--ether   { bottom: 10%; right: -160px; background: #00D4FF; }

/* ---------- Navigation ---------- */
#navbar.is-scrolled {
  background: rgba(8, 7, 13, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link { color: #fff; }
.nav-link--item {
  position: relative;
  color: #9CA3C2;
  transition: color 0.25s ease;
}
.nav-link--item::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0%; height: 1px;
  background: linear-gradient(90deg, #8B5CF6, #00D4FF);
  transition: width 0.25s ease;
}
.nav-link--item:hover { color: #fff; }
.nav-link--item:hover::after,
.nav-link--item.is-active::after { width: 100%; }
.nav-link--item.is-active { color: #fff; }

.mobile-nav-link {
  display: block;
  padding: 0.7rem 0.25rem;
  color: #9CA3C2;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.2s ease;
}
.mobile-nav-link:hover,
.mobile-nav-link.is-active { color: #00D4FF; }

.burger-line {
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#menuToggle.is-open .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menuToggle.is-open .burger-line:nth-child(2) { opacity: 0; }
#menuToggle.is-open .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons / pills ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #08070D;
  background: linear-gradient(90deg, #00D4FF, #8B5CF6);
  border-radius: 9999px;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45), 0 0 8px rgba(0, 212, 255, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(139, 92, 246, 0.65), 0 0 14px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9999px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn-secondary:hover {
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(255,255,255,0.03);
}

.btn-ghost-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9999px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn-ghost-sm:hover {
  border-color: rgba(0,212,255,0.5);
  box-shadow: 0 0 14px rgba(0,212,255,0.25);
}

.pill {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #C9C2F0;
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00D4FF;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00D4FF;
  box-shadow: 0 0 8px 2px rgba(0, 212, 255, 0.8);
}

/* ---------- Hero ---------- */
.text-glow-gradient {
  background: linear-gradient(90deg, #8B5CF6, #B026FF 45%, #00D4FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.35));
}

.audit-card {
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(139,92,246,0.08), rgba(0,212,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.18), inset 0 0 40px rgba(0,212,255,0.03);
  overflow: hidden;
}
.audit-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot--red { background: #FF5F57; }
.dot--yellow { background: #FEBC2E; }
.dot--green { background: #28C840; }
.audit-card__body {
  padding: 1.2rem 1.2rem 1.4rem;
}
.audit-card__body p { margin-bottom: 0.55rem; white-space: pre-wrap; }
.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  width: 22px; height: 36px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  display: none;
}
@media (min-width: 1024px) { .scroll-cue { display: block; } }
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #00D4FF;
  box-shadow: 0 0 6px rgba(0,212,255,0.8);
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { top: 6px; opacity: 1; }
  60% { top: 18px; opacity: 0.2; }
  100% { top: 6px; opacity: 0; }
}

/* ---------- Skill cards ---------- */
.skill-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}
.skill-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  font-size: 1.1rem;
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.skill-card__title {
  margin-top: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
}
.chip {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #9CA3C2;
}
.chip--primary {
  color: #fff;
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.1);
}

/* ---------- Project cards ---------- */
.project-card {
  position: relative;
  padding: 2rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 212, 255, 0.35);
}
.project-card__glow {
  position: absolute;
  top: -40%; right: -20%;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(139,92,246,0.35), transparent 70%);
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.project-card:hover .project-card__glow { opacity: 1; }
.project-card__head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.project-card__index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #00D4FF;
}
.project-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}
.project-card__desc {
  color: #9CA3C2;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tag {
  font-size: 0.75rem;
  padding: 0.28rem 0.65rem;
  border-radius: 7px;
  color: #C9C2F0;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #00D4FF;
  transition: gap 0.2s ease, color 0.2s ease;
}
.project-card__link:hover { gap: 0.65rem; color: #fff; }

/* ---------- Resume panel ---------- */
.resume-panel {
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(0,212,255,0.06));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.15);
}
.resume-panel__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem;
}

/* ---------- Contact pills ---------- */
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.contact-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ---------- Reduced motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue span, .cursor-blink { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Focus visibility (accessibility) ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid #00D4FF;
  outline-offset: 3px;
  border-radius: 6px;
}


/* اضافه کردن به انتهای style.css برای کنترل دقیق فاصله */
.custom-icon-spacing {
    margin-top: -40px !important; /* با این مقدار بازی کنید تا دقیقاً به دکمه بچسبد */
    padding-top: 10px;
}


/* افکت درخشش نیونی برای اعداد */
.neon-glow {
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5), /* رنگ آبی ملایم */
                 0 0 20px rgba(56, 189, 248, 0.3);
    transition: all 0.3s ease;
}

/* هاور کردن روی اعداد برای درخشش بیشتر */
.group:hover .neon-glow {
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.8),
                 0 0 30px rgba(56, 189, 248, 0.6);
    color: #38bdf8; /* رنگ آبی فیروزه‌ای که با سایتت هماهنگ است */
}


/* در انتهای style.css اضافه کن */
@media (max-width: 768px) {
  .glow-blob {
    width: 300px; /* کوچک کردن سایز درخشش در موبایل */
    height: 300px;
    opacity: 0.3; /* کم کردن شدت روشنایی */
    filter: blur(80px);
  }
}


/* در فایل style.css */
.skill-card, .project-card {
    transition: all 0.3s ease;
}

/* این کلاس شامل تمام استایل‌های هاور توست */
.skill-card:hover, .skill-card.active-hover,
.project-card:hover, .project-card.active-hover {
    transform: translateY(-10px);
    border-color: #3b82f6; /* رنگ دلخواه */
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}