/* ================================================
   Portfolio - Main Stylesheet
   ================================================ */

/* ===== RESET & BASE ===== */
@font-face {
  font-family: "Vazirmatn";
  src:
    url(../assets/fonts/Vazirmatn-Regular.woff2) format("woff2"),
    url(../assets/fonts/Vazirmatn-Regular.ttf) format("truetype");
  font-display: swap;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn";
}

html {
  scroll-behavior: smooth;
}

:root {
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --primary: #0a0a0a;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --grad: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
}

body {
  font-family: "Vazirmatn";
  background: var(--light-bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
}
img,
video {
  max-width: 100%;
  display: block;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--grad);
  color: #fff;
  padding: 0.78rem 1.8rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.3);
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 0.78rem 1.8rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #eff6ff;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  background: #eff6ff;
  color: var(--accent);
}

.nav-cta {
  background: var(--grad) !important;
  color: #fff !important;
  padding: 0.45rem 1.2rem !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.3);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
  background: var(--grad) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: -180px;
  width: 650px;
  height: 650px;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.07) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.07) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  padding: 0.38rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
  animation: fadeDown 0.7s ease both;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #2563eb;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.18;
  color: var(--primary);
  margin-bottom: 1.1rem;
  animation: fadeUp 0.7s ease 0.15s both;
}

.hero-title .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 2rem;
  animation: fadeUp 0.7s ease 0.3s both;
  text-align: justify;
}

.hero-btns {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.45s both;
}

/* ===== AVATAR ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  animation: fadeIn 0.9s ease 0.2s both;
}

.avatar-wrap {
  position: relative;
  width: 300px;
  height: 300px;
}

.avatar-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px dashed #bfdbfe;
  animation: spin 20s linear infinite;
}

.avatar-ring::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.avatar-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 4px solid #fff;
  box-shadow: 0 18px 55px rgba(37, 99, 235, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.float-tag {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.float-tag.t1 {
  bottom: 20px;
  right: -10px;
  animation: floatAnim 4s ease-in-out infinite;
}

.float-tag.t2 {
  top: 20px;
  left: -10px;
  animation: floatAnim 4s ease-in-out 1.5s infinite;
}

.green-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

/* ===== STATS ===== */
.stats {
  background: var(--primary);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-num {
  font-size: 2.3rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-lbl {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

/* ===== SECTION COMMON ===== */
.section {
  padding: 5.5rem 0;
}
.section.alt {
  background: #fff;
}

.sec-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.sec-tag {
  display: inline-block;
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  padding: 0.28rem 0.85rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.sec-title {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 900;
  color: var(--primary);
}

.sec-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

/* ===== SKILLS ===== */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 0.48rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: default;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #eff6ff;
  transform: translateY(-2px);
}

.skill-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.proj-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.32s;
  display: flex;
  flex-direction: column;
}

.proj-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 55px rgba(37, 99, 235, 0.11);
  border-color: #bfdbfe;
}

.proj-media {
  height: 210px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.proj-media img,
.proj-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-media .ph-icon {
  font-size: 3rem;
  color: #93c5fd;
}
.proj-media .ph-txt {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.4rem;
}

.proj-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

.proj-body {
  padding: 1.3rem;
  flex: 1;
}

.proj-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.pill {
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}

.proj-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.45rem;
}

.proj-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
  text-align: justify;
}

.proj-foot {
  padding: 0.9rem 1.3rem;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.proj-more {
  border: 2px dashed var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}

.proj-more-inner {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.proj-more-inner svg {
  width: 40px;
  height: 40px;
  color: #cbd5e1;
  margin: 0 auto 0.8rem;
}

.proj-more-inner p {
  font-size: 0.88rem;
}

/* ===== CONTACT ===== */
.contact-box {
  background: var(--primary);
  border-radius: 22px;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.28) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.contact-box h2 {
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.7rem;
  position: relative;
}

.contact-box p {
  color: #94a3b8;
  margin-bottom: 2.2rem;
  position: relative;
}

.contact-btns {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  position: relative;
}

.c-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.3s;
}

.c-btn.main {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
}

.c-btn.main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.5);
  color: #fff;
}

.c-btn.ghost {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.c-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
  padding: 1.8rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.83rem;
}

footer a {
  color: var(--accent);
  font-weight: 600;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 700px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .hero-visual {
    order: -1;
  }
  .avatar-wrap,
  .avatar-circle {
    width: 230px;
    height: 230px;
  }
  .hero-btns {
    justify-content: center;
  }
  .float-tag {
    display: none;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .contact-box {
    padding: 2.5rem 1.2rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.2rem;
  }

  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
}
