/* ========== فونت و ریست ========== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: #0a0c0f;
  color: #e0e0e0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  position: relative;
  line-height: 1.7;
}

/* ========== پس‌زمینه ذرات متحرک (Canvas) ========== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* کانتینر اصلی */
.main-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(2px);
}

/* ========== استایل‌های عمومی ========== */
section {
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  position: relative;
  letter-spacing: -0.5px;
}

h2 i {
  color: #00f2fe;
  font-size: 2.2rem;
  background: rgba(0, 242, 254, 0.1);
  padding: 0.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.glass-card {
  background: rgba(20, 25, 30, 0.65);
  backdrop-filter: blur(18px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 242, 254, 0.05);
  padding: 2rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 242, 254, 0.15), inset 0 0 30px rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
}

/* ========== هدر و معرفی ========== */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  min-height: 80vh;
  padding-top: 2rem;
}

.avatar-container {
  flex: 0 0 220px;
  position: relative;
}

.avatar {
  width: 220px;
  height: 220px;
  border-radius: 40% 60% 70% 30% / 45% 45% 55% 55%;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  padding: 5px;
  animation: morphBlob 8s infinite alternate ease-in-out;
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.4);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 40% 60% 70% 30% / 45% 45% 55% 55%;
  display: block;
  background: #1e1e2f;
}

@keyframes morphBlob {
  0% { border-radius: 40% 60% 70% 30% / 45% 45% 55% 55%; }
  25% { border-radius: 55% 45% 35% 65% / 50% 60% 40% 50%; }
  50% { border-radius: 65% 35% 45% 55% / 60% 40% 60% 40%; }
  75% { border-radius: 45% 55% 60% 40% / 40% 65% 35% 60%; }
  100% { border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%; }
}

.hero-text {
  flex: 1;
  min-width: 280px;
}

.typing-container {
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 1rem;
}

#typing-text {
  background: linear-gradient(to right, #00f2fe, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-left: 4px solid #00f2fe;
  padding-left: 15px;
  animation: blinkCursor 0.9s infinite;
}

@keyframes blinkCursor {
  0%, 100% { border-color: #00f2fe; }
  50% { border-color: transparent; }
}

.subtitle {
  font-size: 1.4rem;
  font-weight: 500;
  color: #b0c4de;
  margin: 0.5rem 0 1.5rem;
}

.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
}

.social-links a {
  font-size: 1.8rem;
  color: #ccc;
  transition: 0.3s;
  background: rgba(255,255,255,0.05);
  padding: 0.6rem;
  border-radius: 20px;
  backdrop-filter: blur(12px);
}

.social-links a:hover {
  color: #00f2fe;
  transform: translateY(-5px) scale(1.1);
  background: rgba(0,242,254,0.15);
}

/* ========== مهارت‌ها ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.8rem;
  margin-top: 1rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
}

.skill-icon {
  font-size: 2.8rem;
  color: #00f2fe;
  filter: drop-shadow(0 0 12px #00f2fe);
  animation: floatIcon 3s infinite alternate;
}

@keyframes floatIcon {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe, #4facfe);
  border-radius: 20px;
  transition: width 1.5s ease;
  box-shadow: 0 0 15px #00f2fe;
}

/* ========== پروژه‌ها ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.2rem;
}

.project-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(45deg, #0f2027, #203a43, #2c5364);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #00f2fe;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  padding: 0.2rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ========== فوتر ========== */
footer {
  text-align: center;
  margin-top: 3rem;
  opacity: 0.8;
  font-weight: 300;
}

/* ========== ریسپانسیو ========== */
@media (max-width: 700px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .typing-container {
    font-size: 2.2rem;
  }
}