:root{
  --bg: #0e0f13;
  --bg-2: #141622;
  --card: #181a27;
  --text: #e9ecf1;
  --muted: #9aa3b2;
  --primary: #6c63ff;
  --accent: #00e5ff;
  --success: #34d399;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
  --grad: linear-gradient(135deg, #6c63ff, #00e5ff);
}

[data-theme="light"]{
  --bg: #f5f7fb;
  --bg-2: #eef1f7;
  --card: #ffffff;
  --text: #0b1221;
  --muted: #5f6b7a;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 20px 60px rgba(15,23,42,0.1);
  --grad: linear-gradient(135deg, #3b82f6, #22d3ee);
}

*{ box-sizing: border-box; padding: 0; margin: 0; }
body{
  font-family: "Inter", "Vazirmatn", sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(108,99,255,0.15), transparent 60%) , var(--bg);
  color: var(--text);
  transition: background .4s ease, color .4s ease;
}

.container{
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 40px 0 80px;
}

.topbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.brand{
  font-size: 20px;
  font-weight: 700;
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand i{
  color: var(--accent);
  font-size: 22px;
}

.controls{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn{
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: all .3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(108,99,255,0.4);
}

.hero{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 30px;
  align-items: center;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before{
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  background: var(--grad);
  top: -80px;
  right: -80px;
  opacity: .15;
  border-radius: 50%;
  filter: blur(20px);
}

.hero h1{
  font-size: 42px;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero p{
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.7;
}

.badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge{
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(108,99,255,0.12);
  color: var(--text);
  border: 1px solid rgba(108,99,255,0.3);
  font-size: 13px;
  font-weight: 600;
}

.profile{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.avatar{
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.1);
  background: center/cover;
  box-shadow: 0 0 0 8px rgba(108,99,255,0.1), 0 30px 60px rgba(0,0,0,0.35);
  transition: transform .4s ease;
}

.avatar:hover{
  transform: scale(1.03) rotate(1deg);
}

.profile-name{ font-size: 20px; font-weight: 700; }
.profile-role{ color: var(--muted); }
.profile-links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.section{
  margin-top: 40px;
}

.section-title{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
}

.section-title i{
  color: var(--primary);
  font-size: 18px;
}

.grid{
  display: grid;
  gap: 20px;
}

.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }

.project{
  position: relative;
  overflow: hidden;
}

.project h4{ margin-bottom: 8px; }
.project p{ color: var(--muted); font-size: 14px; line-height: 1.6; }

.project .link{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  margin-top: 12px;
  text-decoration: none;
}

.skill{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill .bar{
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.skill .bar span{
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--grad);
  width: 0;
  animation: fill 1.2s ease forwards;
}

@keyframes fill{ from{ width: 0; } to{ width: var(--val); } }

.contact{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact a{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all .3s ease;
}

.contact a:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.lang-list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lang-pill{
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0,229,255,0.12);
  border: 1px solid rgba(0,229,255,0.3);
  font-weight: 600;
}

.fade-up{
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .8s ease forwards;
}

@keyframes fadeUp{
  to { opacity: 1; transform: translateY(0); }
}

/* extras */
.feature-orbit{
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(108,99,255,0.08);
}
.orbit-icon{
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: var(--shadow);
}
.orbit-title{ font-weight: 700; }
.orbit-desc{ color: var(--muted); font-size: 14px; }

/* articles */
.article-card img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

/* projects page */
.projects-hero h1{ font-size: 36px; margin-bottom: 10px; }
.projects-hero p{ color: var(--muted); }

.filter-bar{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill{
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  font-weight: 600;
  cursor: pointer;
}

.gallery-card{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.gallery-media{
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.gallery-info{
  padding: 14px;
}
.gallery-tags{
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}

/* lightbox */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.lightbox.show{ display: flex; }
.lightbox-inner{
  position: relative;
  width: min(1100px, 92%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.lightbox-content img, .lightbox-content video, .lightbox-content iframe{
  width: 100%;
  height: 520px;
  border-radius: 14px;
  background: #000;
}
.lightbox-caption{
  margin-top: 12px;
  color: var(--muted);
}
.lightbox-close{
  position: absolute; top: 12px; right: 12px;
  background: var(--card); border: 1px solid var(--border);
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer;
}
.lightbox-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--card); border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
}
.lightbox-nav.prev{ left: -10px; }
.lightbox-nav.next{ right: -10px; }

/* admin */
.admin-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
  gap: 20px;
}
.form-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
input, textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
}
textarea{ min-height: 90px; resize: vertical; }
.admin-note p{ color: var(--muted); }

.repeater-item{
  border: 1px dashed var(--border);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr 1fr; }
  .lightbox-content img, .lightbox-content video, .lightbox-content iframe{
    height: 360px;
  }
}

@media (max-width: 600px){
  .grid-3, .grid-2{ grid-template-columns: 1fr; }
  .hero h1{ font-size: 32px; }
}
@media (max-width: 768px){
  .topbar{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .controls{
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .btn{
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 768px){
  .topbar{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .controls{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn{
    flex: 1 1 140px;
    min-width: 140px;
    justify-content: center;
  }
}

@media (max-width: 768px){
  #projectsBtn{
    flex: 1 1 220px;
    min-width: 220px;
    font-size: 16px;
    padding: 12px 18px;
    justify-content: center;
  }
}
/* Footer Copyright - Center */
.site-footer{
  margin-top: 24px;
  padding: 16px 0 24px;
}

.footer-copyright{
  text-align: center;
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-copyright .credit{
  display: inline-block;
  margin-left: 8px;
  opacity: 0.85;
  font-size: 13px;
}
