
:root {
  --p1: #6B7FFF;
  --p2: #8B9FFF;
  --p3: #4A5FE0;
  --glow: rgba(107, 127, 255, 0.35);

  --bg:       #0a0b14;
  --bg2:      #0f1020;
  --surface:  rgba(255,255,255,0.04);
  --border:   rgba(107,127,255,0.18);
  --text:     #e8eaf6;
  --text-sub: #8892b0;
  --nav-bg:   rgba(10,11,20,0.75);
}

[data-theme="light"] {
  --bg:       #f0f2ff;
  --bg2:      #e4e8ff;
  --surface:  rgba(107,127,255,0.07);
  --border:   rgba(107,127,255,0.25);
  --text:     #1a1d3a;
  --text-sub: #4a5080;
  --nav-bg:   rgba(240,242,255,0.80);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
  transition: background .3s, color .3s;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Background ── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(107,127,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,127,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.blob {
  position: fixed; border-radius: 50%;
  filter: blur(90px); opacity: .18;
  pointer-events: none; z-index: 0;
  animation: blobMove 18s ease-in-out infinite alternate;
}
.blob-1 { width: 520px; height: 520px; background: var(--p1); top: -120px; right: -120px; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: var(--p3); bottom: 10%; left: -100px; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: var(--p2); top: 50%; left: 50%; animation-delay: -12s; }

@keyframes blobMove {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

/* ── Glass ── */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative; z-index: 1;
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: .95rem; letter-spacing: .08em;
  color: var(--text);
}
.nav-logo img { width: 34px; height: 34px; object-fit: contain; }
.nav-logo strong { color: var(--p1); }

.nav-links {
  display: flex; gap: 4px;
}
.nav-link {
  padding: 6px 14px; border-radius: 8px;
  font-size: .9rem; color: var(--text-sub);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--p1); background: rgba(107,127,255,.1); }

.nav-end { display: flex; align-items: center; gap: 10px; }

/* Theme button */
.theme-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.theme-btn:hover { border-color: var(--p1); background: rgba(107,127,255,.12); }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu-wrap {
  display: none; overflow: hidden;
  max-height: 0; transition: max-height .35s ease;
  border-top: 1px solid var(--border);
}
.mobile-menu-wrap.open { max-height: 320px; }
.mobile-menu-wrap ul { padding: 12px 24px 16px; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-wrap a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--text-sub); font-size: .95rem;
  transition: color .2s, background .2s;
}
.mobile-menu-wrap a:hover { color: var(--p1); background: rgba(107,127,255,.1); }


.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 60px;
  position: relative; z-index: 1;
  gap: 60px;
  max-width: 1100px; margin: 0 auto;
}

.hero-content { flex: 1; max-width: 560px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(107,127,255,.08);
  font-size: .82rem; color: var(--p2);
  margin-bottom: 24px; letter-spacing: .04em;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}
.hero-title .accent {
  display: block;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem; color: var(--text-sub);
  margin-bottom: 36px; max-width: 440px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero visual */
.hero-visual {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.logo-3d-wrap {
  position: relative; width: 260px; height: 260px;
  display: flex; align-items: center; justify-content: center;
}
.logo-3d-wrap img {
  width: 200px; height: 200px; object-fit: contain;
  position: relative; z-index: 1;
  animation: floatLogo 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px var(--glow));
}
.logo-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes floatLogo {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}
@keyframes pulseGlow {
  0%,100% { opacity: .6; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.1); }
}


.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 12px;
  font-family: inherit; font-size: .95rem; font-weight: 500;
  cursor: pointer; border: none; transition: all .25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--p1), var(--p3));
  color: #fff;
  box-shadow: 0 4px 20px rgba(107,127,255,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(107,127,255,.5); }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--p1); color: var(--p1); background: rgba(107,127,255,.1); }

.btn-sm {
  padding: 8px 18px; font-size: .85rem; border-radius: 8px;
  background: linear-gradient(135deg, var(--p1), var(--p3));
  color: #fff;
}
.btn-sm:hover { transform: translateY(-1px); }

/* ══════════════════════════════════════
   SECTIONS
══════════════════════════════════════ */
.section { padding: 100px 0; position: relative; z-index: 1; }
.section-alt { background: rgba(107,127,255,.03); }


.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(107,127,255,.08);
  font-size: .8rem;
  color: var(--p2);
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
}


.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}
.about-card {
  padding: 32px 28px;
  border-radius: 20px;
  transition: transform .25s, border-color .25s;
}
.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--p1);
}
.about-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}
.about-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.about-card p {
  font-size: .92rem;
  color: var(--text-sub);
  line-height: 1.75;
}

/* Stats */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 40px 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
}
.stat-item {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
}
.stat-n {
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-plus {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--p1);
  margin-right: -8px;
  align-self: flex-start;
  margin-top: 4px;
}
.stat-l {
  font-size: .88rem;
  color: var(--text-sub);
}
.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   SKILLS
══════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.skill-card {
  padding: 22px 24px;
  border-radius: 16px;
  transition: transform .25s, border-color .25s;
}
.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--p1);
}
.skill-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.skill-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}
.skill-name {
  flex: 1;
  font-weight: 600;
  font-size: .95rem;
}
.skill-pct {
  font-size: .85rem;
  color: var(--p2);
  font-weight: 700;
}
.skill-track {
  height: 6px;
  background: rgba(107,127,255,.15);
  border-radius: 100px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--p3), var(--p2));
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 10px var(--glow);
}

/* ══════════════════════════════════════
   PROJECTS
══════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--p1);
}
.project-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(107,127,255,.08);
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.project-card:hover .project-thumb img {
  transform: scale(1.06);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,11,20,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.project-body {
  padding: 22px 24px;
}
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag {
  padding: 3px 12px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(107,127,255,.12);
  color: var(--p2);
  border: 1px solid rgba(107,127,255,.2);
}
.project-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.project-body p {
  font-size: .88rem;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ══════════════════════════════════════
   TEAM
══════════════════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.member-card {
  padding: 36px 24px 28px;
  border-radius: 20px;
  text-align: center;
  transition: transform .25s, border-color .25s;
}
.member-card:hover {
  transform: translateY(-5px);
  border-color: var(--p1);
}
.member-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
}
.member-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 2px solid var(--border);
}
.member-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--p1), var(--p2)) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: spinRing 6s linear infinite;
}
@keyframes spinRing {
  to { transform: rotate(360deg); }
}
.member-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.member-role {
  font-size: .85rem;
  color: var(--p2);
  margin-bottom: 18px;
  font-weight: 500;
}
.member-socials {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.member-socials a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
}
.member-socials a:hover {
  border-color: var(--p1);
  background: rgba(107,127,255,.12);
}
.member-socials img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 600px;
  margin: 0 auto;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 16px;
  transition: transform .25s, border-color .25s;
}
.contact-card:hover {
  transform: translateX(-4px);
  border-color: var(--p1);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(107,127,255,.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-platform {
  font-size: .8rem;
  color: var(--text-sub);
  font-weight: 500;
}
.contact-handle {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}
.contact-arrow {
  font-size: 1.1rem;
  color: var(--p1);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .25s, transform .25s;
}
.contact-card:hover .contact-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer p {
  font-size: .85rem;
  color: var(--text-sub);
}

/* ══════════════════════════════════════
   REVEAL ANIMATION
══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu-wrap { display: block; }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 90px;
    gap: 36px;
  }
  .hero-actions { justify-content: center; }
  .hero-desc { margin: 0 auto 36px; }
  .logo-3d-wrap { width: 180px; height: 180px; }
  .logo-3d-wrap img { width: 140px; height: 140px; }

  .stats-row { gap: 0; }
  .stat-divider { display: none; }
  .stat-item { border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .section { padding: 70px 0; }
  .about-grid,
  .skills-grid,
  .projects-grid,
  .team-grid { grid-template-columns: 1fr; }
}
.nav-link.active {
  color: var(--p1);
  background: rgba(107,127,255,.1);
}
.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;   
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;  
  display: block;
}

* { cursor: none; }

#cursor {
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(107, 127, 255, 0.8);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s ease,
              border-color 0.3s ease;
  backdrop-filter: blur(2px);
}

#cursor-dot {
  width: 6px;
  height: 6px;
  background: #8B9FFF;
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 6px #6B7FFF;
}

#cursor.hover {
  width: 64px;
  height: 64px;
  background: rgba(107, 127, 255, 0.08);
  border-color: #8B9FFF;
  box-shadow: 0 0 20px rgba(107, 127, 255, 0.3), inset 0 0 20px rgba(107, 127, 255, 0.05);
}

#cursor.click {
  width: 28px;
  height: 28px;
  background: rgba(107, 127, 255, 0.2);
}

.particle {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  animation: particle-burst 0.7s ease-out forwards;
}

@keyframes particle-burst {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
