:root {
  --bg: #050511;
  --bg-soft: #0b1020;
  --text: #ffffff;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.02);
  --glass-strong: rgba(255, 255, 255, 0.04);
  --blue: #1e3a8a;
  --purple: #6b21a8;
  --green: #28c76f;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-sm: 18px;
  --container: 1200px;
  --transition: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(92%, var(--container));
  margin: 0 auto;
}

.site-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: #1e3a8a;
  top: 10%;
  right: 8%;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: #6b21a8;
  bottom: 15%;
  left: 10%;
}

.orb-3 {
  width: 220px;
  height: 220px;
  background: #28c76f;
  top: 45%;
  left: 45%;
  opacity: 0.12;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(5, 5, 17, 0.55);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,58,138,0.9), rgba(107,33,168,0.9));
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.35);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: var(--muted);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 17, 0.92);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  width: min(92%, var(--container));
  margin: 0 auto;
  padding: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-nav a {
  color: var(--text);
  padding: 10px 0;
}

.mobile-cta {
  margin-top: 8px;
}

.desktop-only {
  display: inline-flex;
}

.section {
  padding: 110px 0;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
  color: #d4d4d8;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 5.3rem);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff, #9bb8ff, #c999ff, #ffffff);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 6s linear infinite;
}

.hero-text,
.section-head p,
.project-content p,
.profile-meta p {
  color: var(--muted);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  transition: var(--transition);
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #6b21a8);
  color: white;
  box-shadow: 0 14px 36px rgba(30,58,138,0.28);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: white;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.06);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.glass {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 22px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 4px;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

.hero-visual {
  position: relative;
}

.profile-card {
  border-radius: 32px;
  overflow: hidden;
  padding: 18px;
}

.profile-image {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 18px;
}

.profile-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.profile-meta h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.35;
  margin-bottom: 14px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.skill-card {
  padding: 22px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.skill-card:hover {
  transform: scale(1.02);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 20px rgba(30,58,138,0.18);
}

.skill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e3a8a, #6b21a8, #28c76f);
  box-shadow: 0 0 24px rgba(107, 33, 168, 0.35);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.project-card {
  border-radius: 28px;
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: scale(1.02);
  border-color: rgba(255,255,255,0.1);
}

.project-image-btn {
  width: 100%;
}

.project-image-btn img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image-btn img {
  transform: scale(1.04);
  filter: brightness(1.06);
}

.project-content {
  padding: 22px;
}

.project-content h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.project-content p {
  margin-bottom: 14px;
}

.project-tag {
  display: inline-block;
  color: #d4d4d8;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.contact-box {
  padding: 38px;
  border-radius: 32px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.social-link {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  transition: var(--transition);
  color: white;
}

.social-link:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 24px rgba(40, 199, 111, 0.15);
}

.footer {
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 2000;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  width: 100%;
  text-align: center;
}

.lightbox-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
}

.lightbox-content p {
  margin-top: 14px;
  color: #d4d4d8;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  z-index: 3;
  color: white;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.reveal {
  opacity: 0;
  filter: blur(15px);
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease, filter 1s ease;
}

.reveal.show {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes floatOrb {
  from { transform: translateY(0) translateX(0) scale(1); }
  to { transform: translateY(-30px) translateX(20px) scale(1.08); }
}

@media (max-width: 991px) {
  .hero-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .desktop-nav,
  .desktop-only {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .profile-image img {
    height: 420px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 85px 0;
  }

  .header-inner {
    min-height: 74px;
  }

  .contact-box {
    padding: 24px;
  }

  .project-image-btn img {
    height: 230px;
  }

  .lightbox-close {
    top: 14px;
    left: 14px;
  }
}