:root {
  --main-color: #8A2BE2;        /* بنفش سلطنتی */
  --accent-color: #00c3ff;      /* آبی الکتریکی */
  --text-light: #e0e0e0;        /* خاکستری روشن برای متن */
  --bg-dark: #111;              /* پس‌زمینه تیره کلی */
  --bg-card: #2c2c2c;           /* پس‌زمینه کارت‌ها */
}

html, body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #111;
  color: var(--text-light);
  overflow-x: hidden;
}

#main-header {
  position: relative;
  top: 0;
  width: 95%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  z-index: 10000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  background: linear-gradient(145deg, rgba(138, 43, 226, 0.9), rgba(0, 195, 255, 0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-btn {
  text-decoration: none;
  color: var(--text-light);
  border: 2px solid transparent;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: bold;
}

.nav-btn:hover {
  border-color: #8A2BE2;
  color: #8A2BE2;
  background-color: rgba(138, 43, 226, 0.1);
  box-shadow: 0 0 10px #8A2BE2;
}

.nav-btn.active {
  border-bottom: 2px solid #8A2BE2;
  color: #8A2BE2;
  font-weight: bold;
}

canvas {
  display: block;
  width: 100%;
  height: 60vh;
  z-index: 1;
  position: relative;
}

.mouse-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: particle-fade 1s ease-out forwards;
}

@keyframes particle-fade {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes screen-shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float-points {
  0%   { transform: translateX(-50%) translateY(0); opacity: 0.3; }
  50%  { transform: translateX(-50%) translateY(-5px); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0); opacity: 0.3; }
}

body.shake .shake-wrapper {
  animation: screen-shake 0.1s infinite;
}

#skills {
  padding: 10px 0;
  background-color: #111;
  text-align: justify;
}

.section-title {
  font-size: 30px;
  color: #8A2BE2;
  text-shadow: 0 0 5px #00c3ff;
  margin-bottom: 20px;
  position: static;
  text-align: center;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* ایجاد دو ستون */
  gap: 20px; /* فاصله بین کارت‌ها */
  padding: 10px 20px;
  max-width: 1000px; /* عرض حداکثر برای بهبود نمایش */
  margin: 0 auto;
}

.skill-box {
  background-color: #2c2c2c;
  padding: 25px;
  border-radius: 15px;
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 120px; /* تنظیم ارتفاع کارت‌ها */
}

.skill-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

.skill-box h3 {
  color: #00c3ff;
  font-size: 20px;
  margin-bottom: 15px;
  text-transform: uppercase; /* تغییر به حروف بزرگ */
}

.skill-box p {
  font-size: 14px;
  line-height: 1.7;
  color: #ccc;
}


/* Resume Section */
#resume {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  width: 90%;
  margin: 30px auto;
  padding: 30px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 15px rgba(255,255,255,0.1);
  font-family: "Vazirmatn", sans-serif;
  line-height: 2;
  text-align: justify;
}

#resume p, #resume li {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(15px);
  animation-delay: 0.3s;
}

#resume h1 {
  color: #8A2BE2;
  font-size: 28px;
  margin-bottom: 20px;
}

#resume h1:hover {
  color: #fff;
  text-shadow: 0 0 10px #00c3ff;
  transition: 0.3s;
}

#resume h3 {
  color: #00c3ff;
}

#resume li:hover {
  color: #8A2BE2;
  transform: scale(1.03);
  transition: all 0.3s ease-in-out;
}

#resume-Space {
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

/* Cards */
.achievement-cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at top left, rgba(138, 43, 226, 0.15), rgba(0, 0, 0, 0.9));
  box-shadow: 0 10px 25px rgba(138, 43, 226, 0.3);
  color: white;
  border-radius: 12px;
  padding: 25px;
  width: 300px;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
  background: radial-gradient(circle at center, rgba(138, 43, 226, 0.3), rgba(0, 0, 0, 0.85));
}

.card h3 {
  color: #00c3ff;
  margin-bottom: 10px;
  font-size: 20px;
}

.card p {
  color: #bbb;
  font-size: 15px;
  line-height: 1.6;
}

.card::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.4) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  pointer-events: none;
  filter: blur(4px);
  animation: float-points 2s infinite ease-in-out;
}

.card:hover::after {
  opacity: 1;
  animation: float-points 2s infinite ease-in-out;
}

/* Footer */
#footer {
  position: relative;
  height: 220px;
  background: #000;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footerCanvas {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.footer-info {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px 20px;
  color: white;
  font-family: "Vazirmatn", sans-serif;
}

.footer-info h2 {
  margin-bottom: 10px;
  background: linear-gradient(100deg, rgba(138, 43, 226, 0.9), rgba(0, 195, 255, 0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-info p {
  margin: 5px 0;
  padding: 8px 15px;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  position: relative;
  z-index: 2;
}

.footer-info p:hover {
  border: 1px solid #8A2BE2;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.2), rgba(0, 0, 0, 0));
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
  color: #8A2BE2;
  font-weight: bold;
  cursor: default;
}

/* Read More Button */
.read-more-btn {
  display: inline-block;
  background-color: #8A2BE2;
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  background-color: white;
  color: #8A2BE2;
  border: 2px solid #8A2BE2;
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}


/* Language Selector */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background-color: #444;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
}

.dropdown-btn:hover {
  background-color: #555;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 8px;
}

.dropdown-content a {
  color: #ddd;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s;
}

.dropdown-content a:hover {
  background-color: #555;
}

.dropdown:hover .dropdown-content {
  display: block;
}


/* Blog Posts */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-post {
  background-color: #2c2c2c;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: 0.3s;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

.blog-post img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-post h2 {
  padding: 15px 20px 0;
  color: #8A2BE2;
  font-size: 20px;
}

.blog-post p {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-light);
}

.blog-post small {
  padding: 0 20px;
  color: #aaa;
}

.read-more-btn {
  display: block;
  text-align: center;
  background-color: #8A2BE2;
  color: white;
  padding: 10px 0;
  margin: 20px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
}

.read-more-btn:hover {
  background-color: white;
  color: #8A2BE2;
  border: 2px solid #8A2BE2;
}


/* AI Processor */
.upload-box {
  max-width: 700px;
  margin: 100px auto;
  padding: 40px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(138,43,226,0.3), rgba(0,195,255,0.1));
  box-shadow: 0 0 25px rgba(0, 195, 255, 0.15);
  color: var(--text-light);
  text-align: center;
  position: relative;
}

.upload-box h1 {
  color: #8A2BE2;
  margin-bottom: 30px;
}

#drop-zone {
  border: 2px dashed #00c3ff;
  border-radius: 10px;
  padding: 40px;
  cursor: pointer;
  transition: 0.3s ease;
  margin-bottom: 30px;
}

#drop-zone.drag-over {
  background-color: rgba(0,195,255,0.05);
  border-color: #8A2BE2;
}

#drop-zone p {
  font-size: 16px;
  color: #ccc;
}

#description {
  width: 100%;
  height: 120px;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #8A2BE2;
  background-color: #1a1a1a;
  color: white;
  margin-bottom: 30px;
  font-size: 15px;
  resize: vertical;
}

#ai-response {
  margin-top: 30px;
  text-align: left;
  line-height: 1.8;
}


.ask-ai-btn {
  background: linear-gradient(135deg, #8A2BE2, #00c3ff);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
  letter-spacing: 1px;
}

.ask-ai-btn:hover {
  background: white;
  color: #8A2BE2;
  border: 2px solid #8A2BE2;
  box-shadow: 0 0 25px rgba(0, 195, 255, 0.5);
  transform: scale(1.05);
}

.wave-text {
  font-size: 28px;
  font-weight: bold;
  background: linear-gradient(90deg,     #8A2BE2 0%,
  #A55EEB 25%,
  #C980FA 50%,
  #E2C2FF 75%,
  #8A2BE2 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: waveFlow 3s linear infinite;
}

@keyframes waveFlow {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}


/* ---------------------- Responsive Fixes --------------------- */

@media screen and (max-width: 768px) {
  body {
    font-size: 16px;
    padding: 10px;
  }

  .main-header,
  .nav-links {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-links a {
    margin: 10px 0;
    display: block;
  }

  .skills-container {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .skill-box {
    width: 90% !important;
    font-size: 16px;
  }

  #resume {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  h1, h2, h3 {
    font-size: 20px !important;
    text-align: center;
  }
}

.special-download {
  background-color: #00d9ff;
  color: black;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.special-download:hover {
  background-color: #fff;
  color: #000;
  transform: scale(1.05);
}



/* Drop Down AI Processor Field*/
.condition-group {
  margin-bottom: 20px;
  background-color: #1e1e2f;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px #bb86fc22;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.condition-label {
  display: block;
  margin-bottom: 8px;
  color: #bb86fc;
  font-weight: bold;
  font-size: 15px;
}

.condition-select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #2a2a3c;
  color: #fff;
  font-size: 14px;
  appearance: none;
}












/* Mobile Responsiveness */
@media (max-width: 768px) {

  /* سرفصل‌ها و متن‌ها وسط‌چین */
  .hero-text,
  .section-title,
  h1, h2, h3, h4 {
    text-align: center !important;
  }

  /* کانتینر مهارت‌ها از grid به flex برای موبایل */
  .skills-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 20px;
  }

  /* هر کارت مهارت سایز متناسب موبایل بگیره */
  .skill-box {
    width: 90% !important;
    margin: 0 auto;
    text-align: center;
  }

  /* دکمه‌ها کشیده و بزرگ */
  .btn, .cta-button, .submit-button {
    width: 100% !important;
    font-size: 1rem !important;
    padding: 12px 0 !important;
  }

  /* باکس‌های فرم */
  input, textarea, .form-control {
    width: 100% !important;
    font-size: 1rem;
    box-sizing: border-box;
  }

  /* باکس پست‌های بلاگ */
  .blog-card {
    width: 90% !important;
    margin: 0 auto !important;
  }

  /* حالت کلی باکس‌ها */
  .box, .resume-section, .card {
    width: 90% !important;
    margin: 0 auto !important;
    padding: 16px;
  }

  /* تصویرهای داخل کارت‌ها سایز موبایل */
  .blog-card img, .skill-box img {
    width: 100% !important;
    height: auto !important;
  }

  /* کاهش سایز فونت در حالت خیلی کوچک */
  body {
    font-size: 15px;
  }

}
@media (max-width: 768px) {
  /* برای هدر */
  #main-header {
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
  }

  .logo {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
  }

  .nav-links {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 14px;
    display: block;
  }

  /* برای کارت‌های بلاگ */
  .blog-card {
    width: 90%;
    margin: 15px auto;
    padding: 15px;
    box-sizing: border-box;
  }

  .blog-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
  }

  .blog-card h3 {
    font-size: 16px;
    margin-top: 10px;
  }

  .blog-card p {
    font-size: 14px;
    line-height: 1.5;
  }

  .blog-card .read-more {
    font-size: 14px;
    padding: 10px 15px;
    margin-top: 10px;
  }

  /* جلوگیری از اسکرول افقی */
  body {
    overflow-x: hidden;
  }

  html {
    overflow-x: hidden;
  }
}

@media only screen and (max-width: 768px) {
  .section-title, 
  .newest-title,
  .section {
    text-align: center !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 95%;
  }
}

@media only screen and (max-width: 768px) {
  .blog-card {
    width: 90% !important;
    margin: 10px auto !important;
    box-sizing: border-box !important;
  }

  .blog-section, .newest-section {
    padding: 0 10px !important;
    overflow-x: hidden !important;
  }

  body {
    overflow-x: hidden !important;
  }
}


@media screen and (max-width: 768px) {
  .resume p, .resume li {
    text-align: justify;
  }
}


  body.justify-content p,
  body.justify-content li {
    text-align: justify;
  }

header p,
footer p,
header h1, header h2, header h3,
footer h1, footer h2, footer h3 {
  text-align: center !important;
}


@media screen and (max-width: 768px) {
  .shake-wrapper canvas {
    display: none !important;
  }
}




































/* نور نئونی با کم وزیاد شدن درخشش - neon wave */
.neon-text {
  font-size: 28px;
  color: #fff;
  text-shadow:
    0 0 5px #8a2be2,
    0 0 10px #8a2be2,
    0 0 20px #8a2be2,
    0 0 40px #00f2fe,
    0 0 80px #00f2fe,
    0 0 90px #00f2fe;
  animation: neonPulse 1.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  from {
    text-shadow:
      0 0 2px #8a2be2,
      0 0 5px #00f2fe;
  }
  to {
    text-shadow:
      0 0 10px #8a2be2,
      0 0 20px #00f2fe,
      0 0 40px #00f2fe;
  }
}

/* موج مکزیکی و بالا پایین شدن جمله به صورت موج - حرکت موجی با جاوا اسکریپت */
#wave-js-text span {
  display: inline-block;
  animation: waveUpDown 1.5s infinite;
}

@keyframes waveUpDown {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

<script>
const waveText = document.getElementById("wave-js-text");
const letters = waveText.textContent.split("");
waveText.textContent = "";
letters.forEach((letter, i) => {
  const span = document.createElement("span");
  span.textContent = letter;
  span.style.animationDelay = `${i * 0.05}s`;
  waveText.appendChild(span);
});
</script>
