:root {
  --neon: #00f0ff;
  --bg1: #0f2027;
  --bg2: #203a43;
  --bg3: #2c5364;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazir', sans-serif;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
  direction: rtl;
}

header {
  text-align: center;
  padding: 40px 20px 30px 20px;
}

header h1 {
  font-size: 3rem;
  font-weight: 600;
  text-shadow: 0 0 15px var(--neon), 0 0 30px var(--neon), 0 0 50px var(--neon);
  animation: flicker 2s infinite alternate;
}

header p {
  font-size: 1.2rem;
  margin-top: 12px;
  font-weight: 400;
  text-shadow: 0 0 10px var(--neon), 0 0 20px var(--neon);
}

@keyframes flicker {
  0%, 100% { text-shadow: 0 0 15px var(--neon), 0 0 30px var(--neon); }
  50% { text-shadow: 0 0 20px var(--neon), 0 0 40px var(--neon); }
}

.projects {
  display: grid;
  gap: 35px;
  padding: 60px 20px;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  direction: rtl;
}

@media (max-width: 1024px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .projects { grid-template-columns: 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: right;
  background: rgba(0,255,255,0.05);
  padding: 20px 15px;
  border-radius: 25px;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(0,255,255,0.3);
  color: white;
  min-height: 250px;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
}

.card:hover {
  transform: translateY(-12px) scale(1.05);
  background: rgba(0,255,255,0.2);
  box-shadow: 0 0 30px var(--neon), 0 0 60px var(--neon), 0 0 90px var(--neon);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 15px;
}

.card p {
  font-size: 0.95rem;
  margin-top: 12px;
  text-align: center;
  text-shadow: 0 0 5px var(--neon);
  line-height: 1.6;
}

.card .stack {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #fff;
  opacity: 0.9;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .card{ padding: 25px; }
  header p{
    font-size: 0.8rem;
  }
  header h1{
    font-size: 2rem;
  }
}

#particle-canvas {
  position: fixed;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

a { text-decoration: none; color: white; }
