:root {
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-hover: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #aaa;
  --blue: #003cff;
  --blue-light: #4628ec;
  --red: #c40000;
  --red-light: #ff1919;
  --line: rgba(255, 255, 255, 0.1);
  --green: #35e0a1;
  --radius: 22px;
  --font-body: "Vazirmatn", sans-serif;
  --font-code: "JetBrains Mono", monospace;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.8;
}
/* نور پس زمینه */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.18;
  z-index: -1;
}
body::before {
  background: var(--blue);
  top: -200px;
  right: -200px;
}
body::after {
  background: var(--red);
  bottom: -200px;
  left: -200px;
}
/* نویز */
.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}
/* container */
.wrap {
  max-width: 1280px;
  margin: auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}
/* ===================
HEADER
=================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 1.5rem;
}
.bracket {
  color: var(--blue-light);
}
.bracket.r {
  color: var(--red-light);
}
.nav-logo {
  width: 65px;
  height: 65px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--blue-light);
  padding: 5px;
  transition: 0.3s;
}
.nav-logo:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px var(--blue);
}
/* ===================
HERO
=================== */
.hero {
  padding: 90px 0 40px;
  text-align: center;
}
.eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 20px;
 font-size: 0.9rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 15px var(--green);
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.2;
}
.grad {
  background: linear-gradient(90deg, var(--blue-light), var(--red-light));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.lead {
  max-width: 700px;
  margin: 25px auto;
  color: var(--muted);
  font-size: 1rem;
}
/* SEARCH */
.template-search {
  max-width: 600px;
  margin: 40px auto;
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 8px;
  backdrop-filter: blur(15px);
}
.template-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: white;
  padding: 15px 25px;
  font-size: 15px;
}
.template-search button {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--blue), var(--red));
}
/* CATEGORY */
.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 40px 0;
  margin-top: -50px;
}
.category {
  padding: 10px 25px;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: white;
  transition: 0.3s;
}
.category:hover,
.category.active {
  background: linear-gradient(45deg, var(--red), var(--blue));
}
/* ===================
CARDS
=================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 60px 0;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(15px);
  transition: 0.4s;
}
.project-card:hover {
  transform: translateY(-12px);
  background: var(--panel-hover);
  box-shadow:
    0 0 30px rgba(0, 60, 255, 0.2),
    0 0 30px rgba(255, 0, 0, 0.15);
}
.card-img {
  height: 230px;
  position: relative;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s;
}
.project-card:hover img {
  transform: scale(1.08);
}
.free-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--green);
  color: #000;
  padding: 5px 15px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: bold;
}
.card-content {
  padding: 22px;
}
.card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.card-content p {
  color: var(--muted);
  font-size: 0.9rem;
}
.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.card-tags span {
  background: rgba(0, 60, 255, 0.15);
  border: 1px solid rgba(0, 60, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}
.card-footer {
  display: flex;
  gap: 10px;
  padding: 0 22px 22px;
}
.btn-demo,
.btn-buy {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  font-weight: bold;
  transition: 0.3s;
}
.btn-demo {
  background: #151515;
}
.btn-buy {
  background: linear-gradient(45deg, var(--red), var(--red-light));
}
.btn-demo:hover,
.btn-buy:hover {
  transform: translateY(-3px);
}
/* BACK HOME */
.back-home {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 45px;
  border-radius: 15px;
  background: linear-gradient(45deg, #000, #003cff);
  color: white;
  z-index: 99;
}
/* FOOTER */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.footer-row {
  text-align: center;
  color: var(--muted);
}
.tag-blue {
  color: #4628ec;
}
.tag-red {
  color: #ff1919;
}
/* ===================
RESPONSIVE
=================== */
@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .wrap {
    padding: 0 15px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 50px;
  }
  .card-img {
    height: 200px;
  }
  .nav {
    height: 75px;
  }
  .nav-logo {
    width: 50px;
    height: 50px;
  }
}