/* =========================================
   Variables & Theme Setup
========================================= */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0f172a;
  --bg-dark-alt: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.05);
  --transition: all 0.3s ease;
}

[data-theme="light"] {
  --primary: #2563eb;
  --bg-dark: #f8fafc;
  --bg-dark-alt: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --border-color: rgba(0, 0, 0, 0.05);
}

/* =========================================
   Base & Resets
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background-color 0.3s,
    color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--text-muted);
}

.text-white {
  color: var(--text-main);
}

.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.py-0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.section {
  padding: 6rem 0;
}

.bg-dark-alt {
  background-color: var(--bg-dark-alt);
}

.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--glass-bg);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

/* =========================================
   Header & Nav
========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .header {
  background: rgba(248, 250, 252, 0.8);
}

.navbar {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================
   Hero Section
========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  overflow: hidden;
}

.hero-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.subtitle {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typed-wrapper {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  height: 35px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-visuals {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
}

.icon-group {
  position: relative;
  width: 250px;
  height: 250px;
}

.floating-icon {
  position: absolute;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  backdrop-filter: blur(5px);
}

.icon-1 {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
  top: -10px;
  left: -20px;
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

.icon-2 {
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  top: 10px;
  right: -10px;
  animation: float 5s ease-in-out infinite 1s;
}

.icon-3 {
  width: 75px;
  height: 75px;
  font-size: 2rem;
  bottom: -20px;
  right: 10px;
  animation: float 7s ease-in-out infinite 2s;
}

.icon-4 {
  width: 35px;
  height: 35px;
  font-size: 1rem;
  bottom: 30px;
  left: -30px;
  animation: float 4s ease-in-out infinite 0.5s;
}

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.blob-1 {
  top: 20%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.4);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* =========================================
   About Section
========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image-placeholder {
  width: 100%;
  max-height: 400px;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.8),
    rgba(15, 23, 42, 0.9)
  );
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--border-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 15px;
}

.badge-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
}

.badge-text {
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--text-main);
}

.about-list {
  list-style: none;
  margin-bottom: 2rem;
}

.about-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}

/* =========================================
   Services Section
========================================= */
.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* =========================================
   Skills (Marquee)
========================================= */
.marquee-section {
  background: var(--bg-dark-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.marquee-container {
  display: flex;
  width: 105vw;
  margin-left: -2.5vw;
  transform: rotate(-2deg);
  padding: 3rem 0;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: scrollText 30s linear infinite;
}

.skill-item {
  font-size: 2rem;
  opacity: 0.85;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-muted);
  margin: 0 2rem;
  text-transform: uppercase;
  transform: skewX(-15deg);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-item i {
  -webkit-text-stroke: 0px;
  color: var(--primary);
  font-size: 1.5rem;
}

.skill-item:hover {
  color: var(--primary);
  -webkit-text-stroke: 0px;
  text-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* =========================================
   Projects Section
========================================= */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  position: relative;
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.project-card p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-weight: 500;
}

/* =========================================
   Testimonials
========================================= */
.testimonial-card {
  padding: 2.5rem 2rem;
  text-align: center;
}

.client-avatar {
  width: 70px;
  height: 70px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  margin: 0 auto 15px auto;
}

.client-stars {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.client-info h4 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.client-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Swiper Controls */
.swiper-controls-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.custom-nav-bottom {
  position: static !important;
  margin: 0 !important;
  width: 40px !important;
  height: 40px !important;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.custom-nav-bottom:hover {
  background: var(--primary);
  color: #fff !important;
}

.custom-nav-bottom::after {
  font-size: 1rem !important;
  font-weight: bold;
}

.swiper-pagination {
  position: static !important;
  width: auto !important;
}

.swiper-pagination-bullet-active {
  background: var(--primary) !important;
}

/* =========================================
   Dedicated CTA Section
========================================= */
.cta-section {
  position: relative;
  padding: 6rem 20px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border-color);
}

.cta-texture {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10%;
  pointer-events: none;
}

.texture-icon {
  font-size: 15rem;
  color: var(--text-main);
}

.cta-content {
  background: linear-gradient(
    135deg,
    rgba(30, 27, 75, 0.8) 0%,
    rgba(49, 46, 129, 0.8) 100%
  );
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 4rem 2rem;
  /* max-width: 800px; */
  max-width: 90vw;

  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.cta-content::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.4) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.cta-content p {
  font-size: 1.1rem;
  color: #c7d2fe;
}

/* =========================================
   New Footer
========================================= */
.new-footer {
  position: relative;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  background: radial-gradient(
    circle at top,
    rgba(30, 41, 59, 0.5) 0%,
    var(--bg-dark) 100%
  );
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.footer-brand h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: right;
}

.footer-link-item {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: 0.3s;
}

.footer-link-item:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.justify-center {
  justify-content: center;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

/* =========================================
   Media Queries
========================================= */
@media (max-width: 992px) {
  .hero-grid-2 {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visuals {
    display: none;
  }

  .title {
    font-size: 3rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    background: var(--bg-dark-alt);
    flex-direction: column;
    padding: 2rem;
    border-left: 1px solid var(--border-color);
    transition: 0.3s;
  }

  .nav-links.active {
    right: 0;
  }

  .menu-toggle {
    display: block;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .footer-links {
    text-align: center;
  }

  .cta-texture {
    display: none;
  }
}

/* ... تنظیمات اولیه و متغیرها را نگه دارید ... */

/* رفع مشکل Typed Text در موبایل */
.typed-wrapper {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  height: auto;
  min-height: 40px;
  /* جلوگیری از پرش متن */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

/* آیکون‌های شناور دسکتاپ - بزرگ‌تر شدند */
.icon-group {
  position: relative;
  width: 350px;
  height: 350px;
}

.icon-1 {
  width: 140px;
  height: 140px;
  font-size: 3.5rem;
  top: -10px;
  left: -30px;
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

.icon-2 {
  width: 70px;
  height: 70px;
  font-size: 1.8rem;
  top: 10px;
  right: -20px;
  animation: float 5s ease-in-out infinite 1s;
}

.icon-3 {
  width: 110px;
  height: 110px;
  font-size: 2.8rem;
  bottom: -10px;
  right: 20px;
  animation: float 7s ease-in-out infinite 2s;
}

.icon-4 {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  bottom: 50px;
  left: -20px;
  animation: float 4s ease-in-out infinite 0.5s;
}

/* دیزاین مدرن CTA */
.cta-section {
  position: relative;
  padding: 6rem 20px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border-color);
  overflow: hidden;
  /* جلوگیری از بیرون زدگی رنگ */
}

.cta-modern-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 60%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

/* ... کدهای پروژه‌ها را نگه دارید فقط بخش .tags پاک شود ... */

/* تغییرات مدیا کوئری برای رفع مشکلات موبایل */
@media (max-width: 992px) {
  .hero-grid-2 {
    grid-template-columns: 1fr;
    text-align: center;
    position: relative;
  }

  .hero-actions {
    justify-content: center;
  }

  /* نمایش آیکون ها در موبایل به صورت Blur */
  .hero-visuals {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    opacity: 0.25;
    /* شفافیت */
    filter: blur(8px);
    /* تاری برای شلوغ نشدن */
    pointer-events: none;
  }

  .icon-group {
    width: 250px;
    height: 250px;
  }

  /* کوچک شدن سایز در موبایل */

  .title {
    font-size: 3rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .typed-wrapper {
    font-size: 1.2rem;
    justify-content: center;
  }

  /* استایل بج تجربه در موبایل */
  .experience-badge {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -30px auto 0;
    /* کمی روی عکس بیاید */
    width: max-content;
    justify-content: center;
    z-index: 5;
  }
}
