:root {
  --gold-light: #d4af37;
  --gold-dark: #b98f1b;
  --gold-shadow: rgba(212, 175, 55, 0.6);
  --gold-shadow-strong: rgba(245, 166, 35, 0.8);
  --background-dark: #1a1a1a;
  --text-light: #e9e4d4;
  --text-muted: #e9d87a;
  --text-dark: #121212;
}

/* ===== Projects grid ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* ===== Each project card ===== */
.project-card {
  position: relative;
  background: var(--background-dark);
  border-radius: 12px;
  box-shadow: 0 0 20px var(--gold-light)aa;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  text-align: start;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 45px var(--gold-shadow-strong);
}

.project-card:hover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(245, 166, 35, 0.1);
  pointer-events: none;
  transition: background-color 0.3s ease;
}

/* ===== Project header ===== */
.project-header h2 {
  color: var(--gold-light);
  margin: 0 0 0.6rem 0;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw + 0.1rem, 1.5rem);
  text-shadow: 0 0 8px var(--gold-dark)cc;
  text-align: center;
  letter-spacing: 0.03em;
}

/* ===== Project tag ===== */
.project-tag {
  font-size: clamp(0.75rem, 0.9vw + 0.05rem, 0.95rem);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.3rem;
  font-weight: 600;
}

/* ===== Project body ===== */
.project-body p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: clamp(0.85rem, 1vw + 0.1rem, 1.05rem);
  text-align: start;
  overflow-wrap: break-word;
}

/* ===== Tech stack badges ===== */
.tech-stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin-bottom: 1rem;
}

.tech-stack li {
  background-color: var(--gold-light);
  color: var(--text-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: clamp(0.75rem, 0.8vw, 0.9rem);
  font-weight: 700;
  user-select: none;
  box-shadow: 0 0 10px var(--gold-dark)99;
}

/* ===== Project links ===== */
.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-links a {
  background-color: var(--gold-light);
  color: var(--text-dark);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 15px var(--gold-dark)99;
  transition: background-color 0.3s ease, box-shadow 0.4s ease;
  user-select: none;
  font-size: clamp(0.85rem, 0.9vw + 0.05rem, 1rem);
}

.project-links a:hover,
.project-links a:focus-visible {
  background-color: var(--gold-dark);
  box-shadow: 0 0 25px var(--gold-shadow-strong);
  outline: none;
}

/* ===== Profile image ===== */
#profileSmall {
  width: 150px;
  height: 150px;
  max-width: 100%;
  max-height: 150px;
  border-radius: 20%;
  object-fit: cover;
  box-shadow: 0 0 50px var(--gold-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

#profileSmall:hover {
  transform: scale(1.05);
  box-shadow: 0 0 75px var(--gold-shadow-strong);
}

/* ===== Responsive ===== */

/* لپ‌تاپ و دسکتاپ متوسط */
@media (max-width: 1200px) {
  .project-card {
    padding: 1.8rem 1.5rem;
  }
  .project-header h2 {
    font-size: clamp(1.05rem, 1.4vw, 1.4rem);
  }
  .project-body p {
    font-size: clamp(0.8rem, 0.9vw, 1rem);
  }
  .tech-stack li {
    font-size: clamp(0.7rem, 0.75vw, 0.85rem);
  }
  .project-links a {
    font-size: clamp(0.8rem, 0.85vw, 0.95rem);
  }
  #profileSmall {
    width: 140px;
    height: 140px;
  }
}

/* تبلت معمولی و کوچک */
@media (max-width: 900px) {
  .project-card {
    padding: 1.5rem 1.2rem;
  }
  .project-header h2 {
    font-size: clamp(1rem, 1.1vw, 1.3rem);
  }
  .project-body p {
    font-size: clamp(0.75rem, 0.85vw, 0.95rem);
  }
  .tech-stack li {
    font-size: clamp(0.65rem, 0.7vw, 0.8rem);
  }
  .project-links a {
    font-size: clamp(0.75rem, 0.8vw, 0.9rem);
  }
  #profileSmall {
    width: 120px;
    height: 120px;
  }
}

/* موبایل بزرگ (فبلت) */
@media (max-width: 600px) {
  .project-card {
    padding: 1.2rem 1rem;
  }
  .project-header h2 {
    font-size: clamp(0.95rem, 1vw, 1.2rem);
  }
  .project-body p {
    font-size: clamp(0.7rem, 0.95vw, 0.9rem);
  }
  .tech-stack li {
    font-size: clamp(0.6rem, 0.65vw, 0.75rem);
  }
  .project-links a {
    font-size: clamp(0.7rem, 0.75vw, 0.85rem);
  }
  #profileSmall {
    width: 100px;
    height: 100px;
  }
}

/* موبایل متوسط و کوچک */
@media (max-width: 400px) {
  .project-card {
    padding: 1rem 0.8rem;
  }
  .project-header h2 {
    font-size: clamp(0.85rem, 0.85vw, 1rem);
  }
  .project-body p {
    font-size: clamp(0.65rem, 0.8vw, 0.85rem);
  }
  .tech-stack li {
    font-size: clamp(0.55rem, 0.6vw, 0.7rem);
  }
  .project-links a {
    font-size: clamp(0.6rem, 0.65vw, 0.8rem);
    padding: 0.4rem 0.8rem;
  }
  #profileSmall {
    width: 90px;
    height: 90px;
  }
}
